Skip to content

Commit

Permalink
fix: instance test
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Dec 29, 2023
1 parent 219efa1 commit 87b92e9
Showing 1 changed file with 42 additions and 34 deletions.
76 changes: 42 additions & 34 deletions tests-integration/src/tests/instance_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1775,45 +1775,53 @@ async fn test_information_schema_dot_columns(instance: Arc<dyn MockInstance>) {

let output = execute_sql(&instance, sql).await;
let expected = "\
+---------------+--------------------+------------+---------------+-----------+---------------+
| table_catalog | table_schema | table_name | column_name | data_type | semantic_type |
+---------------+--------------------+------------+---------------+-----------+---------------+
| greptime | information_schema | columns | table_catalog | String | FIELD |
| greptime | information_schema | columns | table_schema | String | FIELD |
| greptime | information_schema | columns | table_name | String | FIELD |
| greptime | information_schema | columns | column_name | String | FIELD |
| greptime | information_schema | columns | data_type | String | FIELD |
| greptime | information_schema | columns | semantic_type | String | FIELD |
| greptime | public | numbers | number | UInt32 | TAG |
| greptime | information_schema | tables | table_catalog | String | FIELD |
| greptime | information_schema | tables | table_schema | String | FIELD |
| greptime | information_schema | tables | table_name | String | FIELD |
| greptime | information_schema | tables | table_type | String | FIELD |
| greptime | information_schema | tables | table_id | UInt32 | FIELD |
| greptime | information_schema | tables | engine | String | FIELD |
+---------------+--------------------+------------+---------------+-----------+---------------+";
+---------------+--------------------+------------+----------------+-----------+---------------+
| table_catalog | table_schema | table_name | column_name | data_type | semantic_type |
+---------------+--------------------+------------+----------------+-----------+---------------+
| greptime | information_schema | columns | table_catalog | String | FIELD |
| greptime | information_schema | columns | table_schema | String | FIELD |
| greptime | information_schema | columns | table_name | String | FIELD |
| greptime | information_schema | columns | column_name | String | FIELD |
| greptime | information_schema | columns | data_type | String | FIELD |
| greptime | information_schema | columns | semantic_type | String | FIELD |
| greptime | information_schema | columns | column_default | String | FIELD |
| greptime | information_schema | columns | is_nullable | String | FIELD |
| greptime | information_schema | columns | column_type | String | FIELD |
| greptime | information_schema | columns | column_comment | String | FIELD |
| greptime | public | numbers | number | UInt32 | TAG |
| greptime | information_schema | tables | table_catalog | String | FIELD |
| greptime | information_schema | tables | table_schema | String | FIELD |
| greptime | information_schema | tables | table_name | String | FIELD |
| greptime | information_schema | tables | table_type | String | FIELD |
| greptime | information_schema | tables | table_id | UInt32 | FIELD |
| greptime | information_schema | tables | engine | String | FIELD |
+---------------+--------------------+------------+----------------+-----------+---------------+";

check_output_stream(output, expected).await;

let output = execute_sql_with(&instance, sql, query_ctx).await;
let expected = "\
+-----------------+--------------------+---------------+---------------+----------------------+---------------+
| table_catalog | table_schema | table_name | column_name | data_type | semantic_type |
+-----------------+--------------------+---------------+---------------+----------------------+---------------+
| another_catalog | another_schema | another_table | i | TimestampMillisecond | TIMESTAMP |
| another_catalog | information_schema | columns | table_catalog | String | FIELD |
| another_catalog | information_schema | columns | table_schema | String | FIELD |
| another_catalog | information_schema | columns | table_name | String | FIELD |
| another_catalog | information_schema | columns | column_name | String | FIELD |
| another_catalog | information_schema | columns | data_type | String | FIELD |
| another_catalog | information_schema | columns | semantic_type | String | FIELD |
| another_catalog | information_schema | tables | table_catalog | String | FIELD |
| another_catalog | information_schema | tables | table_schema | String | FIELD |
| another_catalog | information_schema | tables | table_name | String | FIELD |
| another_catalog | information_schema | tables | table_type | String | FIELD |
| another_catalog | information_schema | tables | table_id | UInt32 | FIELD |
| another_catalog | information_schema | tables | engine | String | FIELD |
+-----------------+--------------------+---------------+---------------+----------------------+---------------+";
+-----------------+--------------------+---------------+----------------+----------------------+---------------+
| table_catalog | table_schema | table_name | column_name | data_type | semantic_type |
+-----------------+--------------------+---------------+----------------+----------------------+---------------+
| another_catalog | another_schema | another_table | i | TimestampMillisecond | TIMESTAMP |
| another_catalog | information_schema | columns | table_catalog | String | FIELD |
| another_catalog | information_schema | columns | table_schema | String | FIELD |
| another_catalog | information_schema | columns | table_name | String | FIELD |
| another_catalog | information_schema | columns | column_name | String | FIELD |
| another_catalog | information_schema | columns | data_type | String | FIELD |
| another_catalog | information_schema | columns | semantic_type | String | FIELD |
| another_catalog | information_schema | columns | column_default | String | FIELD |
| another_catalog | information_schema | columns | is_nullable | String | FIELD |
| another_catalog | information_schema | columns | column_type | String | FIELD |
| another_catalog | information_schema | columns | column_comment | String | FIELD |
| another_catalog | information_schema | tables | table_catalog | String | FIELD |
| another_catalog | information_schema | tables | table_schema | String | FIELD |
| another_catalog | information_schema | tables | table_name | String | FIELD |
| another_catalog | information_schema | tables | table_type | String | FIELD |
| another_catalog | information_schema | tables | table_id | UInt32 | FIELD |
| another_catalog | information_schema | tables | engine | String | FIELD |
+-----------------+--------------------+---------------+----------------+----------------------+---------------+";

check_output_stream(output, expected).await;
}
Expand Down

0 comments on commit 87b92e9

Please sign in to comment.