apache / apache/parquet-java

Encrypting the entire table is impossible

Open
#1,645 0 comments 0 reactions 0 assignees View on GitHub
Component: Java Component: Parquet Priority: Major Type: bug
Dominant language
Java
Stars
3.1k
Forks
1.6k
Avg merge
3d 12h
Merged PRs (30d)
33

Description

 

```java

public InternalColumnEncryptionSetup getColumnSetup(ColumnPath columnPath,
boolean createIfNull, int ordinal) {
InternalColumnEncryptionSetup internalColumnProperties = columnMap.get(columnPath);

if (null != internalColumnProperties) {
if (ordinal != internalColumnProperties.getOrdinal()) {
throw new ParquetCryptoRuntimeException("Column ordinal doesnt match " + columnPath +
": " + ordinal + ", "+internalColumnProperties.getOrdinal());
}
return internalColumnProperties;
}

------ here is always true, then throw Exception
if (!createIfNull) {
throw new ParquetCryptoRuntimeException("No encryption setup found for column " + columnPath);
}
if (fileCryptoMetaDataCreated) {
throw new ParquetCryptoRuntimeException("Re-use: No encryption setup for column " + columnPath);
}

```

**Environment**: Linux
**Reporter**: [ren shangtao](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=renshangtao)

**Note**: *This issue was originally created as [PARQUET-2174](https://issues.apache.org/jira/browse/PARQUET-2174). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.