starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

StarRocks partition information pushdown failed,but trino can pushdown the scene normally.

Open LZGH opened this issue 10 months ago • 0 comments

Steps to reproduce the behavior (Required)

  1. hive table info
CREATE TABLE tmp.test_partition(
  id bigint COMMENT '', 
  name string COMMENT '')
COMMENT '测试表'
PARTITIONED BY ( 
  dt string COMMENT 'date partition key');
insert into tmp.test_partition (id,name,dt) values (1,'test','20250210');

2.set allow_hive_without_partition_filter = false; 3.select * from tmp.test_partition where substr(dt, 1, 8) = '20250210'; 4.


with from_dt as (
    select
        '20250209' as dt
)
SELECT
    *
FROM
    tmp.test_partition
WHERE
    dt > (
        select
            dt
        from
            from_dt
    );

Expected behavior (Required)

Query data normally.In the improvised analysis scenario, these SQL partition information fail to be pushed down, resulting in a large amount of data scanning and a query failure

Real behavior (Required)

report error Table test_partition partition pruning is invalid, please check: 1. The partition predicate must be included. 2. The left and right children of the partition predicate cannot be function parameters.

StarRocks version (Required)

3.3.4

LZGH avatar Feb 18 '25 06:02 LZGH