stiga-huang commented on code in PR #5688: URL: https://github.com/apache/hive/pull/5688#discussion_r1986778776
########## standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java: ########## @@ -2064,6 +2068,7 @@ public String toString() { ConfVars.DATANUCLEUS_TRANSACTION_ISOLATION, ConfVars.DATANUCLEUS_USE_LEGACY_VALUE_STRATEGY, ConfVars.DATANUCLEUS_QUERY_SQL_ALLOWALL, + ConfVars.DATANUCLEUS_QUERY_JDOQL_ALLOWALL, Review Comment: I think they are different. Without setting `datanucleus.query.jdoql.allowAll` to true, we will hit this exception: ``` 2025-03-10T09:48:00,444 ERROR [DB-Notification-Cleaner] metastore.ObjectStore: Unable to delete batch of NotificationLog events javax.jdo.JDOUserException: JDOQL Single-String query should always start with SELECT at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:635) ~[datanucleus-api-jdo-5.2.8.jar:?] at org.datanucleus.api.jdo.JDOPersistenceManager.newQuery(JDOPersistenceManager.java:1309) ~[datanucleus-api-jdo-5.2.8.jar:?] at org.datanucleus.api.jdo.JDOPersistenceManager.newQuery(JDOPersistenceManager.java:1247) ~[datanucleus-api-jdo-5.2.8.jar:?] at org.apache.hadoop.hive.metastore.ObjectStore.doCleanNotificationEvents(ObjectStore.java:12231) ~[hive-standalone-metastore-3.1.3000.7.3.1.0-160.jar:3.1.3000.7.3.1.0-SNAPSHOT] at org.apache.hadoop.hive.metastore.ObjectStore.cleanOlderEvents(ObjectStore.java:12175) ~[hive-standalone-metastore-3.1.3000.7.3.1.0-160.jar:3.1.3000.7.3.1.0-SNAPSHOT] at org.apache.hadoop.hive.metastore.ObjectStore.cleanNotificationEvents(ObjectStore.java:12161) ~[hive-standalone-metastore-3.1.3000.7.3.1.0-160.jar:3.1.3000.7.3.1.0-SNAPSHOT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_432] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_432] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_432] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_432] at org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:97) ~[hive-standalone-metastore-3.1.3000.7.3.1.0-160.jar:3.1.3000.7.3.1.0-SNAPSHOT] at com.sun.proxy.$Proxy33.cleanNotificationEvents(Unknown Source) ~[?:?] at org.apache.hive.hcatalog.listener.DbNotificationListener$CleanerThread.run(DbNotificationListener.java:1354) ~[hive-hcatalog-server-extensions-3.1.3000.7.3.1.0-160.jar:3.1.3000.7.3.1.0-160] Caused by: org.datanucleus.exceptions.NucleusUserException: JDOQL Single-String query should always start with SELECT at org.datanucleus.query.JDOQLSingleStringParser$Compiler.compileSelect(JDOQLSingleStringParser.java:148) ~[datanucleus-core-5.2.10.jar:?] at org.datanucleus.query.JDOQLSingleStringParser$Compiler.compile(JDOQLSingleStringParser.java:119) ~[datanucleus-core-5.2.10.jar:?] at org.datanucleus.query.JDOQLSingleStringParser$Compiler.access$000(JDOQLSingleStringParser.java:108) ~[datanucleus-core-5.2.10.jar:?] at org.datanucleus.query.JDOQLSingleStringParser.parse(JDOQLSingleStringParser.java:100) ~[datanucleus-core-5.2.10.jar:?] at org.datanucleus.store.query.AbstractJDOQLQuery.<init>(AbstractJDOQLQuery.java:122) ~[datanucleus-core-5.2.10.jar:?] at org.datanucleus.store.rdbms.query.JDOQLQuery.<init>(JDOQLQuery.java:159) ~[datanucleus-rdbms-5.2.10.jar:?] at org.datanucleus.store.rdbms.RDBMSStoreManager.newQuery(RDBMSStoreManager.java:1192) ~[datanucleus-rdbms-5.2.10.jar:?] at org.datanucleus.api.jdo.JDOPersistenceManager.newQuery(JDOPersistenceManager.java:1300) ~[datanucleus-api-jdo-5.2.8.jar:?] ... 11 more ``` The code also indicates only `datanucleus.query.jdoql.allowAll` is checked: https://github.com/datanucleus/datanucleus-core/blob/c48c526ae7c154302904e906bcb809993c2a04ab/src/main/java/org/datanucleus/store/query/AbstractJDOQLQuery.java#L112-L116 -- 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