Search before asking
Version
4.0.2 and 4.0.5
Iceberg Table format Version : Iceberg v2
What's Wrong?
When querying an Iceberg table in Doris via Iceberg Catalog, DATE columns are consistently shifted by -1 day compared to Spark/Beeline for the same Iceberg snapshot.
This affects all DATE values and is reproducible across multiple rows and tables.
What You Expected?
Date Column should be return the same data when accessing in doris via iceberg catalog and Spark/Beeline
How to Reproduce?
SPARK:
CREATE TABLE test.mughil_test (
id_col BIGINT,
date_col DATE,
ts_col TIMESTAMP
)
USING iceberg;
INSERT INTO test.mughil_test VALUES
(1, DATE '1970-01-01', TIMESTAMP '1970-01-01 00:00:00'),
(2, DATE '1970-01-02', TIMESTAMP '1970-01-02 00:00:00'),
(3, DATE '1977-04-18', TIMESTAMP '1977-04-18 00:00:00'),
(4, DATE '1977-04-19', TIMESTAMP '1977-04-19 00:00:00'),
(5, DATE '1985-01-31', TIMESTAMP '1985-01-31 00:00:00'),
(6, DATE '2000-01-01', TIMESTAMP '2000-01-01 00:00:00');
spark-sql> SELECT * FROM test.mughil_test ORDER BY id;
id d ts
1 1970-01-01 1970-01-01 00:00:00
2 1970-01-02 1970-01-02 00:00:00
3 1977-04-18 1977-04-18 00:00:00
4 1977-04-19 1977-04-19 00:00:00
5 1985-01-31 1985-01-31 00:00:00
6 2000-01-01 2000-01-01 00:00:00
Time taken: 1.868 seconds, Fetched 6 row(s)
Doris Via Iceberg Catalog:
mysql> SELECT id, d, ts
-> FROM test_iceberg.test.mughil_test
-> ORDER BY id;
+------+------------+----------------------------+
| id | d | ts |
+------+------------+----------------------------+
| 1 | 1969-12-31 | 1970-01-01 00:00:00.000000 |
| 2 | 1970-01-01 | 1970-01-02 00:00:00.000000 |
| 3 | 1977-04-17 | 1977-04-18 00:00:00.000000 |
| 4 | 1977-04-18 | 1977-04-19 00:00:00.000000 |
| 5 | 1985-01-30 | 1985-01-31 00:00:00.000000 |
| 6 | 1999-12-31 | 2000-01-01 00:00:00.000000 |
+------+------------+----------------------------+
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct
Search before asking
Version
4.0.2 and 4.0.5
Iceberg Table format Version : Iceberg v2
What's Wrong?
When querying an Iceberg table in Doris via Iceberg Catalog, DATE columns are consistently shifted by -1 day compared to Spark/Beeline for the same Iceberg snapshot.
This affects all DATE values and is reproducible across multiple rows and tables.
What You Expected?
Date Column should be return the same data when accessing in doris via iceberg catalog and Spark/Beeline
How to Reproduce?
SPARK:
CREATE TABLE test.mughil_test (
id_col BIGINT,
date_col DATE,
ts_col TIMESTAMP
)
USING iceberg;
INSERT INTO test.mughil_test VALUES
(1, DATE '1970-01-01', TIMESTAMP '1970-01-01 00:00:00'),
(2, DATE '1970-01-02', TIMESTAMP '1970-01-02 00:00:00'),
(3, DATE '1977-04-18', TIMESTAMP '1977-04-18 00:00:00'),
(4, DATE '1977-04-19', TIMESTAMP '1977-04-19 00:00:00'),
(5, DATE '1985-01-31', TIMESTAMP '1985-01-31 00:00:00'),
(6, DATE '2000-01-01', TIMESTAMP '2000-01-01 00:00:00');
spark-sql> SELECT * FROM test.mughil_test ORDER BY id;
id d ts
1 1970-01-01 1970-01-01 00:00:00
2 1970-01-02 1970-01-02 00:00:00
3 1977-04-18 1977-04-18 00:00:00
4 1977-04-19 1977-04-19 00:00:00
5 1985-01-31 1985-01-31 00:00:00
6 2000-01-01 2000-01-01 00:00:00
Time taken: 1.868 seconds, Fetched 6 row(s)
Doris Via Iceberg Catalog:
mysql> SELECT id, d, ts
-> FROM test_iceberg.test.mughil_test
-> ORDER BY id;
+------+------------+----------------------------+
| id | d | ts |
+------+------------+----------------------------+
| 1 | 1969-12-31 | 1970-01-01 00:00:00.000000 |
| 2 | 1970-01-01 | 1970-01-02 00:00:00.000000 |
| 3 | 1977-04-17 | 1977-04-18 00:00:00.000000 |
| 4 | 1977-04-18 | 1977-04-19 00:00:00.000000 |
| 5 | 1985-01-30 | 1985-01-31 00:00:00.000000 |
| 6 | 1999-12-31 | 2000-01-01 00:00:00.000000 |
+------+------------+----------------------------+
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct