Vamsi-klu commented on code in PR #18979:
URL: https://github.com/apache/pinot/pull/18979#discussion_r3848767417
##########
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:
@jackie-jiang. that earlier reply never made it into the branch.
Pushed in e8be888. I went with the util-method option, same shape as
JsonExtractKeyTransformFunction:
• PARSE_CONTEXT and PARSE_CONTEXT_WITH_BIG_DECIMAL are public on
JsonFunctions
• readJsonPathInternal handles String, UTF-8 byte[], and already-parsed
documents
• JsonExtractScalarTransformFunction uses those instead of keeping its own
Jayway setup
JsonFunctionsTest, FastJsonPathExtractorTest, and
JsonExtractScalarTransformFunctionTest are green locally.
--
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]