mukunku / ParquetViewer

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

[FEATURE-REQUEST] Support BYTE_ARRAY Decimal format #47

Closed gorkemgoknar closed 1 year ago

gorkemgoknar commented 2 years ago

Describe the feature you'd like to be added to Parquet Viewer Support Decimal format so that it shows proper text instead

For a field of decimal like below { "Field_id": 0, "Name": "CD_ID", "Type": "BYTE_ARRAY", "Type_length": 0, "LogicalType": "LogicalType(DECIMAL: DecimalType(, Scale: 12, Precision: 38))", "Scale": 12, "Precision": 38, "Repetition_type": "OPTIONAL", "Converted_type": "DECIMAL" },

GUI shows: Weird characters

For these characters even copy-paste is not possible

Additional Feature/Bug Requerst: Integer adds thousand seperator by default, it should not add it by default as settings do not persist and need to uncheck each time open a file.

Thanks. 2021-10-27 11_14_29-Parquet Metadata Viewer

mukunku commented 2 years ago

Could you also share a sample file please?

gorkemgoknar commented 2 years ago

I should update that this problem happens on "BYTE_ARRAY" type of decimal , which is generated by Apache Nifi, not "FIXED_LEN_BYTE_ARRAY" which is generated by pyArrow. On standart FIXED_LEN_BYTE_ARRAY there seems no problem, but if size is not set the jibberish characters appear.

On left hand metadata from parquet file generated by Nifi, on right hand the one generated by pyArrow (which I was going to share non important data, but pyarrow converts to fixed_len_byte_array which parquet viewer shows fine, so problem may seem to be parquet files with decimal generated by Nifi with Parquet 1.0 writer)

parquet_decimal

mukunku commented 1 year ago

I think these types of decimal are now supported in the parquet-dotnet library: https://github.com/aloneguid/parquet-dotnet/issues/166

Since there is no sample file I'm not able to validate this but this ticket has been open for a long time so I'm closing it out. If anyone could confirm it works or provide a sample file that doesn't work please feel free to comment or reopen this issue.