-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref: Simplify expressions in physical plan (#782)
Change expressions to always produce the result of the expression. This simplifies evaluation, without affecting the expressiviness: 1. We can now produce a primitive result (such as a boolean or integer) if that is the type of the final expression. 2. We can still produce records by adding a `record` expression to the end (which is the standard way of creating intermediate records). 3. We can still reference parts of a record input using `FieldRef`. This eliminates the weird "some expressions are marked as output" pattern. It also means that we can operate on `ArrayRef` generally and use `DataType` as the type, instead of sometimes using `RecordBatch` and `SchemaRef`. Other smaller changes in this PR: - Move the `Expressions` out of the `StepKind`. This allows the `StepKind` to serve as an identifier of the step, regardless of the expressions it computes, simplifying some of the de-duplication work in the logical-to-physical compilation. - Rename the `column` expression to `input`, since it accesses the input data to the expression evaluation. - Addition of a method to "intern" expression names, replacing a `&str` with `&'static str` for expression operators available in the binary.
- Loading branch information
1 parent
dd520a2
commit 0e4bc08
Showing
25 changed files
with
299 additions
and
325 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.