Add wide table CSV data load#255
Draft
hbarthels wants to merge 1 commit into
Draft
Conversation
Introduces a `table` form for `csv_data` that loads all selected columns into one output relation with schema `key=[T1..TN], value=[]`, dropping the per-column row-ID keying of the existing `columns` form. Proto: - Add `CsvTarget` message (target_id, column_names, types) - Add `optional CsvTarget target = 5` to `CSVData` Grammar: - Add `csv_table` rule: `(table <rel_id> ["col"...] [Type...])` - Rewrite `csv_data` to accept either `gnf_columns?` or `csv_table?` in a single alternative (avoids LL(3) conflict on the shared prefix) - Add construct/deconstruct helpers for the two modes Regenerate parsers, pretty-printers, and proto stubs for Python, Julia, and Go. Add `tests/lqp/csv_table.lqp` with four table-mode variants and corresponding binary/snapshot artifacts. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
f865983 to
6304a9b
Compare
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.
What
Adds a
tableform tocsv_datafor loading tabular CSV data into a single output relation with schemakey=[T1, T2, ..., TN], value=[]— no synthesized row ID in the key.The new S-expression syntax:
Changes
Proto (
logic.proto)CSVTargetmessage:target_id(RelationId),column_names(repeated string),types(repeated Type)optional CSVTarget target = 5onCSVData; mutually exclusive with the existingcolumnsfieldGrammar (
grammar.y)csv_tablerule:"(" "table" relation_id "[" STRING* "]" "[" type* "]" ")"csv_datarewritten to a single alternative withgnf_columns? csv_table?— both optional and distinguishable by LL(2) lookahead ("columns"vs"table"), avoiding the LL(3) conflict that would arise from two alternatives sharing the longcsvlocator csv_configprefixGenerated files
Tests
tests/lqp/csv_table.lqp— four table-mode variants (int/int edges, string/float scores, single-column, custom delimiter) with binary and snapshot artifactsReviewer notes
__slots__changes intransactions_pb2.pyiand other.pyistubs are a pre-existing version drift between the committed stubs and the currentbufpyi plugin (1.56.0); they are not caused by the proto changes here.