-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEA] Support date cast and date_sub as AST expressions #7030
Comments
This request is more about asking cast-as-date and date_sub to be supported as AST expressions than the join itself. If those were supported by AST then the join would have been on the GPU. |
Note if this issue is resolved, then the integration test used in #7037 will need to be updated as it currently relies on this running on the CPU (an unfortunate limitation of the testing scenario involved). |
I think we need to be clear about a lot of what is being asked here. Casting a timestamp to a date is complex, especially if a timezone is involved. spark-rapids/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuCast.scala Lines 628 to 633 in a056f16
But even without a timezone it is not likely to ever be an AST operation. Date differences, however, should be a subtraction operation. spark-rapids/sql-plugin/src/main/scala/org/apache/spark/sql/rapids/datetimeExpressions.scala Line 1241 in a056f16
So putting that in AST should be super simple to do, if we can get CUDF to ignore the logical type and just look at the physical type of the data. That said I think the simplest thing for us to do to be able to support complex operations is to finish #9635 It added in some basic support for rewriting joins so part of it is on the AST and other parts are not. But it only did it for a BroadcastNestedLoopJoin. We really should just extend that out to all join types and do some performance testing to see how well it performs. |
I wish we can support Left Semi + BNLJ.
eg:
Not-supported-messages:
The text was updated successfully, but these errors were encountered: