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 2023/03/29 10:47:00 UTC
[jira] [Closed] (HUDI-3818) hudi doesn't support bytes column as primary key
[ https://issues.apache.org/jira/browse/HUDI-3818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sagar Sumit closed HUDI-3818.
-----------------------------
Resolution: Fixed
> hudi doesn't support bytes column as primary key
> ------------------------------------------------
>
> Key: HUDI-3818
> URL: https://issues.apache.org/jira/browse/HUDI-3818
> Project: Apache Hudi
> Issue Type: Bug
> Components: hive
> Reporter: rex xiong
> Assignee: rex xiong
> Priority: Critical
> Labels: pull-request-available
> Fix For: 0.13.1
>
>
> when use bytes column as primary key, hudi will generate fixed hoodie key, then upserts will only insert one row.
> {code:java}
> scala> sql("desc extended binary_test1").show()
> +--------------------+--------------------+-------+
> | col_name| data_type|comment|
> +--------------------+--------------------+-------+
> | _hoodie_commit_time| string| null|
> |_hoodie_commit_seqno| string| null|
> | _hoodie_record_key| string| null|
> |_hoodie_partition...| string| null|
> | _hoodie_file_name| string| null|
> | id| binary| null|
> | name| string| null|
> | dt| string| null|
> | | | |
> |# Detailed Table ...| | |
> | Database| default| |
> | Table| binary_test1| |
> | Owner| root| |
> | Created Time|Sat Apr 02 13:28:...| |
> | Last Access| UNKNOWN| |
> | Created By| Spark 3.2.0| |
> | Type| MANAGED| |
> | Provider| hudi| |
> | Table Properties|[last_commit_time...| |
> | Statistics| 435194 bytes| |
> +--------------------+--------------------+-------+
> scala> sql("select * from binary_test1").show()
> +-------------------+--------------------+--------------------+----------------------+--------------------+--------------------+---------+--------+
> |_hoodie_commit_time|_hoodie_commit_seqno| _hoodie_record_key|_hoodie_partition_path| _hoodie_file_name| id| name| dt|
> +-------------------+--------------------+--------------------+----------------------+--------------------+--------------------+---------+--------+
> | 20220402132927590|20220402132927590...|id:java.nio.HeapB...| |1a06106e-5e7a-4e6...|[03 45 6A 00 00 0...|Mary Jane|20220401|
> +-------------------+--------------------+--------------------+----------------------+--------------------+--------------------+---------+--------+{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)