ganeshashree commented on PR #58034:
URL: https://github.com/apache/spark/pull/58034#issuecomment-5993488036

   Thanks @cloud-fan, both good catches.
   
   > Derive JSON_OBJECT throwable and foldable from what can fail
   
   Not intended, the blanket choice was overly conservative. It now follows the 
JSON_ARRAY approach: throwable only when a key may be null, a value needs 
FORMAT JSON validation, or a child is throwable, and foldable when all children 
are foldable and it can't throw. So `DEFAULT JSON_OBJECT('a' VALUE 1)` works 
now (added a test), constant calls fold, and safe predicates get pushed below 
joins.
   
   > Confirm the SQLSTATE for JSON_OBJECT_NULL_KEY
   
   Switched to 22004. Db2 documents 22004 for a null JSON_OBJECT key name, and 
it's the better fit than "null value in array target".
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to