Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glue partition predicates with IS (NOT) NULL fail on some types when assume-canonical-partition-keys is true #13124

Closed
ebyhr opened this issue Jul 8, 2022 · 1 comment · Fixed by #13138
Assignees
Labels
bug Something isn't working

Comments

@ebyhr
Copy link
Member

ebyhr commented Jul 8, 2022

Currently, GlueExpressionUtil generates {column name} = '__HIVE_DEFAULT_PARTITION__' expression regardless of the column types, but Glue throws an exception if the type doesn't accept string value. This issue happens when hive.metastore.glue.assume-canonical-partition-keys is enabled.

io.trino.spi.TrinoException: Failed to fetch partitions from Glue Data Catalog

	at io.trino.plugin.hive.metastore.glue.GlueHiveMetastore.getPartitions(GlueHiveMetastore.java:785)
	at io.trino.plugin.hive.metastore.glue.GlueHiveMetastore.getPartitionNamesByFilter(GlueHiveMetastore.java:757)
	at io.trino.plugin.hive.metastore.glue.TestHiveGlueMetastore.doGetPartitionsFilterTest(TestHiveGlueMetastore.java:1313)
	at io.trino.plugin.hive.metastore.glue.TestHiveGlueMetastore.testGetPartitionsFilterSmallIntFilterEqualsOrIsNullWithValue(TestHiveGlueMetastore.java:894)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at org.testng.TestRunner.privateRun(TestRunner.java:756)
	at org.testng.TestRunner.run(TestRunner.java:610)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:387)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
	at org.testng.SuiteRunner.run(SuiteRunner.java:289)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1293)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1218)
	at org.testng.TestNG.runSuites(TestNG.java:1133)
	at org.testng.TestNG.run(TestNG.java:1104)
	at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
	at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
Caused by: java.util.concurrent.ExecutionException: io.trino.spi.TrinoException: com.amazonaws.daylight.core.exceptions.InvalidPartitionValueException: For input string: "__HIVE_D" is not an integer. (Service: AWSGlue; Status Code: 400; Error Code: InvalidInputException; Request ID: 6a7c487f-7b61-48d9-941e-15df77cedcbe; Proxy: null)
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at io.trino.plugin.hive.metastore.glue.GlueHiveMetastore.getPartitions(GlueHiveMetastore.java:778)
	... 27 more

Relates to #13122 (comment)

@duhanmin
Copy link

Solved, but =null still cannot be used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants