andygrove commented on PR #4647: URL: https://github.com/apache/datafusion-comet/pull/4647#issuecomment-5876124516
This is a light fully automated review since there are so many PRs open. Reusing the struct-to-string machinery for maps, and recursing through `cast_array` for keys and values, is a clean way to keep the two consistent. `spark/src/main/scala/org/apache/comet/expressions/CometCast.scala:324` adds `case DataTypes.NullType => Compatible()` inside `canCastToString`, but I don't think it can be reached. `canCastToString` is private and its only caller is the `case (_, DataTypes.StringType)` arm of `isSupported` at line 219, which sits below `case (NullType, _) => Compatible()` at line 199. The new `MapType` arm at line 337 recurses through `isSupported` too, so a `Map<NullType, NullType>` key or value also returns at line 199 first. Could the `NullType` arm be dropped, so the empty-map support visibly comes from the `MapType` arm alone? -- 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]
