Closed quangnguyen-icariohealth closed 2 months ago
I like this approach. I've been using this
partitionValues.put(partitionKey, LocalDate.ofEpochDay(element.getInt(keyIndex)).toString());
for a couple months without issues, but to me it seems better to use DateDateConverter
I am facing the same issue and opened a PR with your suggestion here https://github.com/delta-io/delta/pull/3533
Bug
Describe the problem
I know it's not actually a bug but I would like to mention my issue here. When I am trying to using
Flink DeltaSink
to write aDataStream<RowData>
of the followingRowType
, and partitioned by the columneffective_date
with typeDATE
, the exception is thrown.I have checked the source at https://github.com/delta-io/connectors/blob/master/flink/src/main/java/io/delta/flink/sink/internal/DeltaPartitionComputer.java and found out that currenly, flink delta connector only supports 5 Logical Types:
What I expected?
Why we do not utilize converters inside this package
org.apache.flink.table.data.conversion.*
to support moreLogical Type
, for example, I could use theDateDateConverter
and modify the code so that we can convertINT
representation of a date toyyyy-mm-dddd
representation?The code below is just for demonstration:
Environment information
Willingness to contribute
The Delta Lake Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the Delta Lake code base?