> On Feb. 7, 2018, 2:40 a.m., Sahil Takiar wrote: > > ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/PosModLongToLong.java > > Lines 46-48 (patched) > > <https://reviews.apache.org/r/65500/diff/5/?file=1953578#file1953578line46> > > > > is there a way to do this check just once rather than for each value?
Made it slightly better by removing the need for null check and adding method call in getTypeName(). You would still need a switch on the typename though. Having a couple of booleans can get rid of switch but in terms of number of comparisons it would still be at the same cost (in fact switch is better in this case I believe) - Vihang ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65500/#review196967 ----------------------------------------------------------- On Feb. 7, 2018, 7:13 a.m., Vihang Karajgaonkar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/65500/ > ----------------------------------------------------------- > > (Updated Feb. 7, 2018, 7:13 a.m.) > > > Review request for hive, Aihua Xu, Gopal V, Matt McCline, and Sahil Takiar. > > > Bugs: HIVE-18421 > https://issues.apache.org/jira/browse/HIVE-18421 > > > Repository: hive-git > > > Description > ------- > > See JIRA. > > > Diffs > ----- > > common/src/java/org/apache/hadoop/hive/conf/HiveConf.java > 99e8457c7b2d506cfc7c71ca18bc678fe5cdf049 > ql/src/gen/vectorization/ExpressionTemplates/ColumnArithmeticColumn.txt > b5011c3adcedf8974d3241994733e0021a851cbd > ql/src/gen/vectorization/ExpressionTemplates/ColumnArithmeticScalar.txt > cbec1abcc2b66f3ffc91b4778daf5017eff4379d > ql/src/gen/vectorization/ExpressionTemplates/ColumnDivideColumn.txt > 3e955578933dd7990939865527c3bd11023b3a90 > ql/src/gen/vectorization/ExpressionTemplates/ColumnUnaryMinus.txt > f0ab4711e79c8a1bfceebcde9a3dda2b4e15a38a > ql/src/gen/vectorization/ExpressionTemplates/ScalarArithmeticColumn.txt > e95baa6199e138a4e0c009e62ce495b626e5909c > ql/src/gen/vectorization/TestTemplates/TestClass.txt > 62c58fb293fbe2d4d948c6a3409ee31466424a02 > > ql/src/gen/vectorization/TestTemplates/TestColumnColumnOperationVectorExpressionCheckedEvaluation.txt > PRE-CREATION > > ql/src/gen/vectorization/TestTemplates/TestColumnScalarOperationVectorExpressionCheckedEvaluation.txt > PRE-CREATION > > ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorExpressionDescriptor.java > bbe78c8720e16163b642f54d27fdf6b65ba9850b > ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java > 8264e8ad285deac29424bd1cb0bf626436d47c75 > > ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongColModuloLongColumnChecked.java > PRE-CREATION > > ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/OverflowUtils.java > PRE-CREATION > > ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/PosModDoubleToDouble.java > 75ec419aa9ea5c3fcc5e7314fbac756d6a5d36d5 > > ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/PosModLongToLong.java > 6b4d714c9a79a55593c4a4d254267a3035abb10f > > ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorExpression.java > 710165033627b33d9b238cc847dbac36c07ee5f6 > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPMinus.java > af8552caa02f2896f393a5099abdb1ae5abd4c16 > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPMod.java > e2a638da518a2071ff15b8da6899646ec45c832a > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPMultiply.java > 99d1ad7f203d946fd89d26074bd0e00dec8b3a1a > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPNegative.java > 4e45788936559bbb7cfe65e9ffd083747b37dcc2 > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPPlus.java > b1200e673e6b470b5fd1cc856270a6da615f16cb > > ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestUnaryMinus.java > ab6f6b79316818cac458390dc2d087091057c63b > > ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorArithmeticExpressions.java > 02dec659ce421eef06f924bb6973070878d57be3 > > ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorMathFunctions.java > 1950e92bd6d5e4f818588e691db30cd28193c716 > ql/src/test/queries/clientpositive/vectorization_numeric_overflows.q > PRE-CREATION > ql/src/test/results/clientpositive/vectorization_numeric_overflows.q.out > PRE-CREATION > vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java > 657ea34e11f7465e6c77d45128b298e7326a057b > vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorTestCode.java > d97646f8b1c4a074da59b4685939fc4359c9c30d > > > Diff: https://reviews.apache.org/r/65500/diff/6/ > > > Testing > ------- > > HiveQA > > > Thanks, > > Vihang Karajgaonkar > >