zeroshade commented on a change in pull request #11538:
URL: https://github.com/apache/arrow/pull/11538#discussion_r783172423
##########
File path: go/parquet/file/column_writer_test.go
##########
@@ -45,6 +49,73 @@ const (
DictionaryPageSize = 1024 * 1024
)
+type mockpagewriter struct {
+ mock.Mock
+}
+
+func (m *mockpagewriter) Close(hasDict, fallBack bool) error {
+ return m.Called(hasDict, fallBack).Error(0)
+}
+func (m *mockpagewriter) WriteDataPage(page file.DataPage) (int64, error) {
+ args := m.Called(page)
+ return int64(args.Int(0)), args.Error(1)
+}
+func (m *mockpagewriter) WriteDictionaryPage(page *file.DictionaryPage)
(int64, error) {
+ args := m.Called(page)
+ return int64(args.Int(0)), args.Error(1)
+}
+func (m *mockpagewriter) HasCompressor() bool {
+ return m.Called().Bool(0)
+}
+func (m *mockpagewriter) Compress(buf *bytes.Buffer, src []byte) []byte {
+ return m.Called(buf, src).Get(0).([]byte)
+}
+func (m *mockpagewriter) Reset(sink utils.WriterTell, codec
compress.Compression, compressionLevel int, metadata
*metadata.ColumnChunkMetaDataBuilder, rgOrdinal, columnOrdinal int16,
metaEncryptor, dataEncryptor encryption.Encryptor) error {
+ return m.Called().Error(0)
+}
+
+func TestWriteDataPageV2NumRows(t *testing.T) {
Review comment:
that's an interesting one that makes the logic for `WriteBatch` a bit
more complex and annoying. I guess that's probably why it's broken for C++
currently haha. I'll see if i can figure out a way to slightly modify the logic
for the batching so that I always do batches on row boundaries for V2. if not
then i'll just document the limitation, if it's currently broken in the C++ too
then I don't feel bad about kicking that can down the road for now in the
interest of getting this merged. I'll comment back with what I end up doing.
--
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]