liuwei178 commented on code in PR #9765:
URL: https://github.com/apache/seatunnel/pull/9765#discussion_r2302687962


##########
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/functions/VectorFunction.java:
##########
@@ -190,10 +191,58 @@ private static Float[] convertToFloatArray(Object obj) {
                 wrapperArray[i] = primitiveArray[i];
             }
             return wrapperArray;
+        } else if (obj instanceof Map) {
+            return convertSparseVectorToFloatArray((Map<?, ?>) obj);
         } else {
             throw new TransformException(
                     CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION,
                     String.format("Unsupported vector type: %s", 
obj.getClass().getName()));
         }
     }
+
+    private static Float[] convertSparseVectorToFloatArray(Map<?, ?> 
sparseVector) {

Review Comment:
   OK~



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