deniskuzZ commented on code in PR #5703:
URL: https://github.com/apache/hive/pull/5703#discussion_r2095788677
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java:
##########
@@ -2411,6 +2415,38 @@ 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) {
+ 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("{} must inherit from the GenericUDF", udf);
Review Comment:
@ryukobayashi, please update the HiveConf description with that note:
````
HIVE_VECTOR_ADAPTOR_CUSTOM_UDF_WHITELIST("hive.vectorized.adaptor.custom.udf.whitelist",
"",
"A comma-separated list of custom UDFs allowed to operate in vectorized
mode " +
"when hive.vectorized.adaptor.usage.mode is set to chosen.\n" +
"Only Generic UDFs are supported for whitelisting; ensure that each custom
UDF class extends GenericUDF"),
````
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]