barrkel opened a new pull request, #3694:
URL: https://github.com/apache/calcite/pull/3694

   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](https://cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#json_object)
 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')
   ```
   
   This PR updates the grammar to allow `,` as well as `:` for separating 
key/value pairs in the invocation.
   
   It does not prevent mixing `,` and `:`, but retains the prohibition from 
mixing with `KEY`/`VALUE` syntax.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to