Jackie-Jiang commented on code in PR #18979:
URL: https://github.com/apache/pinot/pull/18979#discussion_r3800057797
##########
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:
Let's make it public here, and change `JsonExtractScalarTransformFunction`
to reference this. Same for `PARSE_CONTEXT`.
Alternatively (preferable), extract some common util methods into this
class, and reference them in `JsonExtractScalarTransformFunction` similar to
how `JsonExtractKeyTransformFunction` is handled
--
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]