Skip to content

Commit

Permalink
Modify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ljfgem committed Jan 11, 2024
1 parent 9bcd0bf commit 98a7abb
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 98a7abb

Please sign in to comment.