Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
0xSheller opened this issue Sep 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@0xSheller
Copy link

0xSheller commented Sep 23, 2024

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   
---------------------------
@0xSheller 0xSheller added the bug Something isn't working label Sep 23, 2024
@mukunku mukunku changed the title [BUG] [BUG] Error when opening file with list field Dec 22, 2024
@mukunku mukunku mentioned this issue Dec 23, 2024
@mukunku
Copy link
Owner

mukunku commented Dec 23, 2024

Can you share a sample file please? You can zip and upload it here. Otherwise I might not be able to help much.

Also give version 3.2.0.0 a try. I doubt it has addressed your issue but wanted to suggest just in case 🤞🏼 .

@mukunku mukunku changed the title [BUG] Error when opening file with list field [BUG] Error when opening file with list field (System.InvalidCastException) Jan 9, 2025
@mukunku
Copy link
Owner

mukunku commented Jan 9, 2025

I believe this is due to list fields with nested struct values. Implementing it has proven challenging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants