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

Added regions/pipes/pipe_plugins/topics/subscriptions to information_schema / Fixed the time precision of queries table / Implemented authentification for information_schema table #14680

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1ba5029
partial
Caideyipi Jan 10, 2025
dde1067
Fix
Caideyipi Jan 10, 2025
bf7e319
Update InformationSchemaContentSupplierFactory.java
Caideyipi Jan 10, 2025
c7fe998
Merge branch 'master' of https://github.com/apache/iotdb into sys-table
Caideyipi Jan 10, 2025
39a68c0
Added username
Caideyipi Jan 10, 2025
8e2002a
Merge branch 'master' of https://github.com/apache/iotdb into sys-table
Caideyipi Jan 10, 2025
88603bc
Update InformationSchemaContentSupplierFactory.java
Caideyipi Jan 10, 2025
ef3f51e
Update InformationSchemaContentSupplierFactory.java
Caideyipi Jan 10, 2025
e53b306
Update InformationSchemaContentSupplierFactory.java
Caideyipi Jan 10, 2025
9de32b6
Show pipe
Caideyipi Jan 10, 2025
243f4a0
Update InformationSchemaContentSupplierFactory.java
Caideyipi Jan 10, 2025
c67e812
Fix
Caideyipi Jan 10, 2025
239db79
Update InformationSchema.java
Caideyipi Jan 10, 2025
d8f6973
Fix
Caideyipi Jan 10, 2025
4296349
Fix precision
Caideyipi Jan 10, 2025
994d82e
Update ColumnHeaderConstant.java
Caideyipi Jan 10, 2025
0c6380a
plugin
Caideyipi Jan 10, 2025
2dc47e9
Merge branch 'sys-table' of https://github.com/Caideyipi/iotdb; branc…
Caideyipi Jan 10, 2025
1e30e14
Update InformationSchemaContentSupplierFactory.java
Caideyipi Jan 10, 2025
91a9f51
Added topics
Caideyipi Jan 10, 2025
ae79c5e
Merge branch 'master' of https://github.com/apache/iotdb into sys-table
Caideyipi Jan 13, 2025
1158609
Update InformationSchemaContentSupplierFactory.java
Caideyipi Jan 13, 2025
00780fa
Update IoTDBDatabaseIT.java
Caideyipi Jan 13, 2025
f321be8
Update IoTDBDatabaseIT.java
Caideyipi Jan 13, 2025
755cdd4
Update SRStatementGenerator.java
Caideyipi Jan 13, 2025
abe80a8
Update ShowQueriesTest.java
Caideyipi Jan 13, 2025
8280b43
Update IoTDBDatabaseIT.java
Caideyipi Jan 13, 2025
1dc9d6e
Update IoTDBDatabaseIT.java
Caideyipi Jan 13, 2025
69f103e
Update IoTDBDatabaseIT.java
Caideyipi Jan 13, 2025
19f8225
Update IoTDBDatabaseIT.java
Caideyipi Jan 14, 2025
1acd0a1
Update IoTDBDatabaseIT.java
Caideyipi Jan 14, 2025
620a61e
Update InformationSchemaContentSupplierFactory.java
Caideyipi Jan 14, 2025
a808ea1
Update IoTDBDatabaseIT.java
Caideyipi Jan 14, 2025
8296350
Update IoTDBDatabaseIT.java
Caideyipi Jan 15, 2025
2dd240c
Merge branch 'master' of https://github.com/apache/iotdb into sys-table
Caideyipi Jan 15, 2025
f546c2d
Update IoTDBDatabaseIT.java
Caideyipi Jan 15, 2025
f47a81b
Update IoTDBDatabaseIT.java
Caideyipi Jan 15, 2025
8975e8d
Update InformationSchemaContentSupplierFactory.java
Caideyipi Jan 22, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,16 @@ public void testInformationSchema() throws SQLException {
statement.executeQuery("show tables"),
"TableName,TTL(ms),",
new HashSet<>(
Arrays.asList("databases,INF,", "tables,INF,", "columns,INF,", "queries,INF,")));
Arrays.asList(
"databases,INF,",
"tables,INF,",
"columns,INF,",
"queries,INF,",
"regions,INF,",
"topics,INF,",
"pipe_plugins,INF,",
"pipes,INF,",
"subscriptions,INF,")));

