MCPcopy Create free account
hub / github.com/apache/impala / Date

Class Date

tests/query_test/test_insert_parquet.py:85–96  ·  view source on GitHub ↗

Class to compare dates specified as year-month-day to dates specified as days since epoch.

Source from the content-addressed store, hash-verified

83
84
85class Date():
86 """Class to compare dates specified as year-month-day to dates specified as days since
87 epoch.
88 """
89 def __init__(self, year, month, day):
90 self.days_since_epoch = (date(year, month, day) - date(1970, 1, 1)).days
91
92 def __eq__(self, other_days_since_eopch):
93 return self.days_since_epoch == other_days_since_eopch
94
95 def __hash__(self):
96 return hash(self.days_since_epoch)
97
98
99ColumnStats = namedtuple('ColumnStats', ['name', 'min', 'max', 'null_count'])

Callers 2

AddSubMethod · 0.85

Calls

no outgoing calls

Tested by 1