----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/15871/ -----------------------------------------------------------
Review request for drill. Repository: drill-git Description ------- The main changes : 1) parser change to read expression in logical/physical plan, which may contain an explicit cast function 2) the change to find the right cast function implementation (which is generated code), to do the cast work. The syntax of explicit cast function in logical/physical plan: cast ( input_expr as target_type repeat?) for instance: cast (input_expr as BigInt). This part of code change is the first step to provide the complete explicit cast support, since there are still many other type cast that need to be added in. For instance, the auto-generated cast classes need to be complete for all legal cast, the parser part need to be complete as well. But I want to get feedback on this initial code change, to see if the flow logic makes sense or not, before I continue the rest part. Diffs ----- common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprLexer.g 76da965 common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprParser.g 7fc1651 common/src/main/java/org/apache/drill/common/expression/FunctionCall.java a8b7e01 common/src/main/java/org/apache/drill/common/expression/FunctionRegistry.java 73e1925 common/src/main/java/org/apache/drill/common/expression/OutputTypeDeterminer.java 2f583d5 common/src/main/java/org/apache/drill/common/expression/fn/CastFunctionDefs.java PRE-CREATION exec/java-exec/src/main/codegen/templates/CastFunctions.java 85a00b0 exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/DrillFuncHolder.java e001ffe exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/FunctionImplementationRegistry.java 5bbab76 exec/java-exec/src/main/java/org/apache/drill/exec/work/FragmentRunner.java d003972 exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java PRE-CREATION exec/java-exec/src/test/resources/functions/cast/testCastBigInt.json PRE-CREATION sqlparser/src/test/java/org/apache/drill/jdbc/test/FullEngineTPCHTest.java PRE-CREATION Diff: https://reviews.apache.org/r/15871/diff/ Testing ------- Unit test : TestCastFunctions.java Thanks, Jinfeng Ni
