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] System.InvalidCastException #125

Closed
MatGal01 opened this issue Jan 9, 2025 · 3 comments
Closed

[BUG] System.InvalidCastException #125

MatGal01 opened this issue Jan 9, 2025 · 3 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@MatGal01
Copy link

MatGal01 commented Jan 9, 2025

Parquet Viewer Version
3.1

Where was the parquet file created?
Apache Spark

Sample File

Describe the bug

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.ReadStructField(DataTableLite dataTable, ParquetRowGroupReader groupReader, Int32 rowBeginIndex, ParquetSchemaElement field, 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(List1 selectedFields, Int32 offset, Int32 recordCount, CancellationToken cancellationToken, IProgress1 progress)

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

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

at ParquetViewer.MainForm.LoadFileToGridview()

at System.Threading.Tasks.Task.<>c.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)

Screenshots

Additional context

@MatGal01 MatGal01 added the bug Something isn't working label Jan 9, 2025
@MatGal01
Copy link
Author

MatGal01 commented Jan 9, 2025

The file is OK and I can open with other plugin like "Parquet Visualizer" in Visual Studio Code.

@MatGal01 MatGal01 changed the title [BUG] [BUG] System.InvalidCastException Jan 9, 2025
@mukunku
Copy link
Owner

mukunku commented Jan 9, 2025

I'm guessing your file has a list of nested structs which the app has issues with opening at the moment. This is a somewhat challenging implementation that I haven't had much luck with. In the meantime, can you share a sample file possibly?

@mukunku mukunku added the duplicate This issue or pull request already exists label Jan 9, 2025
@mukunku
Copy link
Owner

mukunku commented Jan 9, 2025

This also seems to be the same issue as #119 . I'm going to close this one as duplicate and we can continue discussions in that thread.

@mukunku mukunku closed this as completed Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants