Flyangz opened a new issue, #1845:
URL: https://github.com/apache/auron/issues/1845

   **Is your feature request related to a problem? Please describe.**
   Common Sub-expression Elimination (CSE) is currently failing for queries 
that access multiple indices of the same array transformation. This leads to 
performance degradation, occasionally making Auron slower than vanilla Spark.
   For example, in the following query:
   ```sql
   select 
       split(content, ',')[0],
       split(content, ',')[1]
   from test_table
   ```
   Spark identifies split(content, ',') as a common sub-expression. However, 
Auron fails to handle the cached native result during the GetArrayItem 
conversion.
   
   **Describe the solution you'd like**
   Update the `GetArrayItem` pattern matching in `NativeConverters`. It should 
support scenarios where the ordinal index has already been converted into a 
`NativeExprWrapper`.
   
   **Additional context**
   Current failure signature:
   ```
   GetArrayItem(
     child: NativeExprWrapper(ArrayType...), 
     ordinal: NativeExprWrapper(IntegerType...)
   )
   ```


-- 
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