-
Notifications
You must be signed in to change notification settings - Fork 0
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
Investigate boolean encoding in vectors #7
Comments
The java implementation seems to clearly contradict the spec here public void writeBool(boolean b) throws TException {
if (booleanField_ != null) {
// we haven't written the field header yet
writeFieldBeginInternal(booleanField_, b ? Types.BOOLEAN_TRUE : Types.BOOLEAN_FALSE);
booleanField_ = null;
} else {
// we're not part of a field, so just write the value.
writeByteDirect(b ? Types.BOOLEAN_TRUE : Types.BOOLEAN_FALSE);
}
} And here, called via private static final byte[] ttypeToCompactType = new byte[18];
static {
ttypeToCompactType[TType.STOP] = TType.STOP;
ttypeToCompactType[TType.BOOL] = Types.BOOLEAN_TRUE;
...
} |
The documentation was updated in apache/thrift@2c29c56
Similarly for collections:
|
The |
Fixed in commit c54a4d7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The spec says
and
But it seems the
ColumnIndex::null_pages
field inalltypes_tiny_pages.parquet
, written byparquet-mr version 1.12.0-SNAPSHOT (build 6901a2040848c6b37fa61f4b0a76246445f396db)
encodes the element type as 1 and contains elements with value 2.We probably need to be lenient and support both, decoding element values as
byte_value == 1
.The text was updated successfully, but these errors were encountered: