JingsongLi commented on code in PR #8019:
URL: https://github.com/apache/paimon/pull/8019#discussion_r3331605820


##########
paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkCatalog.java:
##########
@@ -609,6 +607,17 @@ private Schema toInitialSchema(
                         field.dataType() instanceof 
org.apache.spark.sql.types.BinaryType,
                         "The type of blob field must be binary");
                 type = new BlobType();
+            } else if (vectorFields.contains(field.name())) {
+                Preconditions.checkArgument(
+                        field.dataType() instanceof ArrayType,
+                        "The type of blob field must be array");
+                ArrayType arrayType = (ArrayType) field.dataType();
+                String dimKey = String.format("field.%s.vector-dim", 
field.name());
+                type =
+                        new VectorType(

Review Comment:
   VectorType is constructed with arrayType.containsNull() (element 
nullability) instead of field.nullable() (column nullability). The general-case 
code path on line 613 correctly uses field.nullable() — this vector branch is 
inconsistent.



-- 
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