Skip to content

Conversation

@pitrou
Copy link
Member

@pitrou pitrou commented Mar 31, 2021

ConvertedType::NA corresponds to an invalid converted type that was once added to the Parquet spec:
apache/parquet-format#45
but then quickly removed in favour of the Null logical type:
apache/parquet-format#51

Unfortunately, Parquet C++ could still in some cases emit the unofficial converted type.

Also remove the confusingly-named LogicalType::Unknown, while "UNKNOWN" in the Thrift specification points to LogicalType::Null.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DCHECK_Lt might be better here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it would change anything. Or we would have to do a full-blown check for valid values, which is a bit out of scope.

Copy link
Contributor

@emkornfield emkornfield Mar 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I think it prevents accidental writes of UNDEFINED as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I can add that as well :-)

@emkornfield
Copy link
Contributor

LGTM modulo one nit.

@pitrou pitrou force-pushed the PARQUET-1990-invalid-converted-type branch from 777700e to 2efc70e Compare March 31, 2021 15:45
ConvertedType::NA corresponds to an invalid converted type that was once added to the Parquet spec:
apache/parquet-format#45
but then quickly removed in favour of the Null logical type:
apache/parquet-format#51

Unfortunately, Parquet C++ could still in some cases emit the unofficial converted type.

Also remove the confusingly-named LogicalType::Unknown, while "UNKNOWN" in the Thrift specification points to LogicalType::Null.
@pitrou pitrou force-pushed the PARQUET-1990-invalid-converted-type branch from 2efc70e to bfa5aec Compare March 31, 2021 16:08
@github-actions
Copy link

@emkornfield
Copy link
Contributor

+1 thanks.

@pitrou pitrou deleted the PARQUET-1990-invalid-converted-type branch April 1, 2021 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants