deniskuzZ commented on code in PR #5703: URL: https://github.com/apache/hive/pull/5703#discussion_r2093368346
########## ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java: ########## @@ -2411,6 +2415,39 @@ private boolean getOnlyStructObjectInspectors(ReduceWork reduceWork, } } + private void addCustomUDFs(HiveConf hiveConf) { + if (hiveConf == null) { + return; + } + + String[] udfs = + HiveConf.getTrimmedStringsVar(hiveConf, HiveConf.ConfVars.HIVE_VECTOR_ADAPTOR_CUSTOM_UDF_WHITELIST); + if (udfs == null) { + return; + } + + HiveVectorAdaptorUsageMode hiveVectorAdaptorUsageMode = + HiveVectorAdaptorUsageMode.getHiveConfValue(hiveConf); + if (hiveVectorAdaptorUsageMode != HiveVectorAdaptorUsageMode.CHOSEN && + hiveVectorAdaptorUsageMode != HiveVectorAdaptorUsageMode.ALL) { + return; + } + + for (String udf : udfs) { + try { + Class<?> cls = Class.forName(udf); + if (GenericUDF.class.isAssignableFrom(cls)) { + supportedGenericUDFs.add(cls); + LOG.info("Registered custom UDF: {}", udf); + } else { + LOG.warn("Custom UDF is not extends GenericUDF: {}", udf); Review Comment: LOG.warn("Custom UDF {} must inherit from the GenericUDF", udf); -- 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. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org