joechenrh commented on code in PR #217:
URL: https://github.com/apache/arrow-go/pull/217#discussion_r1879249609


##########
parquet/metadata/file.go:
##########
@@ -243,11 +243,13 @@ type FileMetaData struct {
        // size of the raw bytes of the metadata in the file which were
        // decoded by thrift, Size() getter returns the value.
        metadataLen int
+
+       footerOffset int64
 }
 
 // NewFileMetaData takes in the raw bytes of the serialized metadata to 
deserialize
 // and will attempt to decrypt the footer if a decryptor is provided.
-func NewFileMetaData(data []byte, fileDecryptor encryption.FileDecryptor) 
(*FileMetaData, error) {
+func NewFileMetaData(data []byte, footerOffset int64, fileDecryptor 
encryption.FileDecryptor) (*FileMetaData, error) {

Review Comment:
   Yes, I forgot the backwards compatibility. Can we name the setter/getter 
function like:
   
   ```go
   // SetSourceFileSize get the total size of the source file from meta data.
   func (f *FileMetaData) SetSourceFileSize() int64 { return f.sourceFileSize }
   
   // GetSourceFileSize set the total size of the source file in meta data.
   func (f *FileMetaData) GetSourceFileSize() int64 { return f.sourceFileSize }
   
   // file.go
   type FileMetaData struct {
       ....
       
       // sourceFileSize is not a part of FileMetaData, but it is mainly used 
to parse meta data.
       // Users can manually set this value and they are responsible for the 
validity of it.
       sourceFileSize int64
   }
   ```



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