Skip to content

Commit

Permalink
ARROW-14143: [IR] [C++] Add explicit cast node to IR
Browse files Browse the repository at this point in the history
Closes apache#11244 from cpcloud/ARROW-14143

Authored-by: Phillip Cloud <[email protected]>
Signed-off-by: Benjamin Kietzman <[email protected]>
  • Loading branch information
cpcloud authored and bkietz committed Oct 4, 2021
1 parent 86eea9c commit 73f9386
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 5 deletions.
94 changes: 89 additions & 5 deletions cpp/src/generated/Expression_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions experimental/computeir/Expression.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,18 @@ table WindowCall {
upper_bound: Bound (required);
}

/// A cast expression
table Cast {
/// The expression to cast
operand: Expression (required);
/// The type to cast to. This value is a `Field` to allow complete representation
/// of arrow types.
///
/// `Type` is unable to completely represent complex types like lists and
/// maps.
to: org.apache.arrow.flatbuf.Field (required);
}

/// Various expression types
///
/// WindowCall is a separate variant
Expand All @@ -194,6 +206,7 @@ union ExpressionImpl {
ConditionalCase,
SimpleCase,
WindowCall,
Cast,
}

/// Expression types
Expand Down

0 comments on commit 73f9386

Please sign in to comment.