private static Pair<GroupByDesc,VectorGroupByDesc> buildGroupByDescType( VectorizationContext ctx, String aggregate, GenericUDAFEvaluator.Mode mode, String column, TypeInfo dataType) { AggregationDesc agg = buildAggregationDesc(ctx, aggregate, mode, column, dataType); ArrayList<AggregationDesc> aggs = new ArrayList<AggregationDesc>(); aggs.add(agg); ArrayList<String> outputColumnNames = new ArrayList<String>(); outputColumnNames.add("_col0"); GroupByDesc desc = new GroupByDesc(); VectorGroupByDesc vectorDesc = new VectorGroupByDesc(); desc.setOutputColumnNames(outputColumnNames); desc.setAggregators(aggs); vectorDesc.setProcessingMode(ProcessingMode.GLOBAL); return new Pair<GroupByDesc,VectorGroupByDesc>(desc, vectorDesc); }
public Pair<Node,Node> getPair () { return Pair.of(a, b); } public Node getA () { return a; }
private static Pair<GroupByDesc,VectorGroupByDesc> buildGroupByDescCountStar( VectorizationContext ctx) { AggregationDesc agg = buildAggregationDescCountStar(ctx); ArrayList<AggregationDesc> aggs = new ArrayList<AggregationDesc>(); aggs.add(agg); ArrayList<String> outputColumnNames = new ArrayList<String>(); outputColumnNames.add("_col0"); GroupByDesc desc = new GroupByDesc(); VectorGroupByDesc vectorDesc = new VectorGroupByDesc(); vectorDesc.setVecAggrDescs( new VectorAggregationDesc[] { new VectorAggregationDesc( agg.getGenericUDAFName(), new GenericUDAFCount.GenericUDAFCountEvaluator(), agg.getMode(), null, ColumnVector.Type.NONE, null, TypeInfoFactory.longTypeInfo, ColumnVector.Type.LONG, VectorUDAFCountStar.class)}); vectorDesc.setProcessingMode(VectorGroupByDesc.ProcessingMode.HASH); desc.setOutputColumnNames(outputColumnNames); desc.setAggregators(aggs); return new Pair<GroupByDesc,VectorGroupByDesc>(desc, vectorDesc); }
private void outerThisDef(Symbol owner) { Type target = types.erasure(owner.enclClass().type.getEnclosingType()); Pair<TypeSymbol, Symbol> outerThis = Pair.of(target.tsym, owner); outerThisStack = outerThisStack.prepend(outerThis); }
public static <A,B> Pair<A,B> of(A a, B b) { return new Pair<A,B>(a,b); } }
public static <A,B> Pair<A,B> of(A a, B b) { return new Pair<A,B>(a,b); } }
public static <A,B> Pair<A,B> of(A a, B b) { return new Pair<A,B>(a,b); } }
public static <A,B> Pair<A,B> of(A a, B b) { return new Pair<A,B>(a,b); } }
/** Returns true if an error needs to be reported for a given * source name and pos. */ protected boolean shouldReport(JavaFileObject file, int pos) { if (multipleErrors || file == null) return true; Pair<JavaFileObject,Integer> coords = new Pair<JavaFileObject,Integer>(file, pos); boolean shouldReport = !recorded.contains(coords); if (shouldReport) recorded.add(coords); return shouldReport; }
/** Returns true if an error needs to be reported for a given * source name and pos. */ protected boolean shouldReport(JavaFileObject file, int pos) { if (multipleErrors || file == null) return true; Pair<JavaFileObject,Integer> coords = new Pair<JavaFileObject,Integer>(file, pos); boolean shouldReport = !recorded.contains(coords); if (shouldReport) recorded.add(coords); return shouldReport; }
/** Returns true if an error needs to be reported for a given * source name and pos. */ protected boolean shouldReport(JavaFileObject file, int pos) { if (multipleErrors || file == null) return true; Pair<JavaFileObject,Integer> coords = new Pair<JavaFileObject,Integer>(file, pos); boolean shouldReport = !recorded.contains(coords); if (shouldReport) recorded.add(coords); return shouldReport; }
/** Returns true if an error needs to be reported for a given * source name and pos. */ protected boolean shouldReport(JavaFileObject file, int pos) { if (multipleErrors || file == null) return true; Pair<JavaFileObject,Integer> coords = new Pair<JavaFileObject,Integer>(file, pos); boolean shouldReport = !recorded.contains(coords); if (shouldReport) recorded.add(coords); return shouldReport; }
protected Pair<Symbol, JCDiagnostic> errCandidate() { Candidate bestSoFar = null; for (Candidate c : resolveContext.candidates) { if (c.isApplicable()) continue; bestSoFar = c; } Assert.checkNonNull(bestSoFar); return new Pair<Symbol, JCDiagnostic>(bestSoFar.sym, bestSoFar.details); } }
protected Pair<Symbol, JCDiagnostic> errCandidate() { Candidate bestSoFar = null; for (Candidate c : resolveContext.candidates) { if (c.isApplicable()) continue; bestSoFar = c; } Assert.checkNonNull(bestSoFar); return new Pair<Symbol, JCDiagnostic>(bestSoFar.sym, bestSoFar.details); } }
/** * Returns the best approximation for the tree node and compilation unit * corresponding to the given element, annotation and value. * If the element is null, null is returned. * If the annotation is null or cannot be found, the tree node and * compilation unit for the element is returned. * If the annotation value is null or cannot be found, the tree node and * compilation unit for the annotation is returned. */ public Pair<JCTree, JCCompilationUnit> getTreeAndTopLevel( Element e, AnnotationMirror a, AnnotationValue v) { if (e == null) return null; Pair<JCTree, JCCompilationUnit> elemTreeTop = getTreeAndTopLevel(e); if (elemTreeTop == null) return null; if (a == null) return elemTreeTop; JCTree annoTree = matchAnnoToTree(a, e, elemTreeTop.fst); if (annoTree == null) return elemTreeTop; // 6388543: if v != null, we should search within annoTree to find // the tree matching v. For now, we ignore v and return the tree of // the annotation. return new Pair<JCTree, JCCompilationUnit>(annoTree, elemTreeTop.snd); }
/** * Returns the best approximation for the tree node and compilation unit * corresponding to the given element, annotation and value. * If the element is null, null is returned. * If the annotation is null or cannot be found, the tree node and * compilation unit for the element is returned. * If the annotation value is null or cannot be found, the tree node and * compilation unit for the annotation is returned. */ public Pair<JCTree, JCCompilationUnit> getTreeAndTopLevel( Element e, AnnotationMirror a, AnnotationValue v) { if (e == null) return null; Pair<JCTree, JCCompilationUnit> elemTreeTop = getTreeAndTopLevel(e); if (elemTreeTop == null) return null; if (a == null) return elemTreeTop; JCTree annoTree = matchAnnoToTree(a, e, elemTreeTop.fst); if (annoTree == null) return elemTreeTop; // 6388543: if v != null, we should search within annoTree to find // the tree matching v. For now, we ignore v and return the tree of // the annotation. return new Pair<JCTree, JCCompilationUnit>(annoTree, elemTreeTop.snd); }
/** * Returns the best approximation for the tree node and compilation unit * corresponding to the given element, annotation and value. * If the element is null, null is returned. * If the annotation is null or cannot be found, the tree node and * compilation unit for the element is returned. * If the annotation value is null or cannot be found, the tree node and * compilation unit for the annotation is returned. */ public Pair<JCTree, JCCompilationUnit> getTreeAndTopLevel( Element e, AnnotationMirror a, AnnotationValue v) { if (e == null) return null; Pair<JCTree, JCCompilationUnit> elemTreeTop = getTreeAndTopLevel(e); if (elemTreeTop == null) return null; if (a == null) return elemTreeTop; JCTree annoTree = matchAnnoToTree(a, e, elemTreeTop.fst); if (annoTree == null) return elemTreeTop; // 6388543: if v != null, we should search within annoTree to find // the tree matching v. For now, we ignore v and return the tree of // the annotation. return new Pair<JCTree, JCCompilationUnit>(annoTree, elemTreeTop.snd); }
/** * Returns the best approximation for the tree node and compilation unit * corresponding to the given element, annotation and value. * If the element is null, null is returned. * If the annotation is null or cannot be found, the tree node and * compilation unit for the element is returned. * If the annotation value is null or cannot be found, the tree node and * compilation unit for the annotation is returned. */ public Pair<JCTree, JCCompilationUnit> getTreeAndTopLevel( Element e, AnnotationMirror a, AnnotationValue v) { if (e == null) return null; Pair<JCTree, JCCompilationUnit> elemTreeTop = getTreeAndTopLevel(e); if (elemTreeTop == null) return null; if (a == null) return elemTreeTop; JCTree annoTree = matchAnnoToTree(a, e, elemTreeTop.fst); if (annoTree == null) return elemTreeTop; // 6388543: if v != null, we should search within annoTree to find // the tree matching v. For now, we ignore v and return the tree of // the annotation. return new Pair<JCTree, JCCompilationUnit>(annoTree, elemTreeTop.snd); }