chenhao-db commented on code in PR #46017:
URL: https://github.com/apache/spark/pull/46017#discussion_r1561848721


##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -914,6 +914,11 @@
           "The <exprName> must be between <valueRange> (current value = 
<currentValue>)."
         ]
       },
+      "VARIANT_TYPE" : {

Review Comment:
   I think `UNSUPPORTED_VARIANT_TYPE` may be a better name.



##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/ExpressionTypeCheckingSuite.scala:
##########
@@ -747,6 +748,18 @@ class ExpressionTypeCheckingSuite extends SparkFunSuite 
with SQLHelper with Quer
     )
   }
 
+  test("hash expressions are prohibited on VariantType elements") {
+    val rawVariant = new VariantVal(Array[Byte](0, 0, 0), Array[Byte](0, 0, 0))
+    val argument = Literal.create(rawVariant, VariantType)

Review Comment:
   Since the test only validates the type check phase, the actual variant value 
doesn't matter. You can use `Literal.create(null, VariantType)` to simplify the 
test a bit (no need to import `VariantVal`).



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to