You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by "Wu Xiang (JIRA)" <ji...@apache.org> on 2015/10/16 07:42:05 UTC

[jira] [Created] (PARQUET-388) ProtoRecordConverter might wrongly cast a Message.Builder to Message

Wu Xiang created PARQUET-388:
--------------------------------

             Summary: ProtoRecordConverter might wrongly cast a Message.Builder to Message
                 Key: PARQUET-388
                 URL: https://issues.apache.org/jira/browse/PARQUET-388
             Project: Parquet
          Issue Type: Bug
          Components: parquet-mr
            Reporter: Wu Xiang


ProtoRecordConverter returns current record as follows:

  public T getCurrentRecord() {
    if (buildBefore) {
      return (T) this.reusedBuilder.build();
    } else {
      return (T) this.reusedBuilder;
    }
  }

However this might fail if T is subclass of Message and buildBefore == false. Since it's actually casting a Message.Builder instance to Message type.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)