mukunku / ParquetViewer

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

fix "column xxx cannot be null" when open a parquet file with any required field #12

Closed SwimmingTiger closed 5 years ago

SwimmingTiger commented 5 years ago

Because the time that the row is added to the table is earlier than the time to populate the data, the null value must exist.

AllowDBNull = dataField.HasNulls will prevent the program from opening any parquet file with a required field (a .NET exception will be threw and say the column cannot be null).

And here, because of the need to perform row and column conversion, there is no easy way to pre-fill the data to a row. Considering that the program does not have the ability to edit column data, disabling non-null attributes seems to be the easiest way to fix it.