mukunku / ParquetViewer

Simple Windows desktop application for viewing & querying Apache Parquet files
GNU General Public License v3.0
687 stars 82 forks source link

[BUG] Opening folder with `_SUCCESS` files causes exception #104

Closed mukunku closed 3 months ago

mukunku commented 3 months ago

This line in the code is causing the following exception: https://github.com/mukunku/ParquetViewer/blob/d2b0fad71a822bf18e3180f04e1b0f7b9393c8cf/src/ParquetViewer.Engine/ParquetEngine.cs#L137

An item with the same key has already been added. Key: _SUCCESS at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) at ParquetViewer.Engine.ParquetEngine.OpenFolderAsync(String folderPath, CancellationToken cancellationToken) at ParquetViewer.MainForm.OpenFieldSelectionDialog(Boolean forceOpenDialog) at ParquetViewer.MainForm.openFolderToolStripMenuItem_Click(Object sender, EventArgs e) at System.Threading.Tasks.Task.<>c.b__128_0(Object state) at InvokeStub_SendOrPostCallback.Invoke(Object, Object, IntPtr) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr args, BindingFlags invokeAttr)

Ideally we should capture the relative file paths which will be unique as opposed to just the file name.

brentbundang commented 3 months ago

Hey @mukunku

I've taken a look at this issue and would like to contribute a fix for it.

I'll start working on this and aim to have a Pull Request open for review shortly. If there are any specific guidelines or additional steps you'd like me to follow before creating the PR, please let me know. Thanks!

brentbundang commented 3 months ago

Improve error tracking by recording relative paths for skipped files #105

mukunku commented 3 months ago

Thanks for fixing this 🙌🏼