@Override public void visit(WindowSpecification windowSpecification) { if (windowSpecification.getPartition() == null) { return; } List<Expression> partition = windowSpecification.getPartition(); for (int i = 0; i < partition.size(); i++) { partition.set(i, replaceExpression(partition.get(i))); } }
@Override public void visit(WindowSpecification windowSpecification) { if (windowSpecification.getPartition() == null) { return; } List<Expression> partition = windowSpecification.getPartition(); for (int i = 0; i < partition.size(); i++) { partition.set(i, replaceExpression(partition.get(i))); } }
@Override public void visit(WindowSpecification windowSpecification) { if (windowSpecification.getPartition() == null) { return; } List<Expression> partition = windowSpecification.getPartition(); for (int i = 0; i < partition.size(); i++) { partition.set(i, replaceExpression(partition.get(i))); } }
wsi = new WindowSpecificationInfo(); windows.put(ws, wsi); if (ws.getPartition() != null) { for (Expression ex1 : ws.getPartition()) { if (EvaluatableVisitor.willBecomeConstant(ex1)) { wsi.emptyOrdering = true;
@Override public void visit(WindowSpecification obj) { preVisitVisitor(obj); visitNodes(obj.getPartition()); visitNode(obj.getOrderBy()); postVisitVisitor(obj); }
wsi = new WindowSpecificationInfo(); windows.put(ws, wsi); if (ws.getPartition() != null) { for (Expression ex1 : ws.getPartition()) { if (EvaluatableVisitor.willBecomeConstant(ex1)) { wsi.emptyOrdering = true;
@Override public void visit(WindowSpecification obj) { preVisitVisitor(obj); visitNodes(obj.getPartition()); visitNode(obj.getOrderBy()); visitNode(obj.getWindowFrame()); postVisitVisitor(obj); }
@Override public void visit(WindowSpecification obj) { preVisitVisitor(obj); visitNodes(obj.getPartition()); visitNode(obj.getOrderBy()); visitNode(obj.getWindowFrame()); postVisitVisitor(obj); }
@Override public void visit(WindowSpecification windowSpecification) { append(Tokens.LPAREN); boolean needsSpace = false; if (windowSpecification.getPartition() != null) { append(PARTITION); append(SPACE); append(BY); append(SPACE); registerNodes(windowSpecification.getPartition(), 0); needsSpace = true; } if (windowSpecification.getOrderBy() != null) { if (needsSpace) { append(SPACE); } append(windowSpecification.getOrderBy()); } append(Tokens.RPAREN); }
for (WindowFunction windowFunction : windowFunctions) { WindowSpecification spec = windowFunction.getWindowSpecification(); if (spec.getPartition() == null) { return null; if (!spec.getPartition().contains(symbolMap.getMappedExpression(col))) { return null;
for (WindowFunction windowFunction : windowFunctions) { WindowSpecification spec = windowFunction.getWindowSpecification(); if (spec.getPartition() == null) { return null; if (!spec.getPartition().contains(symbolMap.getMappedExpression(col))) { return null;
@Override public void visit(WindowSpecification windowSpecification) { append(Tokens.LPAREN); boolean needsSpace = false; if (windowSpecification.getPartition() != null) { append(PARTITION); append(SPACE); append(BY); append(SPACE); registerNodes(windowSpecification.getPartition(), 0); needsSpace = true; } if (windowSpecification.getOrderBy() != null) { if (needsSpace) { append(SPACE); } append(windowSpecification.getOrderBy()); needsSpace = true; } if (windowSpecification.getWindowFrame() != null) { if (needsSpace) { append(SPACE); } append(windowSpecification.getWindowFrame()); } append(Tokens.RPAREN); }
@Override public void visit(WindowSpecification windowSpecification) { append(Tokens.LPAREN); boolean needsSpace = false; if (windowSpecification.getPartition() != null) { append(PARTITION); append(SPACE); append(BY); append(SPACE); registerNodes(windowSpecification.getPartition(), 0); needsSpace = true; } if (windowSpecification.getOrderBy() != null) { if (needsSpace) { append(SPACE); } append(windowSpecification.getOrderBy()); needsSpace = true; } if (windowSpecification.getWindowFrame() != null) { if (needsSpace) { append(SPACE); } append(windowSpecification.getWindowFrame()); } append(Tokens.RPAREN); }
org.teiid.language.WindowFunction translate(WindowFunction windowFunction) { org.teiid.language.WindowFunction result = new org.teiid.language.WindowFunction(); result.setFunction(translate(windowFunction.getFunction())); WindowSpecification ws = new WindowSpecification(); ws.setOrderBy(translate(windowFunction.getWindowSpecification().getOrderBy(), false)); List<Expression> partition = windowFunction.getWindowSpecification().getPartition(); if (partition != null) { ArrayList<org.teiid.language.Expression> partitionList = translateExpressionList(partition); ws.setPartition(partitionList); } result.setWindowSpecification(ws); return result; }
org.teiid.language.WindowFunction translate(WindowFunction windowFunction) { org.teiid.language.WindowFunction result = new org.teiid.language.WindowFunction(); result.setFunction(translate(windowFunction.getFunction())); WindowSpecification ws = new WindowSpecification(); ws.setOrderBy(translate(windowFunction.getWindowSpecification().getOrderBy(), false)); List<Expression> partition = windowFunction.getWindowSpecification().getPartition(); if (partition != null) { ArrayList<org.teiid.language.Expression> partitionList = translateExpressionList(partition); ws.setPartition(partitionList); } WindowFrame frame = windowFunction.getWindowSpecification().getWindowFrame(); if (frame != null) { org.teiid.language.WindowFrame resultFrame = new org.teiid.language.WindowFrame(frame.getMode()); resultFrame.setStart(translate(frame.getStart())); resultFrame.setEnd(translate(frame.getEnd())); ws.setWindowFrame(resultFrame); } result.setWindowSpecification(ws); return result; }
org.teiid.language.WindowFunction translate(WindowFunction windowFunction) { org.teiid.language.WindowFunction result = new org.teiid.language.WindowFunction(); result.setFunction(translate(windowFunction.getFunction())); WindowSpecification ws = new WindowSpecification(); ws.setOrderBy(translate(windowFunction.getWindowSpecification().getOrderBy(), false)); List<Expression> partition = windowFunction.getWindowSpecification().getPartition(); if (partition != null) { ArrayList<org.teiid.language.Expression> partitionList = translateExpressionList(partition); ws.setPartition(partitionList); } WindowFrame frame = windowFunction.getWindowSpecification().getWindowFrame(); if (frame != null) { org.teiid.language.WindowFrame resultFrame = new org.teiid.language.WindowFrame(frame.getMode()); resultFrame.setStart(translate(frame.getStart())); resultFrame.setEnd(translate(frame.getEnd())); ws.setWindowFrame(resultFrame); } result.setWindowSpecification(ws); return result; }
if (!CapabilitiesUtil.checkElementsAreSearchable(windowFunction.getWindowSpecification().getPartition(), metadata, SupportConstants.Element.SEARCHABLE_COMPARE)) { markInvalid(windowFunction, "not all source columns support search type"); //$NON-NLS-1$
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0042", new Object[] {windowFunction.getFunction(), windowFunction}), windowFunction); //$NON-NLS-1$ if (windowFunction.getWindowSpecification().getPartition() != null) { validateSortable(windowFunction.getWindowSpecification().getPartition());
if (!CapabilitiesUtil.checkElementsAreSearchable(windowFunction.getWindowSpecification().getPartition(), metadata, SupportConstants.Element.SEARCHABLE_COMPARE)) { markInvalid(windowFunction, "not all source columns support search type"); //$NON-NLS-1$
if (!CapabilitiesUtil.checkElementsAreSearchable(windowFunction.getWindowSpecification().getPartition(), metadata, SupportConstants.Element.SEARCHABLE_COMPARE)) { markInvalid(windowFunction, "not all source columns support search type"); //$NON-NLS-1$