Shivfun99 commented on PR #19873:
URL: https://github.com/apache/datafusion/pull/19873#issuecomment-3765547252

   > Is there a clear before & after test case to reference here? Best I can 
tell, this PR essentially only does this:
   > 
   > ```diff
   > -format!("table '{}' not found", table_ref)
   > +format!("table '{}' not found", table_ref.table().to_string())
   > ```
   > 
   > We already had the diagnostics, so I'm struggling to understand what 
exactly this PR is trying to fix/improve.
   
   Thanks for the feedback — that’s fair.
   
   The main intent here is to keep the primary error string aligned with how 
users write SQL, by using the bare table name (`table_ref.table()`) rather than 
the full `TableReference` display (which can include schema/catalog 
qualifiers). This makes the error message and any follow-up suggestions easier 
to read and more consistent with the input query.
   
   To make the improvement explicit, I’m happy to add a small regression test. 
For example:
   
   Query:
     SELECT * FROM userz;
   
   Before:
     Error: table 'public.userz' not found
   
   After:
     Error: table 'userz' not found
     (with the diagnostic span preserved)
   
   If that direction makes sense, I can push a test in `datafusion/sql/tests` 
to assert the bare-name behavior.
   


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