WindowSpec window = null;
try {
// This should evaluate to itself, but make sure to resolve it anyway.
assert mWindowExpr.isConstant();
window = (WindowSpec) mWindowExpr.eval(new EmptyEventWrapper());
} catch (IOException ioe) {
// mWindowExpr should be constant, so this should be impossible.
LOG.error("IOException calculating window expression: " + ioe);
// Signal error by returning a null flow specification anyway.
planContext.setFlowSpec(null);