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

   **Describe the bug**
   After upgrading to DataFusion 49  #1154 , the expression cache 
(`cached_exprs_evaluator`) fails to deduplicate identical extension functions.
   This is because DataFusion's `SimpleScalarUDF::equals` now enforces pointer 
equality (`Arc::ptr_eq`) for function implementations (DataFusion PR 
[#16781](https://github.com/apache/datafusion/pull/16781)). Auron currently 
creates a new `Arc` for every UDF instance, causing logically identical 
functions to have different memory addresses.
   
   **To Reproduce**
   Run the following query with logging the `dups` in 
`cached_exprs_evaluator.rs` shows 0 duplicates found.
   ```
   test("my test") {
       withTable("my_table") {
         sql("""
               |create table my_cache_table using parquet as
               |select col1 from values (''{"a":"1", "b":"2"}'), ('{"a":"3", 
"b":"4"}'), ('{"a":"5", "b":"6"}')
               |""".stripMargin)
         sql("""
               |select 
               |       get_json_object(col1, '$.a'),
               |       get_json_object(col1, '$.b')
               |from my_cache_table
               |""".stripMargin).show()
       }
     }
   ```
   **Expected behavior**
   <!--
   A clear and concise description of what you expected to happen.
   -->
   
   **Screenshots**
   <!--
   If applicable, add screenshots to help explain your problem.
   -->
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->
   


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