wypoon commented on PR #12117:
URL: https://github.com/apache/iceberg/pull/12117#issuecomment-2649532502

   @RussellSpitzer it's for consistency. As you know, the spec specifies 
`year`, `month`, `day` and `hour` for the partition transforms. Originally, 
Spark only supported the plural forms `years`, `months`, `days` and `hours` for 
the transforms and that led to confusion. That situation was rectified by 
supporting the singular forms for the transforms (while still supporting the 
plural forms for backward compatibility). However, for system functions (to use 
in querying tables), only the plural form is supported. By supporting the 
singular forms, users (especially new ones coming to Iceberg without knowledge 
of the historical baggage) will be able to use the singular form throughout, 
which is a better and more consistent user experience.
   
   E.g.,
   ```
   spark.sql("create table foo (ts timestamp, data string, ...) partitioned by 
day(ts)")
   ...
   spark.sql("select * from foo where iceberg_catalog.system.day(ts) = 
'2025-02-01'").show(false)
   ```


-- 
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-unsubscr...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to