Yuvraj-cyborg opened a new pull request, #18696:
URL: https://github.com/apache/datafusion/pull/18696
Description:
Fixes inconsistency where table registration methods (`[register_table]`,
`[register_csv]`, etc.) always normalized identifiers to lowercase, ignoring
the `[enable_ident_normalization]` configuration.
Problem
When `[enable_ident_normalization=false]` :
`[register_csv("DATA", ...)]` normalized the name to "data"
`SELECT * FROM DATA looked for "DATA"`
Result - [table 'DATA' not found] error
Root Cause
`[TableReference::parse_str()]` hardcoded `[ignore_case=false]` , forcing
normalization regardless of session settings.
Solution
Introduced `ResolveTableReference` trait to parse table references
respecting the session's `[enable_ident_normalization]` setting. Updated
`[register_table()]`, `[deregister_table()]`, and `[table_exist()]` to use this
trait.
Changes :
- Added `ResolveTableReference` trait for context-aware table reference
parsing.
- Modified table registration/lookup methods to respect normalization
settings.
- Added test example demonstrating the fix.
```
cargo run --example test_ident_normalization
```
--
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]