emkornfield commented on a change in pull request #11538:
URL: https://github.com/apache/arrow/pull/11538#discussion_r782729110
##########
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:
this seems OK, one other note of something broken in C++ for V2 is rows
are supposed to begin and end on page boundaries (V1 doesn't have this
gaurantee)
--
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]