[
https://issues.apache.org/jira/browse/PARQUET-1285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16459611#comment-16459611
]
ASF GitHub Bot commented on PARQUET-1285:
-----------------------------------------
xhochy commented on a change in pull request #469: PARQUET-1285: [Java]
SchemaConverter should not convert from TimeUnit.SECOND and TimeUnit.NANOSECOND
of Arrow
URL: https://github.com/apache/parquet-mr/pull/469#discussion_r185202348
##########
File path:
parquet-arrow/src/main/java/org/apache/parquet/arrow/schema/SchemaConverter.java
##########
@@ -245,7 +246,14 @@ public TypeMapping visit(Date type) {
@Override
public TypeMapping visit(Time type) {
- return primitive(INT32, TIME_MILLIS);
+ int bitWidth = type.getBitWidth();
+ org.apache.arrow.vector.types.TimeUnit timeUnit = type.getUnit();
Review comment:
This should be imported at the top to have a much shorter code line.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> [Java] SchemaConverter should not convert from TimeUnit.SECOND AND
> TimeUnit.NANOSECOND of Arrow
> -----------------------------------------------------------------------------------------------
>
> Key: PARQUET-1285
> URL: https://issues.apache.org/jira/browse/PARQUET-1285
> Project: Parquet
> Issue Type: Bug
> Components: parquet-mr
> Reporter: Masayuki Takahashi
> Priority: Minor
>
> Arrow's 'Time' definition is below:
> {code:java}
> { "name" : "time", "unit" : "SECOND|MILLISECOND|MICROSECOND|NANOSECOND",
> "bitWidth": /* integer: 32 or 64 */ }{code}
> [http://arrow.apache.org/docs/metadata.html]
>
> But Parquet only supports 'TIME_MILLIS' and 'TIME_MICROS'.
> [https://github.com/Apache/parquet-format/blob/master/LogicalTypes.md]
> Therefore SchemaConverter should not convert from TimeUnit.SECOND AND
> TimeUnit.NANOSECOND of Arrow to Parquet.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)