ding-young commented on issue #16665:
URL: https://github.com/apache/datafusion/issues/16665#issuecomment-3034340552

   After investigation based on the reproducer, it seems like the index of the 
column `p_size` is wrong since it read from different schema. 
   
   Although the data type of `p_size` of `Int32`, it returns `Int64` here  
https://github.com/apache/datafusion/blob/3118b810906c42a2e591158b6efd59aaeec87e5e/datafusion/physical-expr/src/expressions/in_list.rs#L446
   
   It's because the index of column `p_size` is based on the schema that 
contains only `p_size`, while we use the whole schema for part table on 
deserialization. 
   ``` 
   Schema { [Field { name: "p_size", data_type: Int32 ... }
   Schema { [Field { name: "p_partkey", data_type: Int64 },.. Field { name: 
"p_size", data_type: Int32 ... }}
   ```
   Since index 0 for the latter is `p_partkey` (Int64), the error msg said data 
type mismatches. 
   


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to