Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,11 @@ Schema preProcessSchema(Schema schema) {
switch (schemaName) {
case Decimal.LOGICAL_NAME:
return copySchemaBasics(schema, SchemaBuilder.float64()).build();
case Date.LOGICAL_NAME:
case Time.LOGICAL_NAME:
case Timestamp.LOGICAL_NAME:
return schema;
case Date.LOGICAL_NAME:
return copySchemaBasics(schema, SchemaBuilder.int64()).build();
default:
// User type or unknown logical type
break;
Expand Down Expand Up @@ -408,10 +409,11 @@ private Object preProcessLogicalValue(String schemaName, Object value) {
switch (schemaName) {
case Decimal.LOGICAL_NAME:
return ((BigDecimal) value).doubleValue();
case Date.LOGICAL_NAME:
case Time.LOGICAL_NAME:
case Timestamp.LOGICAL_NAME:
return value;
case Date.LOGICAL_NAME:
return ((java.util.Date) value).getTime();
default:
// User-defined type or unknown built-in
return null;
Expand Down