spec(v1.0): rename @table → @dataset, add @proto, expand reserved names#42
Merged
Conversation
Implements the three one-time spec changes from the protowire v1.0 freeze line (protowire/STABILITY.md): - @table directive renamed to @dataset (draft §3.4.4). Same semantics; v1 reserves @table for a future storage-definition meaning. Hard cutover — no alias period. - @proto directive added (draft §3.4.5). Four body shapes distinguished lexically: anonymous { ... }, named pkg.Type { ... }, source """...""", descriptor b"...". Descriptor form is mandatory per spec; the other three are QoI (all four supported). Anonymous @proto is consumed one-shot by the next typed-binding directive. - Reserved directive name list expanded from 5 to 13 (draft §3.4.6). Parser + FastDecoder reject @table, @Datasource, @view, @procedure, @function, @permissions as spec-reserved. Public API rename surface: Ast.TableDirective → Ast.DatasetDirective Ast.TableRow → Ast.DatasetRow TableReader → DatasetReader Document.tables() → Document.datasets() Result.tables() → Result.datasets() Document.protos() / Result.protos() (new) Ast.ProtoDirective + Ast.ProtoShape (new) TokenKind.AT_TABLE → AT_DATASET; + AT_PROTO (new) SchemaValidator.FUTURE_RESERVED_DIRECTIVES (new) Source files renamed: TableReader.java → DatasetReader.java TableReaderTest.java → DatasetReaderTest.java TableParserTest.java → DatasetParserTest.java New: ProtoDirectiveTest.java with 13 cases covering all four shapes, anonymous binding, multi-@proto, nested-brace bodies, reserved-name rejection, @type coexistence, ProtoShape enum. @dataset's row message type is now optional in the AST (binding to an anonymous @proto). Lexer.repositionTo(int) added so the parser can skip past an @proto brace-body whose interior is protobuf source rather than PXF. 103 tests, 0 failures.
This was referenced May 13, 2026
Merged
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.
Summary
Implements the three one-time spec changes from the protowire v1.0 freeze line (STABILITY.md):
@table→@dataset(draft §3.4.4). Hard cutover, no alias period.@protodirective added (draft §3.4.5). Four body shapes lexically distinguished: anonymous, named, source, descriptor. Descriptor form is the MUST-support shape; this port supports all four.@table,@datasource,@view,@procedure,@function,@permissions.Public API rename surface
Ast.TableDirectiveAst.DatasetDirectiveAst.TableRowAst.DatasetRowTableReaderDatasetReaderDocument.tables()Document.datasets()Result.tables()Result.datasets()TokenKind.AT_TABLEAT_DATASETAst.ProtoDirective+Ast.ProtoShape(new)Document.protos()+Result.protos()(new)TokenKind.AT_PROTO(new)SchemaValidator.FUTURE_RESERVED_DIRECTIVES(new)Source files
TableReader.java,TableReaderTest.java,TableParserTest.javarenamed to theirDataset*equivalents.@dataset's row message type is now optional in the AST — binding to an anonymous@protoper draft §3.4.4 Anonymous binding.Lexer.repositionTo(int)added so the parser can skip past an@protobrace-body whose interior is protobuf source rather than PXF.Test plan
Companion PRs: