[ 
https://issues.apache.org/jira/browse/PARQUET-2042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17513127#comment-17513127
 ] 

ASF GitHub Bot commented on PARQUET-2042:
-----------------------------------------

emkornfield commented on a change in pull request #900:
URL: https://github.com/apache/parquet-mr/pull/900#discussion_r836040766



##########
File path: 
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:
       should TimeUnit be something configurable?  I know protobuf timestamps 
support nanosecond resolution but might not be what applications want to store.




-- 
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]


> 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.1#820001)

Reply via email to