Skip to content

[BUG] Error when opening file with list of nested structs (System.InvalidCastException) #119

@0xSheller

Description

@0xSheller

Parquet Viewer Version
Latest (3.1.0)

Where was the parquet file created?
pyarrow

Sample File
Generic Array

Describe the bug
Upon loading a file i get hit with:

---------------------------
Specified cast is not valid.
---------------------------
Something went wrong (CTRL+C to copy):

System.InvalidCastException: Specified cast is not valid.

   at ParquetViewer.Engine.ParquetEngine.ReadListField(DataTableLite dataTable, ParquetRowGroupReader groupReader, Int32 rowBeginIndex, ParquetSchemaElement itemField, Int32 fieldIndex, Int64 skipRecords, Int64 readRecords, Boolean isFirstColumn, CancellationToken cancellationToken, IProgress`1 progress)

   at ParquetViewer.Engine.ParquetEngine.ProcessRowGroup(DataTableLite dataTable, ParquetRowGroupReader groupReader, Int64 skipRecords, Int64 readRecords, CancellationToken cancellationToken, IProgress`1 progress)

   at ParquetViewer.Engine.ParquetEngine.PopulateDataTable(DataTableLite dataTable, ParquetReader parquetReader, Int64 offset, Int64 recordCount, CancellationToken cancellationToken, IProgress`1 progress)

   at ParquetViewer.Engine.ParquetEngine.ReadRowsAsync(List`1 selectedFields, Int32 offset, Int32 recordCount, CancellationToken cancellationToken, IProgress`1 progress)

   at ParquetViewer.MainForm.<>c__DisplayClass33_0.<<LoadFileToGridview>b__1>d.MoveNext()

--- End of stack trace from previous location ---

   at ParquetViewer.MainForm.LoadFileToGridview()

   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)

   at InvokeStub_SendOrPostCallback.Invoke(Object, Span`1)

   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
---------------------------
OK   
---------------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions