zeroshade commented on issue #1721:
URL: https://github.com/apache/arrow-adbc/issues/1721#issuecomment-2058003864

   @lidavidm Snowflake's way of handling things is that if it's not in quotes, 
everything gets upper-cased automatically. Because our CI tests were using a 
lower-cased table name, we were running into an issue where some queries used 
quotes and others didn't in the validation suite. We then surrounded every 
query with quotes in the validation suite, but the table name itself was not 
surrounded with quotes for ingestion so we ended up with flaky CI tests where 
it might or might not find the table. 
https://github.com/apache/arrow-adbc/pull/1561 fixed the flakiness of the tests 
by making all of the casing consistent - what you put in is what you get - by 
wrapping identifiers in quotes if they weren't already.
   
   > Double quotes will be applied around the name of a table when the table 
name is not all uppercase, or contains spaces and possibly some other characters
   >
   > If the table name is purely upper case and underscores, the DDL statement 
that snowflake shows won’t contain double quotes
   
   In theory, that's essentially how the *current* 0.11.0 version of the driver 
works. If you provide a string for a table name where the characters aren't all 
uppercase or contains spaces / possibly other characters, then because we wrap 
it in double quotes, the table name will be handled correctly as provided. If 
the table name is provided with all of the characters already uppercased and 
without any special characters, then the fact that we add quotes to it won't 
affect its usage at all.
   
   So this pretty much comes down to a question of whether or not we force 
users to perform the upper-casing themselves (the current version) or force 
users to include their own double quotes like they would if they were writing 
the raw SQL query themselves. There isn't a programmatic way for us to be able 
to tell what the user wants before-hand, the only alternative would be to make 
the auto-quoting an option they can toggle (and then we need to decide on a 
default).


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