davlee1972 commented on PR #1738: URL: https://github.com/apache/arrow-adbc/pull/1738#issuecomment-2072350385
This is the sqlglot reference.. There is a default dialect and 20 other flavors including snowflake, postgres, etc.. https://github.com/tobymao/sqlglot/blob/main/sqlglot/dialects/dialect.py def normalize_identifier(self, expression: E) -> E: """ Transforms an identifier in a way that resembles how it'd be resolved by this dialect. For example, an identifier like `FoO` would be resolved as `foo` in Postgres, because it lowercases all unquoted identifiers. On the other hand, Snowflake uppercases them, so it would resolve it as `FOO`. If it was quoted, it'd need to be treated as case-sensitive, and so any normalization would be prohibited in order to avoid "breaking" the identifier. There are also dialects like Spark, which are case-insensitive even when quotes are present, and dialects like MySQL, whose resolution rules match those employed by the underlying operating system, for example they may always be case-sensitive in Linux. Finally, the normalization behavior of some engines can even be controlled through flags, like in Redshift's case, where users can explicitly set enable_case_sensitive_identifier. SQLGlot aims to understand and handle all of these different behaviors gracefully, so that it can analyze queries in the optimizer and successfully capture their semantics. """ -- 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]
