You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Alessandro Solimando (Jira)" <ji...@apache.org> on 2021/12/03 10:22:00 UTC
[jira] [Comment Edited] (CALCITE-4919) Add a function to parse a JSON string into a VARIANT object
[ https://issues.apache.org/jira/browse/CALCITE-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17452877#comment-17452877 ]
Alessandro Solimando edited comment on CALCITE-4919 at 12/3/21, 10:21 AM:
--------------------------------------------------------------------------
[~julianhyde], it seems that the new tickets around VARIANT are consistently filed as "Bug" while they look "Improvement" tickets to me, is this intentional?
was (Author: asolimando):
It seems that the new tickets around VARIANT are consistently filed as "Bug" while they look "Improvement" tickets to me, is this intentional?
> Add a function to parse a JSON string into a VARIANT object
> -----------------------------------------------------------
>
> Key: CALCITE-4919
> URL: https://issues.apache.org/jira/browse/CALCITE-4919
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Priority: Major
>
> Add a function to parse a JSON string into a VARIANT object. This assumes that the VARIANT type (described in CALCITE-4918) has already been implemented.
> The email thread [Snowflake JSON support|https://www.mail-archive.com/dev@calcite.apache.org/msg17417.html] describes 4 independent tasks:
> # Support for the ‘:’ (field reference) operator in the parser. We already have ‘::’ (Postgres-style cast) in the Babel parser. We’d have to check that ‘:’ does not introduce ambiguities
> # Add a {{VARIANT}} datatype. This is similar to SQL Server’s {{VARIANT}} type and Java’s {{Object}} type in that it is a tagged union: it can be many sub-types, and you can check the type at runtime using operators such as {{{}TYPEOF{}}}.
> # We already have the {{ITEM}} operator (written using '[ ]') that works on arrays and maps. We should make {{ITEM}} also work on {{{}VARIANT{}}}.
> # Add a function to parse a JSON string to a {{VARIANT}} object.
> This case is task 4 on the list. Task 2 is CALCITE-4918. As the email notes, the tasks are fairly independent. You could do 2, 3, 4 without 1, and do 1 without 2, 3, 4.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)