Hi, I have a question:
I make a table:
CREATE TABLE ‘MyTab’ (
index_time TIMESTAMP,
ColA DOUBLE NULL,
ColB DOUBLE NULL,
ColC DOUBLE NULL,
ColD DOUBLE NULL
) timestamp(index_time) PARTITION BY DAY WAL
DEDUP UPSERT KEYS(index_time);index_time;
I run this query:
INSERT INTO MyTab (index_time, ColA, ColB, ColC, ColD)
SELECT ‘2025-04-09 17:20:00.000’ as “index_time”, 100 as “ColA”, null as ColB, 102 as “ColC”, 103 as “ColD”;
I get this result:
2025-04-09T17:20:00.000000Z, 100, null, 102, 103.
TRUNCATE TABLE MyTab;
I run this query:
WITH MyTmp AS (
SELECT ‘2025-04-09 17:20:00.000’ as “index_time”, 100 as “ColA”, null as ColB, 102 as “ColC”, 103 as “ColD”
)
INSERT INTO MyTab (“index_time”, “ColA”, “ColB”, “ColC”, “ColD”)
select “index_time”, “ColA”, “ColB”, “ColC”, “ColD” from MyTmp limit 1;
I get this result:
2025-04-09T17:20:00.000000Z, 100, null, 102, 103.
TRUNCATE TABLE MyTab;
I run this query:
WITH MyTmp AS (
SELECT ‘2025-04-09 17:20:00.000’ as “index_time”, 100 as “ColA”, 101 as “ColB”, 102 as “ColC”, 103 as “ColD” FROM MyTab WHERE index_time = ‘2025-04-09 17:20:00.000’
UNION
SELECT ‘2025-04-09 17:20:00.000’ as “index_time”, 100 as “ColA”, null as ColB, 102 as “ColC”, 103 as “ColD”
)
INSERT INTO MyTab (“index_time”, “ColA”, “ColB”, “ColC”, “ColD”)
select “index_time”, “ColA”, “ColB”, “ColC”, “ColD” from MyTmp limit 1;
I get this result:
2025-04-09T17:20:00.000000Z, 100, -2147483648, 102, 103.
I find -2147483648 instead of null.
Am I doing something wrong?