You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mapleFU (via GitHub)" <gi...@apache.org> on 2023/08/01 15:54:49 UTC

[GitHub] [arrow] mapleFU commented on a diff in pull request #36972: GH-36939: [C++][Parquet] Boolean encoding has inconsistent implemention

mapleFU commented on code in PR #36972:
URL: https://github.com/apache/arrow/pull/36972#discussion_r1280845735


##########
cpp/src/parquet/encoding.cc:
##########
@@ -340,6 +340,8 @@ class PlainEncoder<BooleanType> : public EncoderImpl, virtual public BooleanEnco
       throw ParquetException("direct put to boolean from " + values.type()->ToString() +
                              " not supported");
     }
+    // Put arrow array cannot mix with PlainEncoder<BooleanType>::PutImpl.
+    DCHECK_EQ(0, bit_writer_.bytes_written());

Review Comment:
   Actually it's ok.
   
   If `PutImpl` call `bit_writer_.Clear`, I think it's ok. However, when `bit_writer_.bytes_written() == 0`, it would be a disaster 



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org