viirya commented on PR #5844: URL: https://github.com/apache/iceberg/pull/5844#issuecomment-1256717613
That was what I got from reading the Hive source code (https://github.com/apache/hive/blob/23c356f0b7c71e7c8fb9663c2badb83d67345cc0/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java#L3146). It looks like older thrift client treats `isSet` for a variable differently (default value is considered as true for `isSet`) than newer version. But in Hive test mode, client and server version should be matched, so once it finds a variable (operation type?) is set, but the value is `DataOperationType.UNSET`, it means the value is not set properly so it will throw an exception. But in our case, the reason doesn't apply. I just checked some other Hive code like https://github.com/apache/hive/blob/50fff5a3962d662e1b00287a1f5f6e8d3283523f/iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveShell.java#L214. It may be more accurate? ```java // set to false so that TxnManager#checkLock does not throw exception when using UNSET data type operation // in the requested lock component hiveConf.setBoolVar(HiveConf.ConfVars.HIVE_IN_TEST, false); ``` Somehow I'm not familiar with Hive internal though. This is from what I read from Hive source code and experiment towards running Iceberg unit tests in Spark. -- 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]
