tugraph-analytics icon indicating copy to clipboard operation
tugraph-analytics copied to clipboard

feat: support hive 4.x connector

Open DukeWangYu opened this issue 1 month ago • 3 comments

Current engine only supports Apache Hive 3.x version. Add hive 4.x connector.

DukeWangYu avatar Nov 10 '25 06:11 DukeWangYu

Hi can I take this ? I’m new to this project but would like to take this up . Thanks

vamossagar12 avatar Nov 13 '25 01:11 vamossagar12

Hi @vamossagar12 , welcome! šŸŽ‰ Sure, feel free to work on this — I've assigned the issue to you. Let us know if you need any guidance or have questions!

Loognqiang avatar Nov 13 '25 01:11 Loognqiang

Thank you, let me take a look and get back if I have any questions .

vamossagar12 avatar Nov 14 '25 15:11 vamossagar12

hi, i made the changes but the hive connector tests are failing with

Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NoSuchFieldError: ANY_NULLABLE [in thread "main"]
	at org.apache.hadoop.hive.ql.exec.DataSketchesFunctions.registerAsHiveFunction(DataSketchesFunctions.java:172)
	at org.apache.hadoop.hive.ql.exec.DataSketchesFunctions.buildCalciteFns(DataSketchesFunctions.java:129)
	at org.apache.hadoop.hive.ql.exec.DataSketchesFunctions.<init>(DataSketchesFunctions.java:99)
	at org.apache.hadoop.hive.ql.exec.DataSketchesFunctions.<clinit>(DataSketchesFunctions.java:56)
	at org.apache.hadoop.hive.ql.exec.FunctionRegistry.<clinit>(FunctionRegistry.java:576)
	at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:361)
	at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:341)
	at org.apache.hadoop.hive.ql.metadata.Hive.<init>(Hive.java:567)
	at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:459)
	at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:446)
	at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:531)
	at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:520)
	at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:193)
	at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:107)
	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:519)
	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:471)
	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:182)
	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:154)
	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:141)
	at org.apache.geaflow.dsl.connector.hive.BaseHiveTest.executeHiveSql(BaseHiveTest.java:60)
	at org.apache.geaflow.dsl.connector.hive.HiveTableSourceTest.checkReadHive(HiveTableSourceTest.java:200)
	at org.apache.geaflow.dsl.connector.hive.HiveTableSourceTest.testReadHiveOrc(HiveTableSourceTest.java:120)
	... 22 more

It seems that this is happening due to a incompatible calcite version. I noticed that in the hive-connector pom.xml, calcite dependencies are excluded while the dependencies of calcite are coming from: https://mvnrepository.com/artifact/com.antgroup.tugraph/calcite-core

Also, it seems like for hive 4.0, the recommended calcite version should be 1.25.0+. Can you please confirm the calcite version being packaged in the com.antgroup.tugraph/calcite-core dependency? Would we need to release a new version of calcite-core?

vamossagar12 avatar Nov 19 '25 16:11 vamossagar12

@Loognqiang please let me know if my assessment is correct above.

vamossagar12 avatar Nov 21 '25 15:11 vamossagar12