MetricRecord uses field types that are not directly representable in typical SQL files from Spark
(no Spark-compatible SQL dialect has maps, and only Postgres has at least some arrays but not quite enough
for what we need. This isn't quite enough)
This record maps these to the corresponding SQL-compatible representation
Note on Postgres: Postgres has a JSON data type. We suggest sticking to String/Varchar for the SQL interface,
and having the String-to-JSON conversions happen on the database side IF we have a use case for SQL queries
by a specific attribute of these JSON trees (as of writing this, I have a hunch there could be, but WAGNI until
proven otherwise -- cchepelov)
Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
An SQL-side "avatar" for MetricRecord
MetricRecord uses field types that are not directly representable in typical SQL files from Spark (no Spark-compatible SQL dialect has maps, and only Postgres has at least some arrays but not quite enough for what we need. This isn't quite enough)
This record maps these to the corresponding SQL-compatible representation
Note on Postgres: Postgres has a JSON data type. We suggest sticking to String/Varchar for the SQL interface, and having the String-to-JSON conversions happen on the database side IF we have a use case for SQL queries by a specific attribute of these JSON trees (as of writing this, I have a hunch there could be, but WAGNI until proven otherwise -- cchepelov)