rlcyf opened a new issue #2223:
URL: https://github.com/apache/iceberg/issues/2223


   - Hdfs: 3.0.0
   - Hive: 3.1.2+2.3.6
   - Flink: 1.11.3
   - Iceberg: 0.11.0
   - trino: 351
   
   
   Flink SQL Create table
   ---------------
   1.use Flink SQL to create a table <sample>
      ```
       Flink SQL> CREATE TABLE ods.sample (id BIGINT COMMENT 'unique id',data 
STRING);
       [INFO] Table has been created.
   
       Flink SQL> INSERT INTO ods.sample VALUES (1, 'a');
       [INFO] Submitting SQL update statement to the cluster...
       [INFO] Table update statement has been successfully submitted to the 
cluster:
       Job ID: ce9e40b41320f894041110ea7a89f19a
      ```
   
   2.when show tables in trino there's nothing
      ```
       trino:ods> show tables;
       Table
       -------
       (0 rows)
    ```
   
   
   3.but the query can be normal use trino,flink can also!
   ```
       trino:ods> select * from sample;
       id | data
       ----+------
       1 | a
       (1 row)
   ```
   ```
       trino:ods> desc sample;
       Column |  Type   | Extra | Comment
       --------+---------+-------+---------
       id     | bigint  |       |
       data   | varchar |       |
       (2 rows)
   ```
   
   
   Trino create table Flink SQL insert value
   ---------------
   ```
   trino:ods> CREATE TABLE iceberg.ods.sample_partitioned (
           ->     order_date DATE,
           ->     account_number BIGINT,
           ->     customer VARCHAR)
           -> WITH (partitioning = ARRAY['month(order_date)', 
'bucket(account_number, 10)']);
   CREATE TABLE
   trino:ods> INSERT INTO ods.sample_partitioned VALUES (date '2021-01-06', 
10001,'iron Man');
   INSERT: 1 row
   ```
   
   ```
   trino:ods> show tables;
          Table
   --------------------
    sample_partitioned
   (1 row)
   ```
   
   use Flink SQL insert value
   ```
   Flink SQL> INSERT INTO ods.sample_partitioned VALUES (date '2021-01-06', 
100,'test11');
   [INFO] Submitting SQL update statement to the cluster...
   [INFO] Table update statement has been successfully submitted to the cluster:
   Job ID: 8a6ab1c0219bf07f2d1240f9f12a5b5a
   ```
   
   the table is no longer visible
   ```
   trino:ods> show tables;
    Table
   -------
   (0 rows)
   ```
   
   but you can still query in trino and Flink SQL
   ```
   trino:ods> select * from sample_partitioned;
    order_date | account_number | customer
   ------------+----------------+----------
    2021-01-06 |            100 | test11
    2021-01-06 |          10001 | iron Man
   (2 rows)
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to