[
https://issues.apache.org/jira/browse/PARQUET-2042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17562101#comment-17562101
]
ASF GitHub Bot commented on PARQUET-2042:
-----------------------------------------
mwong38 commented on code in PR #900:
URL: https://github.com/apache/parquet-mr/pull/900#discussion_r912817641
##########
parquet-protobuf/src/main/java/org/apache/parquet/proto/ProtoSchemaConverter.java:
##########
@@ -97,6 +127,46 @@ public MessageType convert(Class<? extends Message>
protobufClass) {
private <T> Builder<? extends Builder<?, GroupBuilder<T>>, GroupBuilder<T>>
addField(FieldDescriptor descriptor, final GroupBuilder<T> builder) {
if (descriptor.getJavaType() == JavaType.MESSAGE) {
+ if (unwrapProtoWrappers) {
+ String typeName = descriptor.getMessageType().getFullName();
+ if (typeName.equals(PROTOBUF_TIMESTAMP_TYPE)) {
+ return builder.primitive(INT64,
getRepetition(descriptor)).as(timestampType(true, TimeUnit.NANOS));
Review Comment:
Isn't that outside the scope of ProtoSchemaConverter/ParquetWriter? I don't
think it should go into the business of doing transformations. If the point of
`ProtoSchemaConverter` is to give the closest representation of the Protobuf
object in Parquet, then it should be NANOS and nothing more.
> Unwrap common Protobuf wrappers and logical Timestamps, Date, TimeOfDay
> -----------------------------------------------------------------------
>
> Key: PARQUET-2042
> URL: https://issues.apache.org/jira/browse/PARQUET-2042
> Project: Parquet
> Issue Type: Improvement
> Components: parquet-protobuf
> Reporter: Michael Wong
> Priority: Major
>
> Related to https://issues.apache.org/jira/browse/PARQUET-1595
--
This message was sent by Atlassian Jira
(v8.20.10#820010)