Reranko05 commented on code in PR #50874:
URL: https://github.com/apache/arrow/pull/50874#discussion_r3845860483


##########
cpp/src/arrow/extension/tensor_extension_array_test.cc:
##########
@@ -858,35 +864,41 @@ TEST_F(TestVariableShapeTensorType, 
MetadataSerializationRoundtrip) {
   CheckDeserializationRaises(ext_type_, storage_type, R"({"shape":(3,4)})",
                              "Invalid serialized JSON data");
   CheckDeserializationRaises(ext_type_, storage_type, 
R"({"permutation":[1,0]})",
-                             "Invalid: permutation");
+                             "Invalid permutation");
   CheckDeserializationRaises(ext_type_, storage_type, 
R"({"dim_names":["x","y"]})",
-                             "Invalid: dim_names");
+                             "Invalid dim_names");
 
   // Validate permutation member must be an array with integer values. Error
   // message should include the JSON type name of the offending value.
   CheckDeserializationRaises(ext_type_, storage_type, 
R"({"permutation":"invalid"})",
-                             "permutation must be an array, got String");
+                             "permutation must be an array, got string");
   CheckDeserializationRaises(ext_type_, storage_type, 
R"({"permutation":[1.5,0.5,2.5]})",
-                             "permutation must contain integers, got Number");
+                             "permutation must contain integers, got number");
   CheckDeserializationRaises(ext_type_, storage_type,
                              R"({"permutation":[null,null,null]})",
-                             "permutation must contain integers, got Null");
+                             "permutation must contain integers, got null");
+  CheckDeserializationRaises(ext_type_, storage_type, R"({"permutation":[]})",
+                             "Invalid permutation");
 
   // Validate dim_names member must be an array with string values
   CheckDeserializationRaises(ext_type_, storage_type, 
R"({"dim_names":"invalid"})",
-                             "dim_names must be an array, got String");
+                             "dim_names must be an array, got string");
   CheckDeserializationRaises(ext_type_, storage_type, 
R"({"dim_names":[1,2,3]})",
-                             "dim_names must contain strings, got Number");
+                             "dim_names must contain strings, got number");
+  CheckDeserializationRaises(ext_type_, storage_type, R"({"dim_names":[]})",

Review Comment:
   Variable Tensor dim_names Test



##########
cpp/src/arrow/extension/tensor_extension_array_test.cc:
##########
@@ -244,16 +244,20 @@ TEST_F(TestFixedShapeTensorType, 
MetadataSerializationRoundtrip) {
   // Validate permutation member must be an array with integer values
   CheckDeserializationRaises(ext_type_, storage_type,
                              R"({"shape":[3,4],"permutation":"invalid"})",
-                             "permutation must be an array, got String");
+                             "permutation must be an array, got string");
   CheckDeserializationRaises(ext_type_, storage_type,
                              R"({"shape":[3,4],"permutation":{"a":1}})",
-                             "permutation must be an array, got Object");
+                             "permutation must be an array, got object");
   CheckDeserializationRaises(ext_type_, storage_type,
                              R"({"shape":[3,4],"permutation":[1.5,0.5]})",
-                             "permutation must contain integers, got Number");
+                             "permutation must contain integers, got number");
   CheckDeserializationRaises(ext_type_, storage_type,
                              R"({"shape":[3,4],"permutation":["a","b"]})",
-                             "permutation must contain integers, got String");
+                             "permutation must contain integers, got string");
+  // Validate permutation member must be an array with integer values
+  CheckDeserializationRaises(ext_type_, storage_type,

Review Comment:
   Fixed Tensor Permutation.



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