wsi.nullOrderings.add(item.getNullOrdering()); wsi.windowFrame = ws.getWindowFrame();
wsi.nullOrderings.add(item.getNullOrdering()); wsi.windowFrame = ws.getWindowFrame();
@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()); needsSpace = true; } if (windowSpecification.getWindowFrame() != null) { if (needsSpace) { append(SPACE); } append(windowSpecification.getWindowFrame()); } append(Tokens.RPAREN); }
if (wf.getFunction().isRowValueFunction()) { Assertion.assertTrue(ws.getWindowFrame() == null); ws = ws.clone(); WindowFrame frame = new WindowFrame(FrameMode.ROWS);
if (wf.getFunction().isRowValueFunction()) { Assertion.assertTrue(ws.getWindowFrame() == null); ws = ws.clone(); WindowFrame frame = new WindowFrame(FrameMode.ROWS);
@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); }
if (expression instanceof WindowFunction) { WindowFunction wf = (WindowFunction)expression; WindowFrame windowFrame = wf.getWindowSpecification().getWindowFrame(); if (windowFrame != null) { if (Integer.valueOf(0).equals(windowFrame.getStart().getBound())) {
if (expression instanceof WindowFunction) { WindowFunction wf = (WindowFunction)expression; WindowFrame windowFrame = wf.getWindowSpecification().getWindowFrame(); if (windowFrame != null) { if (Integer.valueOf(0).equals(windowFrame.getStart().getBound())) {
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; }
return; if (windowFunction.getWindowSpecification().getWindowFrame() != null) { if (!this.caps.supportsCapability(Capability.WINDOW_FUNCTION_FRAME_CLAUSE)) { markInvalid(windowFunction, "Window function frame clause not supported by source"); //$NON-NLS-1$
return; if (windowFunction.getWindowSpecification().getWindowFrame() != null) { if (!this.caps.supportsCapability(Capability.WINDOW_FUNCTION_FRAME_CLAUSE)) { markInvalid(windowFunction, "Window function frame clause not supported by source"); //$NON-NLS-1$
WindowFrame frame = windowFunction.getWindowSpecification().getWindowFrame(); if (frame != null) { if (windowFunction.getWindowSpecification().getOrderBy() == null) {
WindowFrame frame = windowFunction.getWindowSpecification().getWindowFrame(); if (frame != null) { if (windowFunction.getWindowSpecification().getOrderBy() == null) {