diff --git a/coral-schema/src/main/java/com/linkedin/coral/schema/avro/RelDataTypeToAvroType.java b/coral-schema/src/main/java/com/linkedin/coral/schema/avro/RelDataTypeToAvroType.java index 4912a4734..450754b54 100644 --- a/coral-schema/src/main/java/com/linkedin/coral/schema/avro/RelDataTypeToAvroType.java +++ b/coral-schema/src/main/java/com/linkedin/coral/schema/avro/RelDataTypeToAvroType.java @@ -115,8 +115,7 @@ private static Schema basicSqlTypeToAvroType(BasicSqlType relDataType) { schema.addProp("logicalType", "timestamp-millis"); return schema; case DATE: - // Spark recognizes the data type of {"type": "int", "logicalType": "date"} as a date type: - // https://github.com/apache/spark/blob/master/connector/avro/src/main/scala/org/apache/spark/sql/avro/AvroDeserializer.scala#L145 + // In Avro, "date" type is represented as {"type": "int", "logicalType": "date"}. schema = Schema.create(Schema.Type.INT); schema.addProp("logicalType", "date"); return schema;