Skip to content

Commit

Permalink
sdfsdf
Browse files Browse the repository at this point in the history
  • Loading branch information
iamlinjunhong committed Sep 4, 2023
1 parent 1203823 commit 4c45fd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pkg/sql/parsers/dialect/mysql/mysql_sql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ var (
input string
output string
}{
input: "create view cte_view as( with t as (select * from MyEmployees) select * from t);",
output: "create stream s (a varchar, b varchar) with (type = kafka, topic = user, partion = 1, value = json, bootstrap.servers = 127.0.0.1:62610)",
input: "create connector s with (\"type\"='kafkamo', \"topic\"= 'user', \"partion\" = '1', \"value\"= 'json', \"bootstrap.servers\" = '127.0.0.1:62610');",
output: "create connector s with (type = kafkamo, topic = user, partion = 1, value = json, bootstrap.servers = 127.0.0.1:62610)",
}
)

Expand Down
8 changes: 4 additions & 4 deletions pkg/sql/plan/build_ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ func genViewTableDef(ctx CompilerContext, stmt *tree.Select) (*plan.TableDef, er
var stmtPlan *Plan
var err error
switch s := stmt.Select.(type) {
case *tree.SelectClause:
stmtPlan, err = runBuildSelectByBinder(plan.Query_SELECT, ctx, stmt, false)
case *tree.ParenSelect:
stmtPlan, err = runBuildSelectByBinder(plan.Query_SELECT, ctx, s.Select, false)
if err != nil {
return nil, err
}
case *tree.ParenSelect:
stmtPlan, err = runBuildSelectByBinder(plan.Query_SELECT, ctx, s.Select, false)
default:
stmtPlan, err = runBuildSelectByBinder(plan.Query_SELECT, ctx, stmt, false)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 4c45fd6

Please sign in to comment.