-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29648/#review67029
-----------------------------------------------------------


A few comments: 
 - We should also support casting empty string to Decimal type since that is 
used often
 - Why is the option defined in ExecConstants but is called 
planner.safe_cast_varchar ? Also, what is the rationale for choosing the prefix 
'safe' ?
 - Is it necessary to have separate template files for nullable and 
non-nullable cast if the only difference is in the Holder type for the input ? 
 - Are there any unit tests ? We will need to identify which cases the new Cast 
function gets applied because there's a dependency on Project pushdown such 
that the Project is above the Scan.


common/src/main/java/org/apache/drill/common/expression/fn/CastFunctions.java
<https://reviews.apache.org/r/29648/#comment110856>

    Can you import the DataMode class instead of the fully qualified reference 
here ?


- Aman Sinha


On Jan. 7, 2015, 2:12 a.m., Sean Hsuan-Yi Chu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29648/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2015, 2:12 a.m.)
> 
> 
> Review request for drill, Aman Sinha and Jinfeng Ni.
> 
> 
> Bugs: DRILL-1874
>     https://issues.apache.org/jira/browse/DRILL-1874
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> Users can choose to use safe (for varchar inputs)/default cast functions by 
> setting system variable ("alter session set `planner.safe_cast_varchar` = 
> true;").
> 
> Move the cast function replacement to "FunctionImplementationRegistry.java"
> 
> Add comments, Clean Codes
> 
> 
> Diffs
> -----
> 
>   
> common/src/main/java/org/apache/drill/common/expression/fn/CastFunctions.java 
> 61d149d 
>   exec/java-exec/src/main/codegen/data/Casts.tdd 36c90c9 
>   
> exec/java-exec/src/main/codegen/templates/SafeCastFromNonnullableFunctions.java
>  PRE-CREATION 
>   
> exec/java-exec/src/main/codegen/templates/SafeCastFromNullableFunctions.java 
> PRE-CREATION 
>   exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java 
> b390cd5 
>   
> exec/java-exec/src/main/java/org/apache/drill/exec/expr/ExpressionTreeMaterializer.java
>  0f40958 
>   
> exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/FunctionImplementationRegistry.java
>  055fdfa 
>   
> exec/java-exec/src/main/java/org/apache/drill/exec/server/DrillbitContext.java
>  165d5f3 
>   
> exec/java-exec/src/main/java/org/apache/drill/exec/server/options/SystemOptionManager.java
>  34729e2 
>   
> exec/java-exec/src/main/java/org/apache/drill/exec/store/text/DrillTextRecordReader.java
>  e0cce8b 
> 
> Diff: https://reviews.apache.org/r/29648/diff/
> 
> 
> Testing
> -------
> 
> unit tests,
> functional tests,
> tpch tests
> 
> 
> Thanks,
> 
> Sean Hsuan-Yi Chu
> 
>

Reply via email to