rangareddy commented on issue #13466:
URL: https://github.com/apache/hudi/issues/13466#issuecomment-2994981973

   Hi @JoshuaZhuCN 
   
   I tested with the latest version of Hudi (0.15 and 1.0.2), and it worked 
without any issues. Could you please try using the latest version on your end?
   
   <img width="1255" alt="Image" 
src="https://github.com/user-attachments/assets/6a82ef37-ea70-4845-86ee-7ba2d34f6f5e";
 />
   
   **Code:**
   
   ```sh
   export SPARK_VERSION=3.5 # or 3.4, 3.3
   spark-sql --packages 
org.apache.hudi:hudi-spark$SPARK_VERSION-bundle_2.12:1.0.2 \
   --conf 'spark.serializer=org.apache.spark.serializer.KryoSerializer' \
   --conf 
'spark.sql.extensions=org.apache.spark.sql.hudi.HoodieSparkSessionExtension' \
   --conf 
'spark.sql.catalog.spark_catalog=org.apache.spark.sql.hudi.catalog.HoodieCatalog'
 \
   --conf 'spark.kryo.registrator=org.apache.spark.HoodieSparkKryoRegistrar'
   ```
   
   ```sql
   CREATE TABLE `default`.`hudi_test_3`(
     id int,
     sn string,
     vnm string,
     ts timestamp
   ) USING hudi
   TBLPROPERTIES(
     `type`='mor',
     `primaryKey` = 'id,sn', 
     `preCombineField` = 'ts',
     `hoodie.table.keygenerator.class` = 
'org.apache.hudi.keygen.ComplexKeyGenerator',
     `hoodie.index.type` = 'BUCKET',
     `hoodie.metadata.enable` = 'false',
     `hoodie.storage.layout.type` = 'BUCKET',
     `hoodie.storage.layout.partitioner.class` = 
'org.apache.hudi.table.action.commit.SparkBucketIndexPartitioner',
     `hoodie.index.bucket.engine` = 'CONSISTENT_HASHING',
     `hoodie.bucket.index.num.buckets` = '1'
   );
   
   insert into `default`.`hudi_test_3`(id, sn, vnm, ts)
   select 1 as id,'sn1,sn2' as sn, 'test hudi1' as vnm,now() as ts;
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to