You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cuDF): Add CudfExpression interface to allow nesting of cuDF AST and cuDF standalone functions (facebookincubator#15145)
Summary:
This PR adds the following features in cuDF based expression evaluation.
1. `CudfExpression` class which is extended to implement cuDF based AST expression evaluation and standalone cuDF functions based evaluations. This allows for arbitrary nesting of AST and cudf functions. Previously only one level of nesting was supported and only AST could nest functions based evaluation. This class will be used in the future to add in JIT based evaluation without changing ast or function expressions.
2. Function registration: Now `CudfFunction`s can be registered without adding a corresponding entry in AST's pushExprToTree.
3. Expressions now return `ColumnOrView`. This puts the onus on the caller for materialization if the expression only refers to a field. This makes accessing nested fields zero-copy.
4. Expression evaluator registration: Now ASTExpression can be optionally not registered to force standalone function based evaluation. Registration also takes a priority value to prioritize one type of expression translation over the other. In case of duplicate functionality e.g when replacing a velox Expr arithmetic binary op, one can prioritize replacing with cudf AST over cudf::binary_operation
This PR also refactors SubfieldFilterToAST converter and ASTExpression into separate source files.
Contributes to facebookincubator#14149
Pull Request resolved: facebookincubator#15145
Reviewed By: kgpai
Differential Revision: D85887084
Pulled By: kevinwilfong
fbshipit-source-id: 4e0785e60b453a796cd1aed2e3c6eb08cac875ac
Copy file name to clipboardExpand all lines: velox/docs/configs.rst
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1143,6 +1143,14 @@ Note: These configurations are experimental and subject to change.
1143
1143
- string
1144
1144
- ""
1145
1145
- The prefix to use for the function names in cuDF.
1146
+
* - cudf.ast_expression_enabled
1147
+
- bool
1148
+
- true
1149
+
- If true, enable using cuDF AST-based expression evaluation when supported.
1150
+
* - cudf.ast_expression_priority
1151
+
- integer
1152
+
- 100
1153
+
- Priority of cuDF AST expressions. Higher value wins when multiple cuDF execution options are available for the same Velox expression. Standalone cuDF functions have priority 50. If enabled, with a default priority of 100, AST will be chosen as replacement for cudf execution.
0 commit comments