stevenzwu commented on code in PR #13780:
URL: https://github.com/apache/iceberg/pull/13780#discussion_r2279800371
##########
core/src/main/java/org/apache/iceberg/SchemaParser.java:
##########
@@ -197,7 +197,12 @@ private static Type typeFromJson(JsonNode json) {
private static Literal<?> defaultFromJson(String defaultField, Type type,
JsonNode json) {
if (json.has(defaultField)) {
- return Expressions.lit(SingleValueParser.fromJson(type,
json.get(defaultField)));
+ Object value = SingleValueParser.fromJson(type, json.get(defaultField));
+ if (type instanceof Types.TimestampNanoType) {
+ return Expressions.nanos((long) value);
Review Comment:
should we check value not null? the json value itself can also be null,
right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]