VojtechMucha commented on PR #19035: URL: https://github.com/apache/pinot/pull/19035#issuecomment-5280648544
> **Major — HTTP vs gRPC MAP return different Java value types** (`PinotResultSet.getMap` vs `PinotGrpcResultSet.getMap`) > > HTTP parses with `MAP_READER` (`TypeReference<Map<?,?>>`), so Jackson infers `Integer`/`Long`/`Double`/`Boolean`/`String`. gRPC instead wraps the decoder's already-deserialized map (`new HashMap<>((Map<?,?>) value)`), whose values come from `JsonResponseEncoder.extractValue(JsonNode)` and can be `Short`/`BigInteger`/`Float`/`BigDecimal`. So `getObject` on the same MAP query returns transport-dependent Java types, breaking `equals()` and downstream numeric handling. > > This isn't caught by tests: the gRPC MAP test uses only `String`/`Integer` values, and there's no HTTP MAP test at all. Suggest normalizing both paths to the same element typing and adding a mixed-numeric MAP test to both suites. Both HTTP and gRPC returns the same java Map now and is covered by tests. Note that the map can contain different values (types) than those which are stored in Pinot because the type metadata are not transferred. E.g. if the map contains UUID, we will see it as String on the client side. -- 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]
