Skip to content
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

ci: migration stateless test 20_others #6870

Merged
merged 2 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/logictest/logictest.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,10 @@ def assert_execute_query(self, statement):
try:
f = format_value(actual, len(statement.s_type.query_type))
except Exception:
raise LogicError(message = f"{statement} statement type is query but get no result")
raise LogicError(message = f"{statement} statement type is query but get no result", expected="query get result")

if statement.results is None or len(statement.results) == 0:
raise LogicError(message=f"No result found {statement}")
raise LogicError(message=f"No result found {statement}", expected="query get result")
hasResult = False
for resultset in statement.results:
if resultset[0].group("label") is not None and resultset[0].group(
Expand All @@ -386,7 +386,7 @@ def assert_execute_query(self, statement):
self.assert_query_equal(f, resultset, statement)
hasResult = True
if not hasResult:
raise LogicError(message=f"No result found {statement}")
raise LogicError(message=f"No result found {statement}", expected="query get result")

# expect the query just return error
def assert_execute_error(self, statement):
Expand Down
22 changes: 17 additions & 5 deletions tests/logictest/suites/gen/20+_others/20_0000_describe_table
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
statement ok
use default;

statement ok
DROP TABLE IF EXISTS t;

statement ok
CREATE TABLE t(a bigint null, b int null, c varchar(255) null, d smallint, e Date ) ENGINE = Null;

statement query TTTTT
statement query TTTTT
DESCRIBE t;

----
----
a BIGINT YES NULL
b INT YES NULL
c VARCHAR YES NULL
Expand All @@ -20,9 +17,24 @@ e DATE NO 0
statement ok
DESC t;

statement ok
DROP TABLE IF EXISTS t1;

statement ok
CREATE TABLE t1(a bigint null, b int null, c char(255) null, d smallint, e Date, f char(120) not null default '' ) ENGINE = Null;

statement ok
DESCRIBE t1;

statement ok
DESC t1;

statement ok
DESC INFORMATION_SCHEMA.COLUMNS;

statement ok
DROP TABLE IF EXISTS t;

statement ok
DROP TABLE IF EXISTS t1;

Loading