> On Sept. 18, 2018, 10:35 p.m., Ashutosh Chauhan wrote: > > ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFSurrogateKey.java > > Lines 55 (patched) > > <https://reviews.apache.org/r/68744/diff/2/?file=2090177#file2090177line55> > > > > do udf.setWriteId(3) and call runAndVerifyConst() again to get coverage > > on writeId too.
I don't get this, isn't writeId supposed to be set only once for the function? Should I add some mechanism to catch if it was set twice, and throw an exception? - Miklos ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68744/#review208739 ----------------------------------------------------------- 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 > >