hudi-bot opened a new issue, #15252: URL: https://github.com/apache/hudi/issues/15252
Currently, the Bucket index is supported only if the record key has columns with simple values. [https://github.com/apache/hudi/blob/master/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/bucket/BucketIdentifier.java#L71] Example record for which this breaks column1:value1,column2:value2,column3:[value1,value2] ## JIRA info - Link: https://issues.apache.org/jira/browse/HUDI-4318 - Type: Bug - Affects version(s): - 0.11.1 --- ## Comments 10/Jul/22 07:36;yuweixiao;Failed to re-produce the exception. My test code: {code:java} val schema = StructType( Array( StructField("uuid", StringType), StructField("ts", LongType), StructField("partitionpath", StringType), StructField("array_field", DataTypes.createArrayType(StringType)) )) val data = Seq(Row("id1", 1L, "2020/01/01", List("a","b","c"))) val df = spark.createDataFrame(spark.sparkContext.parallelize(data), schema) df.write.format("org.apache.hudi") .options(getQuickstartWriteConfigs) .option(PRECOMBINE_FIELD.key, "ts") .option(RECORDKEY_FIELD.key, "uuid") .option(PARTITIONPATH_FIELD.key, "partitionpath") .option(INDEX_TYPE.key(), IndexType.BUCKET.name()) .option(BUCKET_INDEX_ENGINE_TYPE.key(), BucketIndexEngineType.SIMPLE.name()) .option(BUCKET_INDEX_NUM_BUCKETS.key(), "4") .option(TBL_NAME.key, tableName) .mode(Overwrite) .save(tablePath) {code};;; -- 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]
