paimon icon indicating copy to clipboard operation
paimon copied to clipboard

[Bug] When writing a partitioned table for Paimon using Flink SQL and storing the table on HDFS, the partition directory name on HDFS is displayed abnormally. For example, it shows as SCAN_DATE=19415 instead of the correct format of SCAN_DATE=2023-03-01, where SCAN_DATE is of type date.

Open yuanoOo opened this issue 2 years ago • 4 comments

Search before asking

  • [X] I searched in the issues and found nothing similar.

Paimon version

paimon-flink-1.15-0.4-20230330.002117-12.jar

Compute Engine

flink1.15.3

Minimal reproduce step

When writing a partitioned table for Paimon using Flink SQL and storing the table on HDFS, the partition directory name on HDFS is displayed abnormally. For example, it shows as SCAN_DATE=19415 instead of the correct format of SCAN_DATE=2023-03-01, where SCAN_DATE is of type date.

What doesn't meet your expectations?

When writing a partitioned table for Paimon using Flink SQL and storing the table on HDFS, the partition directory name on HDFS is displayed abnormally. For example, it shows as SCAN_DATE=19415 instead of the correct format of SCAN_DATE=2023-03-01, where SCAN_DATE is of type date.

Anything else?

No response

Are you willing to submit a PR?

  • [X] I'm willing to submit a PR!

yuanoOo avatar Mar 30 '23 09:03 yuanoOo

Direct fixes may have compatibility issues, we should be careful.

JingsongLi avatar Mar 30 '23 11:03 JingsongLi

Direct fixes may have compatibility issues, we should be careful.

I’m trying to fix this bug, can you assign it to me?

My idea is to format the DATE type in the org.apache.paimon.utils.RowDataPartitionComputer#generatePartValues method. For example, converting the int value 19996 of the DATE type into the correct date string 2024-09-30.

yuanoOo avatar Apr 09 '23 04:04 yuanoOo

I think this issue need to fix. For example, we develop a paimon connector of seatunnel which use java api of paimon also has the same problem.The types in date,time,timestamp all have the same problem.

dailai avatar Mar 19 '24 08:03 dailai

@JingsongLi Hi, how about this problem?

dailai avatar May 14 '24 08:05 dailai