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

   ## What is the purpose of the change
   
   The idea is to avoid extra encoding roundtrip while `CHAR_LENGTH`
   
   ## Brief change log
   numChars
   
   ## Verifying this change
   Existing tests
   also several more edge cases added
   also measurement
   before
   ```
   Benchmark                                (content)  (inputLength)  
(representation)   Mode  Cnt     Score      Error   Units
   SqlCharLengthBenchmark.charLength            ascii             10            
string  thrpt    4  8524.123 ± 1084.931  ops/ms
   SqlCharLengthBenchmark.charLength            ascii             10            
binary  thrpt    4  1411.750 ±  143.272  ops/ms
   SqlCharLengthBenchmark.charLength            ascii            100            
string  thrpt    4  5893.942 ±  550.029  ops/ms
   SqlCharLengthBenchmark.charLength            ascii            100            
binary  thrpt    4   929.082 ±   48.216  ops/ms
   SqlCharLengthBenchmark.charLength            ascii           1000            
string  thrpt    4  1455.457 ±   49.381  ops/ms
   SqlCharLengthBenchmark.charLength            ascii           1000            
binary  thrpt    4   206.910 ±  102.132  ops/ms
   SqlCharLengthBenchmark.charLength         nonAscii             10            
string  thrpt    4  7412.941 ±  648.773  ops/ms
   SqlCharLengthBenchmark.charLength         nonAscii             10            
binary  thrpt    4  1357.375 ±  120.030  ops/ms
   SqlCharLengthBenchmark.charLength         nonAscii            100            
string  thrpt    4  3094.680 ±  306.602  ops/ms
   SqlCharLengthBenchmark.charLength         nonAscii            100            
binary  thrpt    4   656.064 ±   50.073  ops/ms
   SqlCharLengthBenchmark.charLength         nonAscii           1000            
string  thrpt    4   393.285 ±    5.182  ops/ms
   SqlCharLengthBenchmark.charLength         nonAscii           1000            
binary  thrpt    4   156.045 ±    4.872  ops/ms
   ```
   after
   
   ```
   Benchmark                                (content)  (inputLength)  
(representation)   Mode  Cnt      Score      Error   Units
   SqlCharLengthBenchmark.charLength            ascii             10            
string  thrpt    4   9227.202 ± 8508.742  ops/ms
   SqlCharLengthBenchmark.charLength            ascii             10            
binary  thrpt    4   1429.626 ±  303.822  ops/ms
   SqlCharLengthBenchmark.charLength            ascii            100            
string  thrpt    4  11140.571 ± 1799.791  ops/ms
   SqlCharLengthBenchmark.charLength            ascii            100            
binary  thrpt    4   1002.736 ±   92.603  ops/ms
   SqlCharLengthBenchmark.charLength            ascii           1000            
string  thrpt    4  11120.293 ± 1651.544  ops/ms
   SqlCharLengthBenchmark.charLength            ascii           1000            
binary  thrpt    4    251.703 ±    2.027  ops/ms
   SqlCharLengthBenchmark.charLength         nonAscii             10            
string  thrpt    4  11230.054 ± 1510.696  ops/ms
   SqlCharLengthBenchmark.charLength         nonAscii             10            
binary  thrpt    4   1369.823 ±  135.821  ops/ms
   SqlCharLengthBenchmark.charLength         nonAscii            100            
string  thrpt    4  11284.740 ± 1755.926  ops/ms
   SqlCharLengthBenchmark.charLength         nonAscii            100            
binary  thrpt    4    667.565 ±   93.378  ops/ms
   SqlCharLengthBenchmark.charLength         nonAscii           1000            
string  thrpt    4  11153.699 ± 1776.005  ops/ms
   SqlCharLengthBenchmark.charLength         nonAscii           1000            
binary  thrpt    4    155.957 ±    1.350  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