Vamsi-klu commented on code in PR #18979:
URL: https://github.com/apache/pinot/pull/18979#discussion_r3800192354
##########
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/JsonFunctions.java:
##########
@@ -69,6 +76,13 @@ private JsonFunctions() {
.mappingProvider(new
JacksonMappingProvider()).options(Option.SUPPRESS_EXCEPTIONS)
.build());
+ // Mirrors JsonExtractScalarTransformFunction's BigDecimal-preserving
parser: BIG_DECIMAL / STRING / JSON
+ // extraction reads JSON floats as BigDecimal to avoid precision loss.
+ private static final ParseContext PARSE_CONTEXT_WITH_BIG_DECIMAL =
JsonPath.using(
Review Comment:
Good call. I went with the util-method option and mirrored
JsonExtractKeyTransformFunction. PARSE_CONTEXT and
PARSE_CONTEXT_WITH_BIG_DECIMAL are public on JsonFunctions now, and the String
/ BYTES / already-parsed read lives in readJsonPathInternal. The transform uses
those shared contexts instead of keeping its own Jayway setup.
--
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]