Repository navigation
feat(query_engine): add table function to create inline tables - #1780
Open
fengelniederhammer wants to merge 7 commits into
Open
fengelniederhammer wants to merge 7 commits into
fengelniederhammer wants to merge 7 commits into
Conversation
taepper
reviewed
Oct 30, 2026
Contributor
|
This is a preview of the changelog of the next release. If this branch is not up-to-date with the current main branch, the changelog may not be accurate. Rebase your branch on the main branch to get the most accurate changelog. Note that this might contain changes that are on main, but not yet released. Changelog: 0.17.6 (2026-11-18)FeaturesBug Fixes |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the change adding SaneQL inline tables.
No open issues 🎉
What changed in this PR
Adds SaneQL’s table(rows) function for creating inline relations, addressing #1380 and integrating literal data with the existing query engine.
Changes:
- Validates named first rows, positional later rows, constant cells, and consistent column types.
- Adds an ordered Arrow-backed source node and registers it with query planning and operator visitors.
- Adds parser, query, insertion, and end-to-end tests, plus user documentation.
| File | Description |
|---|---|
src/rhydb/query_engine/saneql/table_literal_builder.h |
Declares the table-literal builder and its contract. |
src/rhydb/query_engine/saneql/table_literal_builder.cpp |
Validates rows and materializes typed Arrow columns. |
src/rhydb/query_engine/saneql/parser.test.cpp |
Tests parsing nested table-literal syntax. |
src/rhydb/query_engine/saneql/ast_to_query.cpp |
Registers and dispatches the table function. |
src/rhydb/query_engine/operators/table_literal_node.test.cpp |
Tests values, validation, composition, and insertion. |
src/rhydb/query_engine/operators/table_literal_node.h |
Defines the inline-table source node. |
src/rhydb/query_engine/operators/table_literal_node.cpp |
Emits literal rows as an ordered Arrow batch. |
src/rhydb/query_engine/operators/query_node.h |
Adds the table-literal node kind. |
src/rhydb/query_engine/operators/query_node.cpp |
Provides the node’s display name. |
src/rhydb/query_engine/operator_visitor.h |
Adds visitor dispatch for table literals. |
endToEndTests/test/queries/TableLiteral.json |
Verifies a successful table-literal query. |
endToEndTests/test/invalidQueries/tableLiteralMixedTypes.json |
Verifies rejection of mixed column types. |
documentation/query_documentation.md |
Documents table syntax, cell restrictions, and typing. |
Review effort: Balanced
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.
resolves #1380
Summary
Adds a
table(...)function to SaneQL to write a small, fixed table inline in a query:INT64; use casts for others (1::int32,null::string). A barenullin the first row is rejected because it leaves the type undetermined.TableLiteralNodesource node. The Arrow table is built at plan time, so cell errors are reported as query errors (HTTP 400).PR Checklist