You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Sagar Sumit (Jira)" <ji...@apache.org> on 2022/09/16 15:37:00 UTC
[jira] [Created] (HUDI-4860) Presto/Trino Cannot parse partition value '\N' of type 'integer' for partition column
Sagar Sumit created HUDI-4860:
---------------------------------
Summary: Presto/Trino Cannot parse partition value '\N' of type 'integer' for partition column
Key: HUDI-4860
URL: https://issues.apache.org/jira/browse/HUDI-4860
Project: Apache Hudi
Issue Type: Bug
Reporter: Sagar Sumit
Assignee: Sagar Sumit
Hudi has the new {{_{_}HIVE_DEFAULT_PARTITION{_}_}} as the fallback one.
Presto/Trino seem to covert it to `\N`. [https://github.com/codope/trino/blob/f7c969c1cc6a10f601ca522a7161384a7bf56996/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HivePartitionKey.java#L44]
It works with this fix
{code:java}
git diff
diff --git a/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/HudiPageSourceProvider.java b/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/HudiPageSourceProvider.java
index 1c72175860..d10dbbaac7 100644
--- a/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/HudiPageSourceProvider.java
+++ b/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/HudiPageSourceProvider.java
@@ -159,7 +159,7 @@ public class HudiPageSourceProvider
String partitionValue,
TypeSignature partitionDataType)
{
- if (isNull(partitionValue)) {
+ if (isNull(partitionValue) || partitionValue.equals("\\N")) {
return Optional.empty();
}
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)