kgyrtkirk commented on a change in pull request #960: HIVE-23030 ds rollup union
URL: https://github.com/apache/hive/pull/960#discussion_r397642048
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/SqlFunctionConverter.java
##########
@@ -468,6 +470,13 @@ private static String getName(GenericUDF hiveUDF) {
);
registerFunction("date_add", HiveDateAddSqlOperator.INSTANCE,
hToken(HiveParser.Identifier, "date_add"));
registerFunction("date_sub", HiveDateSubSqlOperator.INSTANCE,
hToken(HiveParser.Identifier, "date_sub"));
+
+ DataSketchesFunctions.registerCalciteFunctions(this);
+ }
+
+ @Override
+ public void accept(Pair<String, SqlOperator> t) {
+ registerDuplicateFunction(t.left, t.right, hToken(HiveParser.Identifier,
t.left));
Review comment:
The other register method gets into reading the annotation on the `UDF`
class looking for its name - for DS functions it will either bump into an NPE
or came up with a completely different name....
This behaviour is really wierd because it have got the udf name as argument.
the `registerDuplicateFunction` only registers the function....I think the
other method should be investigated why it interrogates UDF annotations - I
think the name `registerDuplicateFunction` is an unlucky name...it should be
renamed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]