Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CAST(JSON as ROW(ARRAY)) #9447

Closed

Commits on Apr 11, 2024

  1. Fix CAST(JSON as ROW(ARRAY)) (facebookincubator#9447)

    Summary:
    
    CAST(JSON as ROW(ARRAY()) used to fail with
    
    ```
    OUT_OF_ORDER_ITERATION: Objects and arrays can only be iterated when they are first encountered.
    ```
    
    According to simdjson documentation, https://github.com/simdjson/simdjson/blob/master/doc/basics.md, it is not allowed to store object values for later processing. These must be consumed or copied before proceeding.
    
    Also, fixed behavior when JSON object contains duplicate keys. Presto throws, but previous implementation used to allow duplicates.
    
    Also, fix the test to actually verify JSON objects with mixed case keys.
    
    Reviewed By: xiaoxmeng, Yuhta
    
    Differential Revision: D56013293
    mbasmanova authored and facebook-github-bot committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    efeb0de View commit details
    Browse the repository at this point in the history