You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "ly9chee (via GitHub)" <gi...@apache.org> on 2023/06/15 08:01:14 UTC

[GitHub] [incubator-paimon-trino] ly9chee commented on issue #11: Support predicate pushdown for partitioned table

ly9chee commented on issue #11:
URL: https://github.com/apache/incubator-paimon-trino/issues/11#issuecomment-1592558829

   sure, bellow are the steps to reproduce:
   #### create a partition table
   ```sql
   CREATE TABLE `activity_daily` (
     `dt` CHAR(10) NOT NULL,
     `tenant_id` STRING NOT NULL,
     `order_count` BIGINT,
     PRIMARY KEY (`dt`, `tenant_id`) NOT ENFORCED
   ) PARTITIONED BY (`dt`)
   WITH (
     'bucket' = '1',
     'bucket-key' = 'tenant_id'
   );
   ```
   #### write some test data
   ```sql
   INSERT OVERWRITE `activity_daily` (`dt`, `tenant_id`, `order_count`) VALUES
       ('2023-06-01', '001', 1),
       ('2023-06-02', '001', 20),
       ('2023-06-02', '002', 5),
       ('2023-06-03', '002', 3),
       ('2023-06-04', '003', 6),
       ('2023-06-05', '001', 2),
       ('2023-06-05', '002', 3);
   ```
   #### (trino) query this table with a filter key
   ```sql
   select * from activity_daily where dt = '2023-06-02';
   ```
   
   <img width="1114" alt="image" src="https://github.com/apache/incubator-paimon-trino/assets/54972801/2c4e8163-ba57-4fcd-a336-3058d8aa0f7a">
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org