-
Notifications
You must be signed in to change notification settings - Fork 242
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
Unit Test Failure With sqlparse==0.3.0 #117
Comments
0.3.1 is OK. Problem only exists with sqlparse==0.3.0
|
For "CREATE TABLE tab1 LIKE tab2", see andialbrecht/sqlparse#543 |
For "INSERT OVERWRITE tab1 SELECT * FROM tab2", see andialbrecht/sqlparse#475 As in v0.3.0 >>> sqlparse.parse("INSERT OVERWRITE tab1 SELECT * FROM tab2;")[0].tokens
[<DML 'INSERT' at 0x7F37552FCC48>,
<Whitespace ' ' at 0x7F37552FCCA8>,
<Identifier 'OVERWR...' at 0x7F37552F9750>,
<Whitespace ' ' at 0x7F37552FCE28>,
<DML 'SELECT' at 0x7F37552FCE88>,
<Whitespace ' ' at 0x7F37552FCEE8>,
<Wildcard '*' at 0x7F37552FCF48>,
<Whitespace ' ' at 0x7F37552FCFA8>,
<Keyword 'FROM' at 0x7F3755300048>,
<Whitespace ' ' at 0x7F37553000A8>,
<Identifier 'tab2' at 0x7F37552F9840>,
<Punctuation ';' at 0x7F3755300168>] As in v0.3.1 >>> sqlparse.parse("INSERT OVERWRITE tab1 SELECT * FROM tab2;")[0].tokens
[<DML 'INSERT' at 0x7F2CE8DD8D68>,
<Whitespace ' ' at 0x7F2CE8DD8DC8>,
<Keyword 'OVERWR...' at 0x7F2CE8DD8E28>,
<Whitespace ' ' at 0x7F2CE8DD8E88>,
<Identifier 'tab1' at 0x7F2CE8DAFB88>,
<Whitespace ' ' at 0x7F2CE8DD8F48>,
<DML 'SELECT' at 0x7F2CE8DD8FA8>,
<Whitespace ' ' at 0x7F2CE8DEC048>,
<Wildcard '*' at 0x7F2CE8DEC0A8>,
<Whitespace ' ' at 0x7F2CE8DEC108>,
<Keyword 'FROM' at 0x7F2CE8DEC168>,
<Whitespace ' ' at 0x7F2CE8DEC1C8>,
<Identifier 'tab2' at 0x7F2CE8DAFC00>,
<Punctuation ';' at 0x7F2CE8DEC288>] |
All things considered, let's upgrade our sqlparse dependency to be >=0.3.1 and hope the "CREATE TABLE LIKE" issue can be fixed in future version and then change our code accordingly. |
Since Apache-Superset is pinned to 0.3.0 version of sqlparse, we should get this fixed. (or explicitly declare we don't support this version)
The text was updated successfully, but these errors were encountered: