rdblue commented on code in PR #5462:
URL: https://github.com/apache/iceberg/pull/5462#discussion_r942777166
##########
python/tests/test_transforms.py:
##########
@@ -139,6 +143,104 @@ def test_string_with_surrogate_pair():
assert bucket_transform(string_with_surrogate_pair) == mmh3.hash(as_bytes)
[email protected](
+ "date,date_transform,expected",
+ [
+ (47, YearTransform(), "2017"),
+ (575, MonthTransform(), "2017-12"),
+ (17501, DayTransform(), "2017-12-01"),
+ ],
+)
+def test_date_to_human_string(date, date_transform, expected):
+ assert date_transform.to_human_string(DateType(), None) == "null"
+ assert date_transform.to_human_string(DateType(), date) == expected
+
+
[email protected](
+ "timestamp,time_transform,expected",
Review Comment:
The first value is not a timestamp, it is the result of applying a
transform. The first 3 cases here are identical to the cases for "date" because
of that. Can you remove the `date` version of this and rename this argument to
"value"? The test name should also not include "timestamp" or "ts" because this
is converting output values to strings.
--
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]