You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by gy...@apache.org on 2022/07/07 15:00:13 UTC

[flink-kubernetes-operator] branch main updated: [FLINK-27009] Long running SQL example jobs

This is an automated email from the ASF dual-hosted git repository.

gyfora pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new d0d0497  [FLINK-27009] Long running SQL example jobs
d0d0497 is described below

commit d0d04979ee31c3b7c7665f0372c56cc0f7de56a6
Author: Marton Balassi <ma...@apple.com>
AuthorDate: Thu Jul 7 16:22:45 2022 +0200

    [FLINK-27009] Long running SQL example jobs
---
 .../sql-scripts/simple.sql                         | 17 +++++++++-----
 .../sql-scripts/statement-set.sql                  | 27 +++++++++++-----------
 2 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/examples/flink-sql-runner-example/sql-scripts/simple.sql b/examples/flink-sql-runner-example/sql-scripts/simple.sql
index 8b8634e..3035af4 100644
--- a/examples/flink-sql-runner-example/sql-scripts/simple.sql
+++ b/examples/flink-sql-runner-example/sql-scripts/simple.sql
@@ -16,12 +16,17 @@
  * limitations under the License.
  */
 
-CREATE TABLE blackhole_table (
-  name STRING,
-  age INT
+
+CREATE TABLE orders (
+  order_number BIGINT,
+  price        DECIMAL(32,2),
+  buyer        ROW<first_name STRING, last_name STRING>,
+  order_time   TIMESTAMP(3)
 ) WITH (
-  'connector' = 'blackhole'
+  'connector' = 'datagen'
 );
 
-INSERT INTO blackhole_table
-  VALUES ('fred flintstone', 35), ('barney rubble', 32);
+CREATE TABLE print_table WITH ('connector' = 'print')
+  LIKE orders;
+
+INSERT INTO print_table SELECT * FROM orders;
diff --git a/examples/flink-sql-runner-example/sql-scripts/statement-set.sql b/examples/flink-sql-runner-example/sql-scripts/statement-set.sql
index ec45fd2..5aac911 100644
--- a/examples/flink-sql-runner-example/sql-scripts/statement-set.sql
+++ b/examples/flink-sql-runner-example/sql-scripts/statement-set.sql
@@ -16,23 +16,22 @@
  * limitations under the License.
  */
 
-CREATE TABLE blackhole_table (
-  name STRING,
-  age INT
+CREATE TABLE orders (
+  order_number BIGINT,
+  price        DECIMAL(32,2),
+  buyer        ROW<first_name STRING, last_name STRING>,
+  order_time   TIMESTAMP(3)
 ) WITH (
-  'connector' = 'blackhole'
-);
-CREATE TABLE blackhole_table2 (
-  name STRING,
-  age INT
-) WITH (
-  'connector' = 'blackhole'
+  'connector' = 'datagen'
 );
 
+CREATE TABLE print_table WITH ('connector' = 'print')
+    LIKE orders;
+CREATE TABLE blackhole_table WITH ('connector' = 'blackhole')
+    LIKE orders;
+
 EXECUTE STATEMENT SET
 BEGIN
-INSERT INTO blackhole_table
-  VALUES ('fred flintstone', 35), ('barney rubble', 32);
-INSERT INTO blackhole_table2
-  VALUES ('fred flintstone', 35), ('barney rubble', 32);
+INSERT INTO print_table SELECT * FROM orders;
+INSERT INTO blackhole_table SELECT * FROM orders;
 END;