willtemperley opened a new issue, #91:
URL: https://github.com/apache/arrow-swift/issues/91

   
[ArrowWriter.writeFile](https://github.com/apache/arrow-swift/blob/11d15c1b3754a9d87129f7e3ac627751c32f263f/Arrow/Sources/Arrow/ArrowWriter.swift#L375C1-L382C54)
 is writing the magic bytes without padding them:
   
   ```
       // First bytes of known good file
       // 0x4152524f57310000ffffffff980000001
   
       // Current result
       // 0x4152524f57310c000000080008000
   ```
   
   The issue is that padded `markerData` is calculated but not used:
   
   ```
           let fileHandle = FileHandle(forUpdatingAtPath: fileName.path)!
           defer { fileHandle.closeFile() }
   
           var markerData = FILEMARKER.data(using: .utf8)!
           addPadForAlignment(&markerData)
   
           var writer: any DataWriter = FileDataWriter(fileHandle)
           writer.append(FILEMARKER.data(using: .utf8)!)
   ```
   
   There's another issue evident here too - the continuation marker `0xffffffff 
` isn't being written in the streaming format section.


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