colinmarc opened a new issue, #18122:
URL: https://github.com/apache/datafusion/issues/18122

   ### Describe the bug
   
   Using `datafusion-proto` to serialize a plan such as:
   
   ```
   Filter: WOW_SUCH_TABLE.a > Int64(10) AND WOW_SUCH_TABLE.B < Int64(100)
     TableScan: WOW_SUCH_TABLE projection=[a, B], 
partial_filters=[WOW_SUCH_TABLE.a > Int64(10), WOW_SUCH_TABLE.B < Int64(100)]
   ```
   
   And then deserializing it results in a different plan:
   
   ```
   Filter: wow_such_table.a > Int64(10) AND wow_such_table.B < Int64(100)
     TableScan: WOW_SUCH_TABLE projection=[a, B], 
partial_filters=[wow_such_table.a > Int64(10), wow_such_table.B < Int64(100)]
   ```
   
   Note that the `TableReference` in the `TableScan` is intact, but the 
expression's `Column` is now normalized (downcased). This has nothing to do 
with `enable_ident_normalization`, because we're well past the SQL parser at 
this point.
   
   The issue seems to be here:
   
   
https://github.com/apache/datafusion/blob/8e1d13a9c6e989b8a6216c6752a34fb3e0494e0f/datafusion/proto-common/src/from_proto/mod.rs#L145
   
   Because that calls `Column::new`, which takes an `Into<TableReference>`; and 
`impl From<String> for TableReference` normalizes.
   
   
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   _No response_
   
   ### 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]


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

Reply via email to