Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Drill, mail # dev - Review Request 16490: DRILL_259 : implicit cast support in drill.


+
Jinfeng Ni 2013-12-27, 21:42
+
Jinfeng Ni 2013-12-31, 01:36
Copy link to this message
-
Re: Review Request 16490: DRILL_259 : implicit cast support in drill.
Timothy Chen 2014-01-03, 18:56

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

exec/java-exec/src/main/java/org/apache/drill/exec/expr/ExpressionTreeMaterializer.java
<https://reviews.apache.org/r/16490/#comment59457>

    What's the reason for removing the validate?

exec/java-exec/src/main/java/org/apache/drill/exec/expr/ImplicitCastBuilder.java
<https://reviews.apache.org/r/16490/#comment59503>

    "exchangable"

exec/java-exec/src/main/java/org/apache/drill/exec/resolver/DefaultFunctionResolver.java
<https://reviews.apache.org/r/16490/#comment59504>

     this is quite some funky formating :)

exec/java-exec/src/main/java/org/apache/drill/exec/resolver/FunctionResolverFactory.java
<https://reviews.apache.org/r/16490/#comment59505>

    Remove?
    
    And also I don't see where OperationFunctionResolver is being used, so the default or all function resolving is using the default, which looks for least cost cast right?

exec/java-exec/src/main/java/org/apache/drill/exec/resolver/TypeCastRules.java
<https://reviews.apache.org/r/16490/#comment59507>

    This uses epoch time?

exec/java-exec/src/main/java/org/apache/drill/exec/resolver/TypeCastRules.java
<https://reviews.apache.org/r/16490/#comment59510>

    Remove?
    
    And I don't see how dmPrecedenceMap is ever being used?
- Timothy Chen
On Dec. 31, 2013, 1:36 a.m., Jinfeng Ni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16490/
> -----------------------------------------------------------
>
> (Updated Dec. 31, 2013, 1:36 a.m.)
>
>
> Review request for drill.
>
>
> Repository: drill-git
>
>
> Description
> -------
>
> This patch is to provide implicit cast support in Drill.
>
> The code change is mainly in two areas:
>
> 1. Function Resolver and related type cast rules : used to choose the best matched function implementation corresponding to a function name and its list of argument types. Type promotion would be implied, if there is no function implementation whose parameter types exactly match the argument types. Type promotion is implemented using the type precedence list. Type promotion is checked against a rule which will help implement a isCastable(from, to) method.  
> New files: 1) DefaultFunctionResolver.java
>            2) FunctionResolver
>            3) FunctionResolverFactor.java
>            4) OperatorFunctionResolver.java : reserved for future use.
>            5) ResolverTypePrecedence.java
>            6) TypeCastRules.java
>            7) UDFFunctionResolver.java : reserved for future use.
>
> 2. ImplicitCastBuilder : to inject implicit cast whenever necessary. After the function resolver returns a best matched function implementation, if the param type does not match the argument type, an implicit cast will be inserted on top of the argument.
>    - ImplicitCastBuilder uses a visitor to inject implicit cast.
>    - ImplicitCastBuilder will be part of ExpressionTreeMateralizer, after we materialize the expression tree.
>    - ExpressionValidator will be called after implicit cast is injected, in stead of after expression materialization.
>    - Because ImplicitCastBuilder requires a FunctionImplementationRegistry (to decide the best matched function implementation), and ImplicitCastBuilder is part of ExpressionTreeMaterializer, all the call of ExpressionTreeMaterializer is modified by adding a FunctionImplementationRegistry.
>
> New files or modified files:
>             1)CastFunctionDefs.java
>             2)ExpressionTreeMaterializer.java
>             3)ImplicitCastBuilder.java
>             4)DrillFuncHolder.java : expose param type and size
>             5)FunctionImplementationRegistry.java : expose the list of function implementation.
>             6) other files because of the change to ExpressionTreeMaterializer.java.
+
Jinfeng Ni 2014-01-03, 19:46
+
Jinfeng Ni 2014-01-03, 22:37
+
Yash Sharma 2014-01-04, 16:17
+
Jinfeng Ni 2014-01-03, 22:58
+
Jason Altekruse 2014-01-04, 00:20
+
Jason Altekruse 2014-01-04, 18:02
+
Jason Altekruse 2014-01-04, 17:48
+
Jacques Nadeau 2014-01-14, 16:51