TestUtils.assertResultSetEqual(
statement.executeQuery("desc databases"),
Expand Down Expand Up @@ -405,7 +414,44 @@ public void testInformationSchema() throws SQLException {
"start_time,TIMESTAMP,ATTRIBUTE,",
"datanode_id,INT32,ATTRIBUTE,",
"elapsed_time,FLOAT,ATTRIBUTE,",
"statement,STRING,ATTRIBUTE,")));
"statement,STRING,ATTRIBUTE,",
"user,STRING,ATTRIBUTE,")));
TestUtils.assertResultSetEqual(
statement.executeQuery("desc pipes"),
"ColumnName,DataType,Category,",
new HashSet<>(
Arrays.asList(
"id,STRING,TAG,",
"creation_time,TIMESTAMP,ATTRIBUTE,",
"state,STRING,ATTRIBUTE,",
"pipe_source,STRING,ATTRIBUTE,",
"pipe_processor,STRING,ATTRIBUTE,",
"pipe_sink,STRING,ATTRIBUTE,",
"exception_message,STRING,ATTRIBUTE,",
"remaining_event_count,INT64,ATTRIBUTE,",
"estimated_remaining_seconds,DOUBLE,ATTRIBUTE,")));
TestUtils.assertResultSetEqual(
statement.executeQuery("desc pipe_plugins"),
"ColumnName,DataType,Category,",
new HashSet<>(
Arrays.asList(
"plugin_name,STRING,TAG,",
"plugin_type,STRING,ATTRIBUTE,",
"class_name,STRING,ATTRIBUTE,",
"plugin_jar,STRING,ATTRIBUTE,")));
TestUtils.assertResultSetEqual(
statement.executeQuery("desc topics"),
"ColumnName,DataType,Category,",
new HashSet<>(
Arrays.asList("topic_name,STRING,TAG,", "topic_configs,STRING,ATTRIBUTE,")));
TestUtils.assertResultSetEqual(
statement.executeQuery("desc subscriptions"),
"ColumnName,DataType,Category,",
new HashSet<>(
Arrays.asList(
"topic_name,STRING,TAG,",
"consumer_group_name,STRING,TAG,",
"subscribed_consumers,STRING,ATTRIBUTE,")));

// Test table query
statement.execute("create database test");
Expand All @@ -427,11 +473,16 @@ public void testInformationSchema() throws SQLException {
"information_schema,tables,INF,USING,",
"information_schema,columns,INF,USING,",
"information_schema,queries,INF,USING,",
"information_schema,regions,INF,USING,",
"information_schema,topics,INF,USING,",
"information_schema,pipe_plugins,INF,USING,",
"information_schema,pipes,INF,USING,",
"information_schema,subscriptions,INF,USING,",
"test,test,INF,USING,")));
TestUtils.assertResultSetEqual(
statement.executeQuery("count devices from tables where status = 'USING'"),
"count(devices),",
Collections.singleton("5,"));
Collections.singleton("10,"));
TestUtils.assertResultSetEqual(
statement.executeQuery(
"select * from columns where table_name = 'queries' or database = 'test'"),
Expand All @@ -443,10 +494,36 @@ public void testInformationSchema() throws SQLException {
"information_schema,queries,datanode_id,INT32,ATTRIBUTE,USING,",
"information_schema,queries,elapsed_time,FLOAT,ATTRIBUTE,USING,",
"information_schema,queries,statement,STRING,ATTRIBUTE,USING,",
"information_schema,queries,user,STRING,ATTRIBUTE,USING,",
"test,test,time,TIMESTAMP,TIME,USING,",
"test,test,a,STRING,TAG,USING,",
"test,test,b,STRING,ATTRIBUTE,USING,",
"test,test,c,INT32,FIELD,USING,")));

statement.execute(
"create pipe a2b with source('double-living'='true') with sink ('sink'='write-back-sink')");
TestUtils.assertResultSetEqual(
statement.executeQuery("select id, pipe_sink from pipes where creation_time > 0"),
"id,pipe_sink,",
Collections.singleton("a2b,{sink=write-back-sink},"));
TestUtils.assertResultSetEqual(
statement.executeQuery("select * from pipe_plugins"),
"plugin_name,plugin_type,class_name,plugin_jar,",
new HashSet<>(
Arrays.asList(
"IOTDB-THRIFT-SSL-SINK,Builtin,org.apache.iotdb.commons.pipe.agent.plugin.builtin.connector.iotdb.thrift.IoTDBThriftSslConnector,null,",
"IOTDB-AIR-GAP-SINK,Builtin,org.apache.iotdb.commons.pipe.agent.plugin.builtin.connector.iotdb.airgap.IoTDBAirGapConnector,null,",
"DO-NOTHING-SINK,Builtin,org.apache.iotdb.commons.pipe.agent.plugin.builtin.connector.donothing.DoNothingConnector,null,",
"DO-NOTHING-PROCESSOR,Builtin,org.apache.iotdb.commons.pipe.agent.plugin.builtin.processor.donothing.DoNothingProcessor,null,",
"IOTDB-THRIFT-SINK,Builtin,org.apache.iotdb.commons.pipe.agent.plugin.builtin.connector.iotdb.thrift.IoTDBThriftConnector,null,",
"IOTDB-SOURCE,Builtin,org.apache.iotdb.commons.pipe.agent.plugin.builtin.extractor.iotdb.IoTDBExtractor,null,")));

statement.execute("create topic tp with ('start-time'='2025-01-13T10:03:19.229+08:00')");
TestUtils.assertResultSetEqual(
statement.executeQuery("select * from topics where topic_name = 'tp'"),
"topic_name,topic_configs,",
Collections.singleton(
"tp,{__system.sql-dialect=table, start-time=2025-01-13T10:03:19.229+08:00},"));
}
}

Expand Down
Loading
Loading