protected SqlWindow getWindowByName( SqlIdentifier id, SqlValidatorScope scope) { SqlWindow window = null; if (id.isSimple()) { final String name = id.getSimple(); window = scope.lookupWindow(name); } if (window == null) { throw newValidationError(id, RESOURCE.windowNotFound(id.toString())); } return window; }
public SqlWindow resolveWindow( SqlNode windowOrRef, SqlValidatorScope scope, boolean populateBounds) { SqlWindow window; if (windowOrRef instanceof SqlIdentifier) { window = getWindowByName((SqlIdentifier) windowOrRef, scope); } else { window = (SqlWindow) windowOrRef; } while (true) { final SqlIdentifier refId = window.getRefName(); if (refId == null) { break; } final String refName = refId.getSimple(); SqlWindow refWindow = scope.lookupWindow(refName); if (refWindow == null) { throw newValidationError(refId, RESOURCE.windowNotFound(refName)); } window = window.overlay(refWindow, this); } if (populateBounds) { window.populateBounds(); } return window; }
public SqlWindow lookupWindow(String name) { // Lookup window in enclosing select. if (usingScope != null) { return usingScope.lookupWindow(name); } else { return null; } }
public SqlWindow lookupWindow(String name) { // Lookup window in enclosing select. if (usingScope != null) { return usingScope.lookupWindow(name); } else { return null; } }
public SqlWindow lookupWindow(String name) { return parent.lookupWindow(name); }
public SqlWindow lookupWindow(String name) { return parent.lookupWindow(name); }
public SqlWindow lookupWindow(String name) { final SqlNodeList windowList = select.getWindowList(); for (int i = 0; i < windowList.size(); i++) { SqlWindow window = (SqlWindow) windowList.get(i); final SqlIdentifier declId = window.getDeclName(); assert declId.isSimple(); if (declId.names.get(0).equals(name)) { return window; } } // if not in the select scope, then check window scope if (windowParent != null) { return windowParent.lookupWindow(name); } else { return null; } }
public SqlWindow lookupWindow(String name) { final SqlNodeList windowList = select.getWindowList(); for (int i = 0; i < windowList.size(); i++) { SqlWindow window = (SqlWindow) windowList.get(i); final SqlIdentifier declId = window.getDeclName(); assert declId.isSimple(); if (declId.names.get(0).equals(name)) { return window; } } // if not in the select scope, then check window scope if (windowParent != null) { return windowParent.lookupWindow(name); } else { return null; } }
protected SqlWindow getWindowByName( SqlIdentifier id, SqlValidatorScope scope) { SqlWindow window = null; if (id.isSimple()) { final String name = id.getSimple(); window = scope.lookupWindow(name); } if (window == null) { throw newValidationError(id, RESOURCE.windowNotFound(id.toString())); } return window; }
protected SqlWindow getWindowByName( SqlIdentifier id, SqlValidatorScope scope) { SqlWindow window = null; if (id.isSimple()) { final String name = id.getSimple(); window = scope.lookupWindow(name); } if (window == null) { throw newValidationError(id, RESOURCE.windowNotFound(id.toString())); } return window; }
public SqlWindow resolveWindow( SqlNode windowOrRef, SqlValidatorScope scope, boolean populateBounds) { SqlWindow window; if (windowOrRef instanceof SqlIdentifier) { window = getWindowByName((SqlIdentifier) windowOrRef, scope); } else { window = (SqlWindow) windowOrRef; } while (true) { final SqlIdentifier refId = window.getRefName(); if (refId == null) { break; } final String refName = refId.getSimple(); SqlWindow refWindow = scope.lookupWindow(refName); if (refWindow == null) { throw newValidationError(refId, RESOURCE.windowNotFound(refName)); } window = window.overlay(refWindow, this); } if (populateBounds) { window.populateBounds(); } return window; }
public SqlWindow resolveWindow( SqlNode windowOrRef, SqlValidatorScope scope, boolean populateBounds) { SqlWindow window; if (windowOrRef instanceof SqlIdentifier) { window = getWindowByName((SqlIdentifier) windowOrRef, scope); } else { window = (SqlWindow) windowOrRef; } while (true) { final SqlIdentifier refId = window.getRefName(); if (refId == null) { break; } final String refName = refId.getSimple(); SqlWindow refWindow = scope.lookupWindow(refName); if (refWindow == null) { throw newValidationError(refId, RESOURCE.windowNotFound(refName)); } window = window.overlay(refWindow, this); } if (populateBounds) { window.populateBounds(); } return window; }
scope.lookupWindow(((SqlIdentifier) over).getSimple()); window.getPartitionList().accept(this); window.getOrderList().accept(this);
scope.lookupWindow(((SqlIdentifier) over).getSimple()); window.getPartitionList().accept(this); window.getOrderList().accept(this);
scope.lookupWindow(((SqlIdentifier) over).getSimple()); window.getPartitionList().accept(this); window.getOrderList().accept(this);