zhangbutao commented on PR #4786: URL: https://github.com/apache/hive/pull/4786#issuecomment-1868192640
@ayushtkn My bad. If a hive cluster has no any udf functions, the direct sql will faill in case of empty functionIds. `SELECT "FUNCS"."FUNC_ID", "FUNCS"."FUNC_NAME", "DBS"."NAME", "FUNCS"."CLASS_NAME", "FUNCS"."OWNER_NAME", "FUNCS"."OWNER_TYPE", "FUNCS"."CREATE_TIME", "FUNCS"."FUNC_TYPE" FROM "FUNCS" LEFT JOIN "DBS" ON "FUNCS"."DB_ID" = "DBS"."DB_ID" where "FUNCS"."FUNC_ID" in () order by "FUNCS"."FUNC_NAME" asc;` Need to return early in case of empty functionIds to avoid the invalid direct sql. Like this: https://github.com/apache/hive/blob/2d6e4a7ef4d9ed6ce997520e5fe3b6841ab5ee31/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java#L679-L683 Submit a PR to fix this, please take a look. https://github.com/apache/hive/pull/4971 Thanks. -- 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]
