the-other-tim-brown opened a new pull request, #13882:
URL: https://github.com/apache/hudi/pull/13882
### Change Logs
The provided spark writer support for parquet has an option for using the
legacy writer format that will write Decimals in the legacy format and lists in
the legacy format. On the other hand, the avro based writer always writes the
Decimal in the legacy format and has a flag for writing lists in the legacy
format.
The adoption of 3-level lists is more common and required when syncing Hudi
tables to Iceberg so we need to have control on how we write lists that is
independent of the decimal writing.
In this PR, the row write support is adapted to always persists the decimals
in the legacy format to ensure it is compatible with other Hudi readers. The
avro flag along with the hudi flag for writing in the legacy format will apply
to how we write out the lists. If legacy format is enabled, 2-level lists are
written. Otherwise it is 3-level lists.
On top of this, the spark writer also had a restriction where timestamps
within the same writer were always written out with the same precision causing
issues if users had specified different granularities in their schema. This PR
also addresses this by passing in the avro schema to the write support class to
determine the precision of the timestamp and convert it accordingly.
### Impact
Ensures better consistency between writes when using spark rows and
parquet-avro.
### Risk level (write none, low medium or high below)
Medium
### Documentation Update
_Describe any necessary documentation update if there is any new feature,
config, or user-facing change. If not, put "none"._
- _The config description must be updated if new configs are added or the
default value of the configs are changed_
- _Any new feature or user-facing change requires updating the Hudi website.
Please create a Jira ticket, attach the
ticket number here and follow the
[instruction](https://hudi.apache.org/contribute/developer-setup#website) to
make
changes to the website._
### Contributor's checklist
- [ ] 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]