Skip to content

fix(query): fix binder create table - #6899

Merged
mergify[bot] merged 9 commits into
databendlabs:mainfrom
sundy-li:binder-table
Jul 30, 2022
Merged

fix(query): fix binder create table#6899
mergify[bot] merged 9 commits into
databendlabs:mainfrom
sundy-li:binder-table

Conversation

@sundy-li

Copy link
Copy Markdown
Member

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Summary about this PR

  1. fix binder create table with lower case column name
  2. add TEXT, CHARACTER token

Fixes #issue

@vercel

vercel Bot commented Jul 29, 2022

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) Jul 30, 2022 at 2:36AM (UTC)

@sundy-li
sundy-li requested review from leiysky and xudong963 July 29, 2022 08:35
@mergify mergify Bot added the pr-bugfix this PR patches a bug in codebase label Jul 29, 2022
Comment thread common/ast/src/parser/token.rs

@xudong963 xudong963 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parser-related golden test results need to update.

@Xuanwo

Xuanwo commented Jul 29, 2022

Copy link
Copy Markdown
Member
Following failed statements:
---------------------------------------------
Failed to execute. Collected info: 1105 (HY000): Code: 1005, displayText = error: 
  --> SQL:1:35
  |
1 | create table db1.t as SELECT CHAR(77,121,83,81,76) AS hello;
  |                                   ^^ expected `(`, `UNION`, `EXCEPT`, `INTERSECT`, or `SELECT`

.

Parsed Statement
    at_line: 61,
    s_type: Statement: ok, type: None,
    suite_name: gen/02_function/02_0043_function_char,
    text:
        create table db1.t as SELECT CHAR(77,121,83,81,76) AS hello;
    results: [],
    runs_on: {'mysql', 'clickhouse', 'http'},
---------------------------------------------
Expected: statement ok must get success response, not error code in response
Message: 
Parsed Statement
    at_line: 61,
    s_type: Statement: ok, type: None,
    suite_name: gen/02_function/02_0043_function_char,
    text:
        create table db1.t as SELECT CHAR(77,121,83,81,76) AS hello;
    results: [],
    runs_on: {'mysql', 'clickhouse', 'http'},
---------------------------------------------
Failed to execute. Collected info: Orig exception: Code: 1005, displayText = error: 
  --> SQL:1:35
  |
1 | create table db1.t as SELECT CHAR(77,121,83,81,76) AS hello;
  |                                   ^^ expected `(`, `UNION`, `EXCEPT`, `INTERSECT`, or `SELECT`

.

Parsed Statement
    at_line: 61,
    s_type: Statement: ok, type: None,
    suite_name: gen/02_function/02_0043_function_char,
    text:
        create table db1.t as SELECT CHAR(77,121,83,81,76) AS hello;
    results: [],
    runs_on: {'mysql', 'clickhouse', 'http'},

@Xuanwo

Xuanwo commented Jul 30, 2022

Copy link
Copy Markdown
Member

@mergify update

@mergify

mergify Bot commented Jul 30, 2022

Copy link
Copy Markdown
Contributor

update

✅ Branch has been successfully updated

@mergify
mergify Bot merged commit 94af6a2 into databendlabs:main Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix this PR patches a bug in codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants