Zouxxyy commented on code in PR #5531:
URL: https://github.com/apache/paimon/pull/5531#discussion_r2065739772
##########
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/catalog/functions/PaimonFunctions.scala:
##########
@@ -98,6 +102,32 @@ class BucketFunction extends UnboundFunction {
override def name: String = BUCKET
}
+object BucketFunction {
+ private val SPARK_TIMESTAMP_PRECISION = 6
+
+ def supportsTable(table: FileStoreTable): Boolean = {
+ table.bucketMode match {
+ case BucketMode.HASH_FIXED =>
+
table.schema().logicalBucketKeyType().getFieldTypes.asScala.forall(supportsType)
+ case _ => false
+ }
+ }
+
+ private def supportsType(t: PaimonDataType): Boolean = t match {
+ case arrayType: ArrayType =>
+ supportsType(arrayType.getElementType)
+ case mapType: MapType =>
+ supportsType(mapType.getKeyType) && supportsType(mapType.getValueType)
+ case rowType: RowType =>
+ rowType.getFieldTypes.asScala.forall(supportsType)
+ case timestamp: TimestampType =>
Review Comment:
I extracted some logic to https://github.com/apache/paimon/pull/5556, I
haven't found a suitable way to fix it yet, so just skip it.
--
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]