scovich commented on PR #8354: URL: https://github.com/apache/arrow-rs/pull/8354#issuecomment-3986828962
Everything looks good, code-wise -- nice and clean. But there's still an open question of whether we intend to follow the jsonpath spec in our path step logic, as e.g. spark does? https://github.com/apache/arrow-rs/pull/8354#discussion_r2842833615 The jsonpath spec requires `foo[100]` to return NULL if `foo` is not an array, and also requires returning NULL if `foo` has fewer than 101 elements. Similarly, `foo.bar` should return NULL if `foo` is not a struct and should also return NULL if `foo` has no field named `bar`. Safe casting would only influence actual casting decisions, e.g. a `variant_get` call that specifically requests a string and the requested path points to a struct. In contrast, our current struct handling code currently returns an error if safe casting is disabled and: * a `Field` path step encounters a "wrong" type (L169) * an `Index` path step encounters a "wrong" type (L224) * an `Index` path step is out of bounds (L99) -- 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]
