Skip to content
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

SQL Parser: TSQL dialect supports single quotes for column aliases, but the parser does not #9843

Closed
alexs-101 opened this issue Feb 14, 2024 · 1 comment · Fixed by #9838
Labels
bug Bug report

Comments

@alexs-101
Copy link
Contributor

alexs-101 commented Feb 14, 2024

T-SQL allows to define aliases in 4 different ways, for example

SELECT
    c1 as c1_alias,
    c2 as [c2_alias],
    c3 as "c3_alias",
    c4 as 'c4_alias'
FROM
    tbl
The fix adds support of 4th case
SELECT
    c4 as 'c4_alias'
FROM
    tbl

The SQL Parser supports all except c4 as 'c4_alias', that's due to bug in T-SQL dialect definition of sqlglot library

The fix is by the link
https://github.com/datahub-project/datahub/pull/9838/files

@alexs-101
Copy link
Contributor Author

alexs-101 commented Feb 17, 2024

I removed the fix from my PR, because found that it was fixed in most recent version of SQLGlot tobymao/sqlglot@d31ae0d. Could you update the fork acryl-sqlglot to the most recent version, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
1 participant