-
Notifications
You must be signed in to change notification settings - Fork 322
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
Solve problems in SQL commands #1761
Comments
what's the openmldb version are u using ? |
0.4.4 in docker (4pdosc/openmldb:0.4.4) |
@aceforeverd pls help reproduce and confirm this issue? |
reproduced.
looks like the sql is incomplete. May you pls provide the complete sql in single line ? SELECT * FROM ( SELECT * FROM test WINDOW win1 AS( PARTITION BY c1 ORDER BY c2 rows_range BETWEEN 172799999 PRECEDING AND 0s PRECEDING MAXSIZE 1000), win2 AS( PARTITION BY c1 ORDER BY c2 rows_range BETWEEN 172799999 PRECEDING AND 0s PRECEDING MAXSIZE 1000)) AS out0 last JOIN ( SELECT * FROM test t1 LAST JOIN test t2 ON t1.c2 = t2.c2) AS out1 ON out0.c2 = out1.c2; will check the reason
|
also removed the <tab> indent from physical_plan_str
also removed the <tab> indent from physical_plan_str
I find two problems when using the explain+sql commands via terminal
(1) Need to click the "enter" key twice before seeing the explain results:
127.0.0.1:6527/test> explain select * from test;
127.0.0.1:6527/test> DATA_PROVIDER(request=test)
(2) Need to split the sql with the semicolon (;) with a character (e.g., an enter key or space), otherwise it will report errors:
127.0.0.1:6527/test> select * from (select * from
-> window win1 as (partition by c1 order by c2 rows_range between 172799999 preceding and 0s preceding MAXSIZE 1000),
-> win2 as (partition by c1 order by c2 rows_range between 172799999 preceding and 0s preceding MAXSIZE 1000))
-> as out0
-> last join (select * from test t1 last join test t2 on t1.c2=t2.c2) as out1 on out0.c2=out1.c2;
->
-> ;
Error: Syntax error: Expected end of input but got ";" [at 6:1]
127.0.0.1:6527/test> select * from (select * from
-> window win1 as (partition by c1 order by c2 rows_range between 172799999 preceding and 0s preceding MAXSIZE 1000),
-> win2 as (partition by c1 order by c2 rows_range between 172799999 preceding and 0s preceding MAXSIZE 1000))
-> as out0
-> last join (select * from test t1 last join test t2 on t1.c2=t2.c2) as out1 on out0.c2=out1.c2
-> ;
c1 c2 c3 c6 c7 c1 c2 c3 c6 c7 c1 c2 c3 c6 c7
The text was updated successfully, but these errors were encountered: