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

DRILL-7631: Updates to the Json Structure Parser #2016

Closed
wants to merge 2 commits into from

Conversation

paul-rogers
Copy link
Contributor

DRILL-7631: Updates to the Json Structure Parser

Description

The JSON structure parser converts JSON tokens from the Jackson JSON parser into a structure consisting of values, arrays and objects. The structure parser handles the JSON aspects. An associated set of listeners converts JSON values to some other format (such as to vectors via the column writers.) This PR covers only the structure parser.

Work to create a new JSON record reader using this parser revealed several required revisions:

  • Convert the various typed listener creation calls in the listener to a generic call that takes a ValueDef value description.
  • Add support to replace listeners as is needed when starting with an "unknown" field, which later resolves to some type, such as Integer.
  • Reorganized the code to build sub-parsers based on incoming JSON structure.

Note that, at present, no code uses the JSON structure parser. That code will come in a later PR.

Documentation

None

Testing

Expanded an reran the associated unit tests. Moved the unit tests so that they are in the same package as the code.

Revised how "look-ahead" works. Added support for unknown
types.
Copy link
Member

@vvysotskyi vvysotskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paul-rogers, thanks for making the pull request!
I have added a couple of minor comments, could you please take a look?

@paul-rogers
Copy link
Contributor Author

@vvysotskyi, thanks much for your review! Addressed the review comments.

Copy link
Member

@vvysotskyi vvysotskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paul-rogers, thanks for making changes, +1

@asfgit asfgit closed this in cc51f24 Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants