wypoon commented on code in PR #11247:
URL: https://github.com/apache/iceberg/pull/11247#discussion_r1795958912
##########
spark/v3.5/spark/src/test/resources/decimal_dict_and_plain_encoding.parquet:
##########
Review Comment:
I also tried
```
try (FileAppender<GenericData.Record> writer =
Parquet.write(Files.localOutput(parquetFile))
.schema(schema)
.createWriterFunc(ParquetAvroWriter::buildWriter)
.set(PARQUET_DICT_SIZE_BYTES, "2048")
.set(PARQUET_PAGE_ROW_LIMIT, "100")
.build()) {
writer.addAll(records);
}
```
and stepped through the `writer` calls in a debugger.
The following chain is called to get the `ValuesWriter` for the decimal
column:
https://github.com/apache/parquet-java/blob/apache-parquet-1.13.1/parquet-column/src/main/java/org/apache/parquet/column/impl/ColumnWriterBase.java#L84
https://github.com/apache/parquet-java/blob/apache-parquet-1.13.1/parquet-column/src/main/java/org/apache/parquet/column/ParquetProperties.java#L167
https://github.com/apache/parquet-java/blob/apache-parquet-1.13.1/parquet-column/src/main/java/org/apache/parquet/column/values/factory/DefaultValuesWriterFactory.java#L52
https://github.com/apache/parquet-java/blob/apache-parquet-1.13.1/parquet-column/src/main/java/org/apache/parquet/column/values/factory/DefaultV1ValuesWriterFactory.java#L55
https://github.com/apache/parquet-java/blob/apache-parquet-1.13.1/parquet-column/src/main/java/org/apache/parquet/column/values/factory/DefaultV1ValuesWriterFactory.java#L80
which is the code I cited previously:
```
private ValuesWriter getFixedLenByteArrayValuesWriter(ColumnDescriptor
path) {
// dictionary encoding was not enabled in PARQUET 1.0
return new FixedLenByteArrayPlainValuesWriter(path.getTypeLength(),
parquetProperties.getInitialSlabSize(),
parquetProperties.getPageSizeThreshold(), parquetProperties.getAllocator());
}
```
I am using the `iceberg-parquet` APIs to create a writer, but eventually it
calls `parquet-java` code.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]