MCPcopy Create free account
hub / github.com/apache/orc / sameVariants

Method sameVariants

java/core/src/java/org/apache/orc/OrcFile.java:1179–1195  ·  view source on GitHub ↗
(EncryptionVariant[] first,
                                      EncryptionVariant[] next)

Source from the content-addressed store, hash-verified

1177 }
1178
1179 private static boolean sameVariants(EncryptionVariant[] first,
1180 EncryptionVariant[] next) {
1181 if (first.length != next.length) {
1182 return false;
1183 }
1184 for(int k = 0; k < first.length; ++k) {
1185 if ((first[k].getKeyDescription() == null) !=
1186 (next[k].getKeyDescription() == null) ||
1187 !first[k].getKeyDescription().getKeyName().equals(
1188 next[k].getKeyDescription().getKeyName()) ||
1189 first[k].getRoot().getId() !=
1190 next[k].getRoot().getId()) {
1191 return false;
1192 }
1193 }
1194 return true;
1195 }
1196
1197 /**
1198 * Is the new reader compatible with the file that is being written?

Callers 1

readerIsCompatibleMethod · 0.95

Calls 5

getKeyDescriptionMethod · 0.65
getKeyNameMethod · 0.65
getRootMethod · 0.65
equalsMethod · 0.45
getIdMethod · 0.45

Tested by

no test coverage detected