laskoviymishka commented on code in PR #16972:
URL: https://github.com/apache/iceberg/pull/16972#discussion_r4677426685


##########
format/expressions-spec.md:
##########
@@ -228,6 +228,68 @@ Note that `year`, `month`, and `hour` transforms produce 
ordinal values and not
 [bucket-ref]: spec.md#bucket-transform-details
 [truncate-ref]: spec.md#truncate-transform-details
 
+### Collation functions
+
+A collation defines how `string` values are compared and ordered, for example 
case-insensitive, accent-insensitive, or locale-aware. These functions track 
collations and collation-aware bounds in [stats-only 
fields][stats-only-fields-ref], without changes to the table schema.
+
+| Function name                        | Description                           
                                      | Source types | Result type |
+|--------------------------------------|-----------------------------------------------------------------------------|--------------|-------------|
+| `default_collate(value, collation)`  | `value`, unchanged                    
                                      | `string`     | `string`    |
+| `collate(value, collation, version)` | Sort key of `value` under `collation` 
and `version`, followed by the UTF-8 bytes of `value` | `string`     | `binary` 
   |

Review Comment:
   Agreed. I kept only the original strings. I removed the `collate` function 
and the sort-key encoding. Each collation version now has its own 
`collation-value` stats-only field, and its bounds are original values compared 
under that collation. 
   
   Engines that use sort keys internally can compute them from these bounds.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to