panbingkun commented on code in PR #45714:
URL: https://github.com/apache/spark/pull/45714#discussion_r1538850826


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/variant/variantExpressions.scala:
##########
@@ -40,7 +40,7 @@ import org.apache.spark.unsafe.types._
 )
 // scalastyle:on line.size.limit
 case class ParseJson(child: Expression) extends UnaryExpression
-  with NullIntolerant with ExpectsInputTypes with CodegenFallback {
+  with NullIntolerant with ExpectsInputTypes {

Review Comment:
   It seems not possible.  Currently, some of UT `conflict` with it, such as
   <img width="1025" alt="image" 
src="https://github.com/apache/spark/assets/15246973/37bfb6e6-110e-4dcc-96bb-10d13eb2dfcd";>
   
https://github.com/apache/spark/blob/becbf8b942132b82e7b906c63ea6077649329b93/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/variant/VariantExpressionSuite.scala#L39
   
   
https://github.com/apache/spark/blob/becbf8b942132b82e7b906c63ea6077649329b93/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala#L87
   
   
https://github.com/apache/spark/blob/becbf8b942132b82e7b906c63ea6077649329b93/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala#L256
   
   
https://github.com/apache/spark/blob/becbf8b942132b82e7b906c63ea6077649329b93/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala#L248
   
   
https://github.com/apache/spark/blob/becbf8b942132b82e7b906c63ea6077649329b93/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala#L403-L415
   
   If we inherit `RuntimeReplaceable `, we cannot overload the method `def 
eval(input: InternalRow = null): Any`, which will lead to the above error.
   
   Should we remove the related UT (VariantExpressionSuite#[`parse_json`, 
`parse_json negative`, `round-trip`, `to_json with nested variant`])? 
   In addition, `the newly added UT` in this pr is 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]


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

Reply via email to