Skip to content

Commit

Permalink
feat: Add VirtualExpressionTable definition and use it in ReadRel
Browse files Browse the repository at this point in the history
This enables expressing Virtual table having values as expression
  • Loading branch information
anshuldata committed Sep 26, 2024
1 parent 1f3354d commit 14eb28c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
8 changes: 7 additions & 1 deletion proto/substrait/algebra.proto
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ message ReadRel {

// Definition of which type of scan operation is to be performed
oneof read_type {
VirtualTable virtual_table = 5;
VirtualTable virtual_table = 5 [deprecated = true];
LocalFiles local_files = 6;
NamedTable named_table = 7;
ExtensionTable extension_table = 8;
VirtualExpressionTable virtual_expression_table = 9;
}

// A base table. The list of string is used to represent namespacing (e.g., mydb.mytable).
Expand All @@ -91,6 +92,11 @@ message ReadRel {
repeated Expression.Literal.Struct values = 1;
}

// A table composed of expressions.
message VirtualExpressionTable {
repeated Expression values = 1;
}

// A stub type that can be used to extend/introduce new table types outside
// the specification.
message ExtensionTable {
Expand Down
10 changes: 10 additions & 0 deletions site/docs/relations/logical_relations.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ is encoded as records consisting of literal values.
| -------- | ----------- | -------- |
| Data | Required | Required |

#### Virtual Expression Table

A virtual expression table is a table whose contents are embedded in the plan itself. The table data
is encoded as records consisting of expression values.

| Property | Description | Required |
| -------- | ----------- | -------- |
| Data | Required | Required |


#### Named Table

A named table is a reference to data defined elsewhere. For example, there may be a catalog
Expand Down

0 comments on commit 14eb28c

Please sign in to comment.