1 21 22 package org.apache.derby.iapi.sql.compile; 23 24 import org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor; 25 26 import org.apache.derby.iapi.services.compiler.MethodBuilder; 27 28 import org.apache.derby.iapi.error.StandardException; 29 30 import org.apache.derby.iapi.util.JBitSet; 31 32 36 37 public interface OptimizablePredicateList 38 { 39 44 public int size(); 45 46 53 public OptimizablePredicate getOptPredicate(int n); 54 55 62 void removeOptPredicate(int predCtr) throws StandardException; 63 64 69 void addOptPredicate(OptimizablePredicate optPredicate); 70 71 81 boolean useful(Optimizable optTable, ConglomerateDescriptor cd) 82 throws StandardException; 83 84 98 void pushUsefulPredicates(Optimizable optTable) 99 throws StandardException; 100 101 115 void classify(Optimizable optTable, ConglomerateDescriptor cd) 116 throws StandardException; 117 118 124 public void markAllPredicatesQualifiers(); 125 126 138 boolean hasOptimizableEqualityPredicate(Optimizable optTable, 139 int columnNumber, 140 boolean isNullOkay) 141 throws StandardException; 142 143 153 boolean hasOptimizableEquijoin(Optimizable optTable, 154 int columnNumber) 155 throws StandardException; 156 157 158 168 void putOptimizableEqualityPredicateFirst(Optimizable optTable, 169 int columnNumber) 170 throws StandardException; 171 172 185 public void transferPredicates(OptimizablePredicateList otherList, 186 JBitSet referencedTableMap, 187 Optimizable table) 188 throws StandardException; 189 190 191 196 public void transferAllPredicates(OptimizablePredicateList otherList) 197 throws StandardException; 198 199 210 public void copyPredicatesToOtherList(OptimizablePredicateList otherList) 211 throws StandardException; 212 213 222 public void setPredicatesAndProperties(OptimizablePredicateList otherList) 223 throws StandardException; 224 225 234 public boolean isRedundantPredicate(int predNum); 235 236 240 int startOperator(Optimizable optTable); 241 242 246 int stopOperator(Optimizable optTable); 247 248 268 void generateQualifiers(ExpressionClassBuilderInterface acb, 269 MethodBuilder mb, 270 Optimizable optTable, 271 boolean absolute) 272 throws StandardException; 273 274 283 void generateStartKey(ExpressionClassBuilderInterface acb, 284 MethodBuilder mb, 285 Optimizable optTable) 286 throws StandardException; 287 288 297 void generateStopKey(ExpressionClassBuilderInterface acb, 298 MethodBuilder mb, 299 Optimizable optTable) 300 throws StandardException; 301 302 311 public boolean sameStartStopPosition() 312 throws StandardException; 313 314 322 public double selectivity(Optimizable optTable) throws StandardException; 323 324 } 325 | Popular Tags |