anlihust opened a new issue, #8456:
URL: https://github.com/apache/arrow-datafusion/issues/8456

   ### Describe the bug
   
   When a struct field name is the same as a regular field name, and the struct 
is declared before the regular field, it can cause issues when the field name 
in where clause
   
   ### To Reproduce
   
   construct a parquet file ,write 2 records  as follow
   ```
       +---------------------+----+--------+
        | struct              | id | name   |
        +---------------------+----+--------+
        | {id: 1, name: aaa1} | 1  | test01 |
        | {id: 2, name: aaa2} | 2  | test02 |
        +---------------------+----+--------+
   ```
    when execute sql `select * from base_table where name='test01'` ,will got 
empty result
   here is the bug demo
   https://github.com/anlihust/datafusion_demo/blob/main/src/main.rs
   
   ### Expected behavior
   
    when execute sql `select * from base_table where name='test01'` ,get the 
test01 record
   ```
       +---------------------+----+--------+
        | struct              | id | name   |
        +---------------------+----+--------+
        | {id: 1, name: aaa1} | 1  | test01 |
        +---------------------+----+--------+
   ```
   
   ### Additional context
   
   _No response_


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