----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29648/#review67349 -----------------------------------------------------------
exec/java-exec/src/main/codegen/data/Casts.tdd <https://reviews.apache.org/r/29648/#comment111352> Why do we need to use 'Safe' keyword in all the names here ? It's not necessarily 'safe' to do this casting (the default option value is false). exec/java-exec/src/main/codegen/templates/Decimal/CastVarCharDecimal.java <https://reviews.apache.org/r/29648/#comment111357> Good that you were able to consolidate the new cast function with the existing decimal cast functions. exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java <https://reviews.apache.org/r/29648/#comment111354> I am not completely sure if exec.functions is the right namespace for this option...you might want to get additional feedback. exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java <https://reviews.apache.org/r/29648/#comment111347> Could you create a separate test class TestCastEmptyString for this set of tests since there are quite a few that they deserve their own class. You could separate the nullable and non-nullable inputs into two separate tests. - Aman Sinha On Jan. 9, 2015, 12:14 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. 9, 2015, 12:14 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/CastVarCharToNullableNumeric.java > PRE-CREATION > exec/java-exec/src/main/codegen/templates/Decimal/CastVarCharDecimal.java > acf2f1d > 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 > exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java > 30be58a > exec/java-exec/src/test/resources/emptyStrings.csv PRE-CREATION > > Diff: https://reviews.apache.org/r/29648/diff/ > > > Testing > ------- > > unit tests, > functional tests, > tpch tests > > > Thanks, > > Sean Hsuan-Yi Chu > >
