Conversation
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
PRQL users can now use the same intuitive dot notation for JSON access as SQL users. Paths like status.phase or spec.containers[0].image are automatically converted to s-strings with arrow operators before PRQL compilation. Changes: - Add convert_path_to_arrows() in json_path.rs for string-based path parsing - Add preprocess_prql_json_paths() in prql.rs to convert paths to s-strings - Update preprocess_sql() to call PRQL preprocessor before compilation - Add comprehensive unit tests for the new functionality - Update integration test 23-prql-parity.sh to use dot notation
Extract parsing logic into focused helper functions for clarity: json_path.rs: - consume_identifier() - extracts alphanumeric identifiers - consume_field_name() - extracts field names including hyphens - parse_path_segments() - orchestrates segment parsing - parse_bracket_segment() - handles [n] and [] bracket parsing prql.rs: - Replace boolean flag with cleaner match statement - flush_code_buffer() - handles buffer conversion - copy_string_literal() - encapsulates string handling with escapes - Rename buffer to code_buffer for clarity All 306 tests pass. No functional changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.