-
Notifications
You must be signed in to change notification settings - Fork 67
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
view was able to created even though the syntax is invalid #729
Comments
To reproduce this, create an external stream or even a regular stream, then create a view |
timeplus-OptiPlex-7000 :) create stream test(id int, value int)
CREATE STREAM test
(
`id` int,
`value` int
)
Query id: 72725950-684c-49d2-9b07-91843e84e449
Ok.
0 rows in set. Elapsed: 0.124 sec.
timeplus-OptiPlex-7000 :) insert into test(id, value) values (1, 2)
INSERT INTO test (id, value) FORMAT Values
Query id: edfe1456-0007-453e-bba2-cdb70adb5824
Ok.
1 row in set. Elapsed: 0.009 sec.
timeplus-OptiPlex-7000 :) insert into test(id, value) values (1, 8)
INSERT INTO test (id, value) FORMAT Values
Query id: 9392862e-7441-4d77-83bb-e3e1a37079fc
Ok.
1 row in set. Elapsed: 0.008 sec.
timeplus-OptiPlex-7000 :) select count() from test where _tp_time>now()- interval '1 minute'
SELECT
count()
FROM
test
WHERE
_tp_time > (now() - INTERVAL MINUTE)
Query id: e9fbb28f-7f57-47d1-931e-8074e403208e
┌─count()─┐
│ 2 │
└─────────┘
Cancelling query.
Query was cancelled.
1 row in set. Elapsed: 3.330 sec.
timeplus-OptiPlex-7000 :) create view v as select count() from test where _tp_time>now()- interval '1 minute'
CREATE VIEW v AS
SELECT
count()
FROM
test
WHERE
_tp_time > (now() - INTERVAL MINUTE)
Query id: e46d6db7-c304-4308-8de9-418d9c66f2ca
Ok.
0 rows in set. Elapsed: 0.010 sec.
timeplus-OptiPlex-7000 :) select * from v
SELECT
*
FROM
v
Query id: d1207fad-5449-49c9-859b-0c9e0916fad2
┌─count()─┐
│ 2 │
└─────────┘
Cancelling query.
Query was cancelled.
1 row in set. Elapsed: 3.438 sec.
timeplus-OptiPlex-7000 :) I don't see any problem here, and the |
@jovezhong @lizhou1111 if you check the screenshot here, there is no |
Describe what's wrong
The user created a view with invalid SQL. Proton doesn't block the request.
How to reproduce
We don't have the original SQL yet but the broken SQL seems to be
WHERE time >= (now() - INTERVAL MINUTE)
Error message and/or stacktrace
Show create stream XXX
Additional context
The text was updated successfully, but these errors were encountered: