Hello,

 

I have a question about Calcite and fancier data types.

It looks like Calcite JSON operations are really implemented by treating
JSON as a string. I expect that this is expensive, since the string needs to
be parsed and serialized back for every operation.

 

Snowflake uses VARIANT types to represent the parsed JSON; a VARIANT is
really a dynamically-typed union type:
https://docs.snowflake.com/en/sql-reference/data-types-semistructured#label-
data-type-variant

 

Postgres has native types JSON, JSONB, and JSONPATH:
https://www.postgresql.org/docs/15/datatype-json.html

 

Is there a way to manipulate JSON more efficiently in Calcite than by just
using strings?

If there isn't, is anyone working on such a topic?

 

If there isn't anyone working on this, the next question is whether the
existing Calcite type system is rich enough to support a VARIANT-like  type,
or does the type system need to be extended?

 

Thank you,

Mihai

Reply via email to