Skip to content

Commit 6a52c08

Browse files
committed
trigger ITs; cleanup
1 parent 957a702 commit 6a52c08

File tree

3 files changed

+26
-27
lines changed

3 files changed

+26
-27
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"comment": "Modify this file in a trivial way to cause this test suite to run",
3-
"modification": 16
3+
"modification": 1
44
}

sdks/python/apache_beam/transforms/managed_iceberg_it_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# limitations under the License.
1616
#
1717
import datetime
18-
import os
1918
import unittest
2019
import uuid
2120

sdks/python/apache_beam/typehints/schemas.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -992,31 +992,31 @@ def to_language_type(self, value):
992992
return Timestamp(seconds=int(value.seconds), micros=int(value.micros))
993993

994994

995-
# @LogicalType._register_internal
996-
# class Date(NoArgumentLogicalType[datetime.date, np.int64]):
997-
# """Date logical type that handles ``datetime.date``, days since epoch."""
998-
# EPOCH = datetime.date(1970, 1, 1)
999-
#
1000-
# @classmethod
1001-
# def urn(cls):
1002-
# return common_urns.date.urn
1003-
#
1004-
# @classmethod
1005-
# def representation_type(cls):
1006-
# # type: () -> type
1007-
# return np.int64
1008-
#
1009-
# @classmethod
1010-
# def language_type(cls):
1011-
# return datetime.date
1012-
#
1013-
# def to_representation_type(self, value):
1014-
# # type: (datetime.date) -> np.int64
1015-
# return (value - self.EPOCH).days
1016-
#
1017-
# def to_language_type(self, value):
1018-
# # type: (np.int64) -> datetime.date
1019-
# return self.EPOCH + datetime.timedelta(days=value)
995+
@LogicalType._register_internal
996+
class Date(NoArgumentLogicalType[datetime.date, np.int64]):
997+
"""Date logical type that handles ``datetime.date``, days since epoch."""
998+
EPOCH = datetime.date(1970, 1, 1)
999+
1000+
@classmethod
1001+
def urn(cls):
1002+
return common_urns.date.urn
1003+
1004+
@classmethod
1005+
def representation_type(cls):
1006+
# type: () -> type
1007+
return np.int64
1008+
1009+
@classmethod
1010+
def language_type(cls):
1011+
return datetime.date
1012+
1013+
def to_representation_type(self, value):
1014+
# type: (datetime.date) -> np.int64
1015+
return (value - self.EPOCH).days
1016+
1017+
def to_language_type(self, value):
1018+
# type: (np.int64) -> datetime.date
1019+
return self.EPOCH + datetime.timedelta(days=value)
10201020

10211021

10221022
@LogicalType._register_internal

0 commit comments

Comments
 (0)