----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33343/#review80643 -----------------------------------------------------------
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/ChainedHashTable.java <https://reviews.apache.org/r/33343/#comment130779> If we have int a = bigint b , both sides will be hash distributed as doubles, then when we are doing the join (either hash or merge join), we will ignore that they were distributed as double and just implict cast the int to bigint ...is that correct ? Any thoughts on the performance impact ? Previously the comparison function would have taken care of comparing different types, now it must go through implicit casting. exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java <https://reviews.apache.org/r/33343/#comment130778> Since this method is called for left and right expressions, it would be useful to know if the materialization error occurred for left or right exprs in the join condition. exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestJoinAdvanced.java <https://reviews.apache.org/r/33343/#comment130780> It would be good to have a test with join conditions on 2 or more columns that require implicit casting - WHERE t1.a1 = t2.a2 AND t1.b1 = t2.b2 AND t1.c1 = t2.c2 where a1:int, b1:bigint, b1:float, b2:double, c1:double, c2: varchar with numeric double values. This does not necesarily have to be unit test but see if you can get it included either as unit or functional test. - Aman Sinha On April 19, 2015, 9:34 p.m., Mehant Baid wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/33343/ > ----------------------------------------------------------- > > (Updated April 19, 2015, 9:34 p.m.) > > > Review request for drill and Aman Sinha. > > > Repository: drill-git > > > Description > ------- > > DRILL-2753 aims to remove the comparision function implementations that have > different data type inputs (Look at the JIRA for more details). As a result > we need to modify hash join and merge join so that when we have different > types in the join condition they can apply implicit casts to do the > comparison. We have resolved the issue of distribution (as part of > DRILL-2244) and so different data types with the same numeric value will be > correctly distributed to the same node. > > As part of this change we materialize the expression in the join condition, > check if the types are different and apply casts if necessary. > > > Diffs > ----- > > > exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/ChainedHashTable.java > 9df67d8 > > exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinUtils.java > 7fa79a1 > > exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java > 8fce52e > > exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestHashJoinAdvanced.java > 796f6fe > > exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestJoinAdvanced.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/33343/diff/ > > > Testing > ------- > > Added unit tests plus ran existing tests with different data types in join > conditions. > > > Thanks, > > Mehant Baid > >
