snuyanzin opened a new pull request, #30064:
URL: https://github.com/apache/flink/pull/30064

   
   ## What is the purpose of the change
   
   The idea is to optimize a bit xml_parse by avoiding regex
   
   ## Brief change log
   
   XML_STRING
   
   ## Verifying this change
   
   more edge case tests added
   also measurement for `SELECT XML_STRING(PARSE_JSON(s)) FROM t`
   before
   ```
   Benchmark                              (content)    (field)  (inputLength)   
Mode  Cnt     Score    Error   Units
   SqlXmlStringBenchmark.xmlString            ascii       text             10  
thrpt    4  1204.585 ± 73.781  ops/ms
   SqlXmlStringBenchmark.xmlString            ascii       text            100  
thrpt    4   415.767 ± 11.719  ops/ms
   SqlXmlStringBenchmark.xmlString            ascii       text           1000  
thrpt    4    51.966 ±  7.263  ops/ms
   SqlXmlStringBenchmark.xmlString            ascii       text          10000  
thrpt    4     5.492 ±  0.033  ops/ms
   SqlXmlStringBenchmark.xmlString            ascii  attribute             10  
thrpt    4   820.822 ± 31.939  ops/ms
   SqlXmlStringBenchmark.xmlString            ascii  attribute            100  
thrpt    4   394.973 ± 32.412  ops/ms
   SqlXmlStringBenchmark.xmlString            ascii  attribute           1000  
thrpt    4    63.876 ±  1.766  ops/ms
   SqlXmlStringBenchmark.xmlString            ascii  attribute          10000  
thrpt    4     6.795 ±  0.127  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii       text             10  
thrpt    4   999.392 ± 30.258  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii       text            100  
thrpt    4   336.795 ±  6.227  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii       text           1000  
thrpt    4    42.892 ±  1.294  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii       text          10000  
thrpt    4     4.681 ±  0.015  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii  attribute             10  
thrpt    4   740.542 ± 21.537  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii  attribute            100  
thrpt    4   288.891 ±  8.946  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii  attribute           1000  
thrpt    4    42.103 ±  0.817  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii  attribute          10000  
thrpt    4     4.520 ±  0.205  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped       text             10  
thrpt    4  1180.010 ± 25.018  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped       text            100  
thrpt    4   421.189 ± 43.083  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped       text           1000  
thrpt    4    49.236 ±  2.157  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped       text          10000  
thrpt    4     6.111 ±  0.122  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped  attribute             10  
thrpt    4   788.209 ± 68.853  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped  attribute            100  
thrpt    4   355.798 ± 15.934  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped  attribute           1000  
thrpt    4    49.228 ± 54.934  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped  attribute          10000  
thrpt    4     5.812 ±  0.176  ops/ms
   ```
   after
   ```
   Benchmark                              (content)    (field)  (inputLength)   
Mode  Cnt     Score     Error   Units
   SqlXmlStringBenchmark.xmlString            ascii       text             10  
thrpt    4  1669.503 ±  76.311  ops/ms
   SqlXmlStringBenchmark.xmlString            ascii       text            100  
thrpt    4  1205.689 ±  56.824  ops/ms
   SqlXmlStringBenchmark.xmlString            ascii       text           1000  
thrpt    4   330.514 ±  23.052  ops/ms
   SqlXmlStringBenchmark.xmlString            ascii       text          10000  
thrpt    4    45.430 ±   0.503  ops/ms
   SqlXmlStringBenchmark.xmlString            ascii  attribute             10  
thrpt    4  1038.518 ±  43.157  ops/ms
   SqlXmlStringBenchmark.xmlString            ascii  attribute            100  
thrpt    4   867.732 ±  14.720  ops/ms
   SqlXmlStringBenchmark.xmlString            ascii  attribute           1000  
thrpt    4   274.941 ±  24.147  ops/ms
   SqlXmlStringBenchmark.xmlString            ascii  attribute          10000  
thrpt    4    39.669 ±   1.071  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii       text             10  
thrpt    4  1351.672 ±  60.127  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii       text            100  
thrpt    4   665.432 ±  62.404  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii       text           1000  
thrpt    4   101.456 ±   7.327  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii       text          10000  
thrpt    4    13.739 ±   0.075  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii  attribute             10  
thrpt    4   851.491 ±  25.963  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii  attribute            100  
thrpt    4   542.410 ±  15.800  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii  attribute           1000  
thrpt    4   107.865 ±   2.933  ops/ms
   SqlXmlStringBenchmark.xmlString         nonAscii  attribute          10000  
thrpt    4    12.770 ±   0.126  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped       text             10  
thrpt    4  1570.094 ± 132.164  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped       text            100  
thrpt    4   928.699 ±  55.112  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped       text           1000  
thrpt    4   171.664 ±   5.485  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped       text          10000  
thrpt    4    19.867 ±   0.152  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped  attribute             10  
thrpt    4   983.409 ±  43.619  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped  attribute            100  
thrpt    4   667.288 ±  19.149  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped  attribute           1000  
thrpt    4   161.738 ±  10.511  ops/ms
   SqlXmlStringBenchmark.xmlString          escaped  attribute          10000  
thrpt    4    19.746 ±   0.279  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): (yes)
     - 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]

Reply via email to