-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Hive partition projection date partition values are not parsed with partition_projection_format
#25642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Let me investigate it |
Hi @chenjian2664 - thanks for picking this up! I created this test, based on The only difference from It is important that Trino correctly handles
I ran Running the above test:
|
@metadaddy Thanks for the info, very useful |
When using partition projection in the Hive connector, DATE partition values are parsed with
yyyy-M-d
rather than the configuredpartition_projection_format
.To reproduce:
Create a text file with the following content:
Upload the file to an S3 bucket
my-bucket
(you'll need to change this) with the path/logs/123456789012/us-west-001/metadaddy-test/2025/04/01/2025-04-01-21-32-16-E568B2907131C0C0
.Create a table with partition projection:
Try to
SELECT *
:Stack trace:
The problem seems to be that the Hive partition manager is (correctly) generating partition names of the form
2024/04/22
, but they are being parsed byHiveUtil.parseHiveDate
usingHIVE_DATE_PARSER
, which is configured with date formats of the formyyyy-M-d
.The text was updated successfully, but these errors were encountered: