rdblue commented on code in PR #11904:
URL: https://github.com/apache/iceberg/pull/11904#discussion_r1925905904
##########
parquet/src/main/java/org/apache/iceberg/data/parquet/BaseParquetWriter.java:
##########
@@ -50,6 +46,31 @@ protected ParquetValueWriter<T> createWriter(MessageType
type) {
protected abstract ParquetValueWriters.StructWriter<T> createStructWriter(
List<ParquetValueWriter<?>> writers);
+ protected ParquetValueWriter<?> fixedWriter(ColumnDescriptor desc) {
+ return new GenericParquetWriter.FixedWriter(desc);
+ }
+
+ protected ParquetValueWriter<?> dateWriter(ColumnDescriptor desc) {
+ return new GenericParquetWriter.DateWriter(desc);
+ }
+
+ protected ParquetValueWriter<?> timeWriter(ColumnDescriptor desc) {
+ return new GenericParquetWriter.TimeWriter(desc);
+ }
+
+ protected ParquetValueWriter<?> timestampWriter(ColumnDescriptor desc,
boolean isAdjustedToUTC) {
+ if (isAdjustedToUTC) {
+ return new GenericParquetWriter.TimestamptzWriter(desc);
+ } else {
+ return new GenericParquetWriter.TimestampWriter(desc);
+ }
+ }
+
+ protected ParquetValueWriter<?> uuidWriter(ColumnDescriptor desc) {
+ // Use primitive-type writer (as FIXED_LEN_BYTE_ARRAY); no special writer
needed.
+ return null;
Review Comment:
I think I commented on this in the last round of reviews. This isn't
correct. Incoming values are of type `UUID` so this needs a writer that can
convert UUID into a byte array. This should return
`ParquetValueWriters.uuids(desc)`.
There's also no need to add a method for this because it is the same between
the generic and internal object models.
--
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]