> On Sept. 18, 2018, 8:58 p.m., Antal Sinkovits wrote: > > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFSurrogateKey.java > > Lines 116 (patched) > > <https://reviews.apache.org/r/68744/diff/1/?file=2090072#file2090072line116> > > > > You have a potential NPE here, if the execution engine is not TEZ. I > > think it should support all execution engines (MR, spark, tez) or if its > > not possible, fail fast with a more reasonable exception.
For now this function is supported only if TEZ is the execution engine. It may change later. - Miklos ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68744/#review208733 ----------------------------------------------------------- On Sept. 19, 2018, 9:28 a.m., Miklos Gergely wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/68744/ > ----------------------------------------------------------- > > (Updated Sept. 19, 2018, 9:28 a.m.) > > > Review request for hive and Ashutosh Chauhan. > > > Bugs: HIVE-20536 > https://issues.apache.org/jira/browse/HIVE-20536 > > > Repository: hive-git > > > Description > ------- > > Add new function that allows the generation of a surrogate key composed of > the write id, the task id, and an incremental row id. > > > Diffs > ----- > > ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 3f538b3 > ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java > 3309b9b > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 98448e4 > > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFSurrogateKey.java > PRE-CREATION > > ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFSurrogateKey.java > PRE-CREATION > ql/src/test/results/clientpositive/show_functions.q.out 8d41e78 > > > Diff: https://reviews.apache.org/r/68744/diff/3/ > > > Testing > ------- > > Added a new junit test for the function. > Tested it in beeline by adding one row, adding multiple rows, adding mutliple > rows to multiple tables via multuple insert (all having their own > surrogate_key column) > > > Thanks, > > Miklos Gergely > >