diff --git a/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBDatabaseIT.java b/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBDatabaseIT.java index 4eab11ca3c76f..953e4293cd06b 100644 --- a/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBDatabaseIT.java +++ b/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBDatabaseIT.java @@ -285,6 +285,51 @@ public void testManageDatabase() { } } + @Test + public void testShowCreateDatabase() throws SQLException { + try (final Connection connection = + EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT); + final Statement statement = connection.createStatement()) { + statement.execute( + "create database test_show_create_db with (ttl=300, schema_region_group_num=DEFAULT, data_region_group_num=DEFAULT, time_partition_interval=100000)"); + + TestUtils.assertResultSetEqual( + statement.executeQuery("show create database test_show_create_db"), + "Database,Create Database,", + Collections.singleton( + "test_show_create_db,CREATE DATABASE \"test_show_create_db\" WITH (ttl=300,time_partition_interval=100000,schema_region_group_num=0,data_region_group_num=0),")); + } + } + + @Test + public void testShowCreatePipe() throws SQLException { + try (final Connection connection = + EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT); + final Statement statement = connection.createStatement()) { + statement.execute("create pipe test_show_create_pipe ('sink'='do-nothing-sink')"); + + TestUtils.assertResultSetEqual( + statement.executeQuery("show create pipe test_show_create_pipe"), + "Pipe,Create Pipe,", + Collections.singleton( + "test_show_create_pipe,CREATE PIPE \"test_show_create_pipe\" WITH SINK ('sink'='do-nothing-sink'),")); + } + } + + @Test + public void testShowCreateInformationSchemaDatabase() throws SQLException { + try (final Connection connection = + EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT); + final Statement statement = connection.createStatement()) { + try { + statement.executeQuery("show create database information_schema"); + fail("show create database information_schema shouldn't succeed"); + } catch (final SQLException e) { + assertEquals("701: The system database does not support show create.", e.getMessage()); + } + } + } + @Test public void testDatabaseWithSpecificCharacters() throws SQLException { try (final Connection connection = diff --git a/iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/PipeProcessor.java b/iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/PipeProcessor.java index 0e849ffd59679..7f7810993afb2 100644 --- a/iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/PipeProcessor.java +++ b/iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/PipeProcessor.java @@ -30,8 +30,8 @@ /** * {@link PipeProcessor} * - *

{@link PipeProcessor} is used to filter and transform the {@link Event} formed by the {@link - * PipeExtractor}. + *

{@link PipeProcessor} is used to filter and transform the {@link Event} supplied by the {@link + * PipeSource}. * *

The lifecycle of a {@link PipeProcessor} is as follows: * @@ -44,15 +44,14 @@ * to config the runtime behavior of the {@link PipeProcessor}. *

  • While the collaboration task is in progress: * *
  • When the collaboration task is cancelled (the `DROP PIPE` command is executed), the {@link * PipeProcessor#close() } method will be called. diff --git a/iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/PipeSource.java b/iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/PipeSource.java index def0e6e42ff4e..edcd2aa65562e 100644 --- a/iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/PipeSource.java +++ b/iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/PipeSource.java @@ -34,9 +34,10 @@ *

    The lifecycle of a {@link PipeSource} is as follows: * *