Hussein Awala created SPARK-60136:
-------------------------------------

             Summary: Reduce allocations when computing TreeNode node names
                 Key: SPARK-60136
                 URL: https://issues.apache.org/jira/browse/SPARK-60136
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 5.0.0
            Reporter: Hussein Awala


TreeNode.nodeName currently computes simpleClassName.replaceAll("Exec$", ""). 
String.replaceAll compiles a regular expression on each invocation, even though 
this method repeatedly performs the same suffix operation while producing plan 
descriptions.

Avoid repeated regex compilation/allocation while preserving existing node-name 
behavior. Validation should cover names with and without the suffix, 
non-terminal occurrences, the exact end-anchor behavior, virtual nodeName 
overrides, and existing malformed-class-name handling.

A generic microbenchmark can repeatedly obtain node names from small synthetic 
TreeNode instances. No SparkSession or data source is needed to isolate the 
naming operation.

Generated-by: Pi Coding Agent 1.1.0




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to