[
https://issues.apache.org/jira/browse/PARQUET-1303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16483710#comment-16483710
]
ASF GitHub Bot commented on PARQUET-1303:
-----------------------------------------
nandorKollar commented on a change in pull request #482: PARQUET-1303 correct
ClassCastException for Avro @Stringable fields
URL: https://github.com/apache/parquet-mr/pull/482#discussion_r189834660
##########
File path:
parquet-avro/src/test/java/org/apache/parquet/avro/TestReflectLogicalTypes.java
##########
@@ -426,33 +426,6 @@ public void testWriteNullableUUID() throws IOException {
read(REFLECT, nullableUuidStringSchema, test));
}
- @Test(expected = ClassCastException.class)
Review comment:
I think this tests an important aspect: what happens when the logical type
conversion is not present, and the field is not converted to string. Before,
this case threw an exception, but with your change, it will convert the UUID to
string (since the schema tells that that field is a string).
In my opinion we should not drop this test case, but instead remove the
expected and add a relevant assert, unless there's any test case which verifies
this behavior.
----------------------------------------------------------------
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]
> Avro reflect @Stringable field write error if field not instanceof
> CharSequence
> -------------------------------------------------------------------------------
>
> Key: PARQUET-1303
> URL: https://issues.apache.org/jira/browse/PARQUET-1303
> Project: Parquet
> Issue Type: Bug
> Components: parquet-avro
> Affects Versions: 1.9.0, 1.10.0
> Reporter: Zack Behringer
> Priority: Minor
>
> Annotate a field in a pojo with org.apache.avro.reflect.Stringable and the
> schema will consider it to be a String field. AvroWriteSupport.fromAvroString
> assumes the field is either a Utf8 or CharSequence and does not attempt to
> use the field class' toString method if it is not.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)