ernvalentino commented on a change in pull request #14644:
URL: https://github.com/apache/beam/pull/14644#discussion_r621432910
##########
File path:
sdks/java/io/parquet/src/main/java/org/apache/beam/sdk/io/parquet/ParquetIO.java
##########
@@ -1210,6 +1221,13 @@ public void open(WritableByteChannel channel) throws
IOException {
.withWriteMode(OVERWRITE)
.withConf(SerializableConfiguration.newConfiguration(getConfiguration()))
.withRowGroupSize(getRowGroupSize());
+ if (getAvroDataModel() != null) {
+ try {
+ builder.withDataModel(buildModelObject(getAvroDataModel()));
+ } catch (ReflectiveOperationException e) {
+ LOG.warn("Couldn't set the model: " + e.getMessage());
Review comment:
My initial idea was to not modify the previous behaviour: in this case
if the exception is raised the model will be the default one set by the
`AvroParquetWriter` class, which is the `SpecificData` one
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]