Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6255

Support BigQuery-style JSON_OBJECT invocation syntax

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Currently, Calcite has two styles for invoking JSON_OBJECT:

          JSON_OBJECT(KEY 'foo' VALUE 'bar', KEY 'foo2' VALUE 'bar2')

      and:

          JSON_OBJECT('foo' : 'bar', 'foo2' : 'bar')

      However, BigQuery uses a lighter-weight syntax resembling the MAP<> constructor, with an even numbered argument list where every odd item is a key and the following even item is a value:

          JSON_OBJECT('foo', 'bar', 'foo2', 'bar2')

      With the objective of syntax compatibility with BigQuery, the simplest change to the grammar is to allow ',' as well as ':' for separating key/value pairs in the invocation.

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            barrkel Barry Kelly
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment