# Just the right time date predicates with Iceberg

DevFeed: [Just the right time date predicates with Iceberg](<https://devfeed.tech/articles/just-the-right-time-date-predicates-with-iceberg-8713.md>)

Original publisher: [Read original article](<https://trino.io/blog/2023/04/11/date-predicates.html>)

Author: Marius Grama

Published: 2023-04-11T00:00:00Z

Content type: article

Language: en

Sources: [Trino Blog](<https://devfeed.tech/sources/trino-blog.md>)

Topics: [Apache Iceberg](<https://devfeed.tech/topics/apache-iceberg.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>), [SQL](<https://devfeed.tech/topics/sql.md>)

Tags: [cast](<https://devfeed.tech/tags/cast.md>), [data-lake](<https://devfeed.tech/tags/data-lake.md>), [expression](<https://devfeed.tech/tags/expression.md>), [filter](<https://devfeed.tech/tags/filter.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [partitioning](<https://devfeed.tech/tags/partitioning.md>), [performance](<https://devfeed.tech/tags/performance.md>), [range](<https://devfeed.tech/tags/range.md>), [sql](<https://devfeed.tech/tags/sql.md>)

## AI overview

This article explains how date predicates can be optimized when querying Iceberg tables in a data lake. It covers partition pruning, hidden partitioning, constant folding, predicate pushdown, range predicates, and casting to help Trino avoid scanning irrelevant data and improve query performance.

## Source excerpt

In the data lake world, data partitioning is a technique that is critical to the performance of read operations. In order to avoid scanning large amounts of data accidentally, and also to limit the number of partitions that are being processed by a query, a query engine must push down constant expressions when filtering partitions.