I would suggest to repartition table by dt only (yyyy-MM-dd) instead of year
, month
, day
, this is simple and partition pruning will work, though queries using year only filter like where year>'2020'
should be rewritten as dt>'2020-01-01'
and so on.
Also BTW in Hive partition pruning works fine with queries like this:
where concat(year, '-', month, '-', day) >= '2018-03-07'
and
concat(year, '-', month, '-', day) <= '2020-03-06'
I cant check does the same works in Presto or not but it worth trying. You can use ||
operator instead of concat()
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…