voonhous opened a new pull request, #10951: URL: https://github.com/apache/hudi/pull/10951
### Change Logs Please refer to the jira ticket [HUDI-7564](https://issues.apache.org/jira/browse/HUDI-7564) for a more detailed explanation. When investigating an error thrown by Trino/Presto queries involving Timestamp types: ```log 2024-04-02 17:32:21 (UTC+8) INFO - Clear session property for connection. 2024-04-02 17:32:21 (UTC+8) ERROR- Task Execution failed with CommonException: Query failed (#20240402_093220_06724_cg4jg): Expected field to be long, actual timestamp(9) (field 0) ``` We realised that there is a config inconsistency shown that indirectly causes the error thrown above. Trino/Presto requires that `TIMESTAMP` types to be synced to HMS as `LONG` types. This should be the default behaviour as: ```properties hoodie.datasource.hive_sync.support_timestamp=false ``` However, we realised that the default behaviour is overwritten by `buildHiveSyncConfig` when performing inserts via **Spark**, breaking our assumptions. This PR fixes this inconsistency. ### Impact No impact ### Risk level (write none, low medium or high below) Low ### Documentation Update None ### Contributor's checklist - [X] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [ ] Change Logs and Impact were stated clearly - [ ] Adequate tests were added if applicable - [ ] CI passed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
