You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by Mehant Baid <ba...@gmail.com> on 2014/04/26 13:06:32 UTC
Review Request 20743: Support extract functions in a query
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20743/
-----------------------------------------------------------
Review request for drill.
Bugs: DRILL-516
https://issues.apache.org/jira/browse/DRILL-516
Repository: drill-git
Description
-------
Optiq rewrites the extract function as div, mod based on the data types. Since Drill does not know about the data type we cannot rewrite the extract function. This patch passes a custom convertlet to Optiq which would treat extract as a normal function and not rewrite it.
Diffs
-----
exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillOptiq.java f46f012
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillConvertletTable.java PRE-CREATION
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillExtractConvertlet.java PRE-CREATION
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlWorker.java 8892a8f
exec/java-exec/src/test/java/org/apache/drill/TestTpchPlanning.java 7327c67
Diff: https://reviews.apache.org/r/20743/diff/
Testing
-------
Manual testing using sqlline.
Added tpch07 test back in TestTpchPlanning.
Couldn't add tpch08, tpch09 back because they are now hitting "cannot plan exception".
Thanks,
Mehant Baid