This documentation is for an unreleased version of Apache Paimon. We recommend you use the latest stable version.
SQL Functions
SQL Functions #
This section introduce all available Paimon Spark functions.
max_pt #
max_pt($table_name)
It accepts a string type literal to specify the table name and return a max-valid-toplevel partition value.
- valid: the partition which contains data files
- toplevel: only return the first partition value if the table has multi-partition columns
It would throw exception when:
- the table is not a partitioned table
- the partitioned table does not have partition
- all of the partitions do not contains data files
Example
> SELECT max_pt('t');
20250101
> SELECT * FROM t where pt = max_pt('t');
a, 20250101
Since: 1.1.0