There are strange issues with DateTime64 values.
There is the date '1900-01-01 00:00' in DateTime64 column. I export the table data to s3 and import that data back to another table.
Dates higher than 2000 year are imported correctly. Date '1900-01-01 00:00' transforms to '1899-12-31 23:59:59'.
If I sort dates in the table in ascdending order the date '1899-12-31 23:59:59' is outputted last i.e. has max value.
If I take internal representation of that date I receive an error
SQL Error [400030]: Cannot call 'DATA_QUERY >>
select DateTime::ToMicroseconds(MAX(_dt)) as unique_date
FROM `<table>' with Status{code = INTERNAL_ERROR(code=400030), issues = [#1 contrib/ydb/library/yql/dq/runtime/dq_tasks_runner.cpp:58 ValidateParamValue(): requirement IsValidValue(*slot, value) failed, message: Error parsing task parameter, malformed value, parameter: %kqp%tx_result_binding_0_0, type: Datetime64, value: Embedded, size: 0, buffer: "o)\x1C\3106\211A\0\0\0\0\0\0\0" (S_FATAL), #2019 Query invalidated on scheme/internal error during Data execution (S_ERROR)]}