hcrosse commented on code in PR #1594:
URL: https://github.com/apache/arrow-go/pull/1594#discussion_r4607667658


##########
parquet/encryption_read_config_test.go:
##########
@@ -622,6 +622,38 @@ func (d *TestDecryptionSuite) TestDecryption() {
        }
 }
 
+// uniform_encryption.parquet.encrypted was written by Arrow C++, with a
+// dictionary page and an offset index in each chunk.
+func TestSeekToRowEncryptedTestData(t *testing.T) {
+       props := parquet.NewReaderProperties(memory.DefaultAllocator)
+       props.FileDecryptProps = 
parquet.NewFileDecryptionProperties(parquet.WithFooterKey(FooterEncryptionKey))
+       rdr, err := file.OpenParquetFile(path.Join(getDataDir(), 
"uniform_encryption.parquet.encrypted"), false, file.WithReadProps(props))
+       require.NoError(t, err)
+       defer rdr.Close()
+
+       const col, nrows, row = 1, 50, 24
+       chunk, err := rdr.MetaData().RowGroup(0).ColumnChunk(col)
+       require.NoError(t, err)
+       require.Equal(t, parquet.Types.Int32, chunk.Type())
+       require.True(t, chunk.HasDictionaryPage())
+
+       read := func(seekTo, n int) []int32 {
+               cr, err := rdr.RowGroup(0).Column(col)
+               require.NoError(t, err)
+               defer cr.Close()

Review Comment:
   This follows the other tests in this file, which close readers with `defer`.



-- 
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]

Reply via email to