snuyanzin opened a new pull request, #30006:
URL: https://github.com/apache/flink/pull/30006
## What is the purpose of the change
The PR to make use
```java
new String(
parser.getTextCharacters(),
parser.getTextOffset(),
parser.getTextLength())
```
rather than `getText()` for VARIANT as it will help to avoid per char String
buffer in case of long json (100Kb+)
## Brief change log
variant
## Verifying this change
before
```
Benchmark (jsonLength) Mode Cnt Score
Error Units
SqlParseJsonBenchmark.parseJson 100 thrpt 5 2174.996 ±
182.504 ops/ms
SqlParseJsonBenchmark.parseJson 1000 thrpt 5 629.773 ±
23.723 ops/ms
SqlParseJsonBenchmark.parseJson 10000 thrpt 5 113.092 ±
6.915 ops/ms
SqlParseJsonBenchmark.parseJson 50000 thrpt 5 25.302 ±
2.071 ops/ms
SqlParseJsonBenchmark.parseJson 100000 thrpt 5 7.974 ±
0.256 ops/ms
```
after
```
Benchmark (jsonLength) Mode Cnt Score
Error Units
SqlParseJsonBenchmark.parseJson 100 thrpt 5 2156.781 ±
201.154 ops/ms
SqlParseJsonBenchmark.parseJson 1000 thrpt 5 675.530 ±
25.045 ops/ms
SqlParseJsonBenchmark.parseJson 10000 thrpt 5 116.897 ±
10.469 ops/ms
SqlParseJsonBenchmark.parseJson 50000 thrpt 5 25.796 ±
0.442 ops/ms
SqlParseJsonBenchmark.parseJson 100000 thrpt 5 11.068 ±
0.685 ops/ms
```
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: (no)
- The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no )
- The S3 file system connector: (no)
## Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable)
---
##### Was generative AI tooling used to co-author this PR?
<!--
If generative AI tooling has been used in the process of authoring this PR,
please
change the checkbox below to `[X]` and replace the placeholder in the
"Generated-by"
line with the tool name and version. Otherwise remove the "Generated-by"
line.
See the ASF Generative Tooling Guidance for details:
https://www.apache.org/legal/generative-tooling.html
You are responsible for the quality and correctness of every change in this
PR
regardless of the tooling used. Low-effort AI-generated PRs will be closed.
See
AGENTS.md for the full guidance.
-->
- [ ] Yes (please specify the tool below)
Generated-by: [Tool Name and Version]
--
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]