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

Method sameMasks

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

Source from the content-addressed store, hash-verified

1144 }
1145
1146 private static boolean sameMasks(DataMaskDescription[] first,
1147 DataMaskDescription[] next) {
1148 if (first.length != next.length) {
1149 return false;
1150 }
1151 for(int k = 0; k < first.length; ++k) {
1152 if (!first[k].getName().equals(next[k].getName())) {
1153 return false;
1154 }
1155 String[] firstParam = first[k].getParameters();
1156 String[] nextParam = next[k].getParameters();
1157 if (firstParam.length != nextParam.length) {
1158 return false;
1159 }
1160 for(int p=0; p < firstParam.length; ++p) {
1161 if (!firstParam[p].equals(nextParam[p])) {
1162 return false;
1163 }
1164 }
1165 TypeDescription[] firstRoots = first[k].getColumns();
1166 TypeDescription[] nextRoots = next[k].getColumns();
1167 if (firstRoots.length != nextRoots.length) {
1168 return false;
1169 }
1170 for(int r=0; r < firstRoots.length; ++r) {
1171 if (firstRoots[r].getId() != nextRoots[r].getId()) {
1172 return false;
1173 }
1174 }
1175 }
1176 return true;
1177 }
1178
1179 private static boolean sameVariants(EncryptionVariant[] first,
1180 EncryptionVariant[] next) {

Callers 1

readerIsCompatibleMethod · 0.95

Calls 5

getNameMethod · 0.65
getParametersMethod · 0.65
getColumnsMethod · 0.65
equalsMethod · 0.45
getIdMethod · 0.45

Tested by

no test coverage detected