Manak Bisht
02/04/2025, 2:20 PMNULL TIMESTAMP values are getting interpreted as 1970-01-01 00:00:00.0
This is my schema –
{
"schemaName": "debug_null_timestamps",
"enableColumnBasedNullHandling": true,
"dateTimeFieldSpecs": [
{
"name": "created_at",
"dataType": "TIMESTAMP",
"fieldType": "DATE_TIME",
"notNull": false,
"format": "TIMESTAMP",
"granularity": "1:MILLISECONDS"
},
{
"name": "updated_at",
"dataType": "TIMESTAMP",
"fieldType": "DATE_TIME",
"notNull": false,
"format": "TIMESTAMP",
"granularity": "1:MILLISECONDS"
}
]
}
I have explicitly declared both fields as nullable.
I am writing data to a Kafka topic in Avro format with both columns having null values. I have verified this by deserializing this data from another consumer.
In my realtime table, created_at is the primary key column. Null created_at values are being interpreted as NOW() (which is fine and understandable), however, null values of updated_at are taking the value of 1970-01-01 00:00:00.0 , which I think is basically Integer.MIN_VALUE .
I am also seeing no errors in the server logs.
Here's the Avro schema as well –
{
"type": "record",
"name": "value",
"fields": [
{
"name": "created_at",
"type": [
{
"type": "long",
"logicalType": "timestamp-millis"
},
"null"
]
},
{
"name": "updated_at",
"type": [
{
"type": "long",
"logicalType": "timestamp-millis"
},
"null"
]
}
]
}Mayank
Mayank
Manak Bisht
02/05/2025, 6:20 AM"enableColumnBasedNullHandling": true and also declared the columns as "notNull": falseRaghu Koratagere
02/05/2025, 6:42 AM"nullHandlingEnabled": trueManak Bisht
02/05/2025, 7:11 AMenableNullHandling=true at the beginning of the query.