You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Raymond Xu (Jira)" <ji...@apache.org> on 2022/09/21 15:41:00 UTC
[jira] [Closed] (HUDI-4860) Presto/Trino Cannot parse partition value '\N' of type 'integer' for partition column
[ https://issues.apache.org/jira/browse/HUDI-4860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Raymond Xu closed HUDI-4860.
----------------------------
Resolution: Fixed
> 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
> Priority: Blocker
> Labels: hudi-on-call
> Fix For: 0.12.1
>
>
> 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)