mbutrovich commented on PR #4927: URL: https://github.com/apache/datafusion-comet/pull/4927#issuecomment-4985861302
`FieldStyle` maps only `Utf8`/`LargeUtf8` to `Quoted`. `Utf8View` falls through to `MaybeQuoted`, so a string-view field is emitted as a bare token instead of a quoted, escaped JSON string, producing invalid JSON. This matches the old `is_string` predicate, so the PR does not regress, but the rewrite is where the type dispatch is being consolidated and it is worth closing. - Evidence: to_json.rs style match arms only list `DataType::Utf8 | DataType::LargeUtf8 => FieldStyle::Quoted`; old `is_string` likewise omitted `Utf8View`. - Suggested change: include `DataType::Utf8View` in the `Quoted` arm (arrow-schema already groups these three in `DataType::is_string`), and add a unit test with a `Utf8View` field containing a quote to confirm it is quoted and escaped. If deliberately out of scope, note it explicitly rather than carrying it silently through the consolidation. -- 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]
