-
-
Notifications
You must be signed in to change notification settings - Fork 873
Add UTF8 support for identifiers in Vertica dialect #6183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# https://docs.vertica.com/24.3.x/en/sql-reference/language-elements/identifiers/ : # Unquoted SQL identifiers must begin with one of the following: # * Non-Unicode letters: A–Z or a-z # -- /actually Vertica accepts also non-ASCII UTF-8 Unicode characters here, which is not well documented/ # * Underscore (_) # Subsequent characters in an identifier can be any combination of the following: # * Non-Unicode letters: A–Z or a-z # * Underscore (_) # * Digits(0–9) # * Unicode letters (letters with diacriticals or not in the Latin alphabet), unsupported for model names # * Dollar sign ($), unsupported for model names # # Vertica accepts **non-ASCII UTF-8 Unicode characters** for table names, column names, and other identifiers, # extending the cases where upper/lower case distinctions are ignored (case-folded) to all alphabets, # including Latin, Cyrillic, and Greek. # # Changes to be committed: # modified: src/sqlfluff/dialects/dialect_vertica.py # new file: test/fixtures/dialects/vertica/utf8.sql
[feature] adding allow_unicode to yaml dump, fix linting errors
Added more tests
Fixed all known issues at the moment, ready for next review |
@WittierDinosaur hi, is it possible to change my incorrect login in commit to correct one? |
I'll let @WittierDinosaur re-review this PR given he did the first pass, however on changing the commit username: @skryzh I think you can do that on your side. The branch for this PR is in the |
Coverage Results ✅
|
cover cases where non-ascii word is parameter like ALTER TABLE some_table TO utf8_identifier_eg_Verkäufer;
[feature] adding new test cases for utf8
[fix] fixing ParameterNameSegment and adding new tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very sensible. Thanks for contributing this and putting together the extensive test case 👍
Brief summary of the change made
Are there any other side effects of this change that we should be aware of?
Pull Request checklist
Please confirm you have completed any of the necessary steps below.
Included test cases to demonstrate any code changes, which may be one or more of the following:
.yml
rule test cases intest/fixtures/rules/std_rule_cases
..sql
/.yml
parser test cases intest/fixtures/dialects
(note YML files can be auto generated withtox -e generate-fixture-yml
).test/fixtures/linter/autofix
.Added appropriate documentation for the change.
Created GitHub issues for any relevant followup/future enhancements if appropriate.