piyushdubey opened a new issue, #40655:
URL: https://github.com/apache/arrow/issues/40655

   ### Describe the usage question you have. Please include as many useful 
details as  possible.
   
   
   I am using the Arrow File Reader to read an arrow file and getting the below 
error. 
   
   `System.IO.InvalidDataException: 'Invalid magic at offset <6>'`
   
   My use case is pretty straightforward
   
   ```
   using Apache.Arrow.Ipc;
   using Microsoft.Data.Analysis;
   using System.Reflection;
   
   public class Program
   {
       public static void Main(string[] args)
       {
           var filePath = 
"C:\\Users\\piyushdubey\\Downloads\\newdatatypes13.arrow";
   
           try
           {
               using var stream = File.OpenRead(filePath);
               // using (FileStream fileStream = new FileStream(filePath, 
FileMode.Open, FileAccess.Read))
   
               using (var arrowFileReader = new ArrowFileReader(stream))
               {
                   var arrowRecordBatch = arrowFileReader.ReadNextRecordBatch();
                   var arrowRecord = 
DataFrame.FromArrowRecordBatch(arrowRecordBatch);
               }
           }
           catch (Exception ex) 
           { 
               Console.Write(ex.Message);
           }
       }
   }
   ```
   
   The arrow is thrown at the line `var arrowRecord = 
DataFrame.FromArrowRecordBatch(arrowRecordBatch);`
   
   The table has three columns of type -> `Date, Decimal, Timestamp`
   
   Thoughts?
   
   
   
   
   
   
   ### Component(s)
   
   C#


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