andygrove commented on code in PR #3875:
URL: https://github.com/apache/datafusion-comet/pull/3875#discussion_r3028384790
##########
spark/src/main/scala/org/apache/comet/serde/structs.scala:
##########
@@ -105,53 +105,37 @@ object CometGetArrayStructFields extends
CometExpressionSerde[GetArrayStructFiel
object CometStructsToJson extends CometExpressionSerde[StructsToJson] {
- override def getSupportLevel(expr: StructsToJson): SupportLevel =
- Incompatible(
- Some(
- "Does not support Infinity/-Infinity for numeric types" +
- " (https://github.com/apache/datafusion-comet/issues/3016)"))
+ override def getSupportLevel(expr: StructsToJson): SupportLevel = {
+ if (expr.options.nonEmpty) {
+ Unsupported(Some("StructsToJson with options is not supported"))
Review Comment:
```suggestion
return Unsupported(Some("StructsToJson with options is not supported"))
```
##########
spark/src/main/scala/org/apache/comet/serde/structs.scala:
##########
@@ -105,53 +105,37 @@ object CometGetArrayStructFields extends
CometExpressionSerde[GetArrayStructFiel
object CometStructsToJson extends CometExpressionSerde[StructsToJson] {
- override def getSupportLevel(expr: StructsToJson): SupportLevel =
- Incompatible(
- Some(
- "Does not support Infinity/-Infinity for numeric types" +
- " (https://github.com/apache/datafusion-comet/issues/3016)"))
+ override def getSupportLevel(expr: StructsToJson): SupportLevel = {
+ if (expr.options.nonEmpty) {
+ Unsupported(Some("StructsToJson with options is not supported"))
+ }
+ val dataType = expr.child.dataType
+ if (!isSupportedType(dataType)) {
+ Unsupported(Some(s"Struct type: $dataType contains unsupported types"))
Review Comment:
```suggestion
return Unsupported(Some(s"Struct type: $dataType contains unsupported
types"))
```
--
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]