fillInWindowSpec(source.getSourceId(), dest, visited);
fillInWindowSpec(source.getSourceId(), dest, visited);
public void validateAndMakeEffective() throws SemanticException { for(WindowExpressionSpec expr : getWindowExpressions()) { WindowFunctionSpec wFn = (WindowFunctionSpec) expr; WindowSpec wdwSpec = wFn.getWindowSpec(); // 1. For Wdw Specs that refer to Window Defns, inherit missing components if ( wdwSpec != null ) { ArrayList<String> sources = new ArrayList<String>(); fillInWindowSpec(wdwSpec.getSourceId(), wdwSpec, sources); } if ( wdwSpec == null ) { wdwSpec = new WindowSpec(); wFn.setWindowSpec(wdwSpec); } // 2. A Window Spec with no Parition Spec, is Partitioned on a Constant(number 0) applyConstantPartition(wdwSpec); // 3. For missing Wdw Frames or for Frames with only a Start Boundary, completely // specify them by the rules in {@link effectiveWindowFrame} effectiveWindowFrame(wFn); // 4. Validate the effective Window Frames with the rules in {@link validateWindowFrame} validateWindowFrame(wdwSpec); // 5. Add the Partition expressions as the Order if there is no Order and validate Order spec. setAndValidateOrderSpec(wFn); } }
public void validateAndMakeEffective() throws SemanticException { for(WindowExpressionSpec expr : getWindowExpressions()) { WindowFunctionSpec wFn = (WindowFunctionSpec) expr; WindowSpec wdwSpec = wFn.getWindowSpec(); // 1. For Wdw Specs that refer to Window Defns, inherit missing components if ( wdwSpec != null ) { ArrayList<String> sources = new ArrayList<String>(); fillInWindowSpec(wdwSpec.getSourceId(), wdwSpec, sources); } if ( wdwSpec == null ) { wdwSpec = new WindowSpec(); wFn.setWindowSpec(wdwSpec); } // 2. A Window Spec with no Parition Spec, is Partitioned on a Constant(number 0) applyConstantPartition(wdwSpec); // 3. For missing Wdw Frames or for Frames with only a Start Boundary, completely // specify them by the rules in {@link effectiveWindowFrame} effectiveWindowFrame(wFn); // 4. Validate the effective Window Frames with the rules in {@link validateWindowFrame} validateWindowFrame(wdwSpec); // 5. Add the Partition expressions as the Order if there is no Order and validate Order spec. setAndValidateOrderSpec(wFn); } }
fillInWindowSpec(source.getSourceId(), dest, visited);
public void validateAndMakeEffective() throws SemanticException { for(WindowExpressionSpec expr : getWindowExpressions()) { WindowFunctionSpec wFn = (WindowFunctionSpec) expr; WindowSpec wdwSpec = wFn.getWindowSpec(); // 1. For Wdw Specs that refer to Window Defns, inherit missing components if ( wdwSpec != null ) { ArrayList<String> sources = new ArrayList<String>(); fillInWindowSpec(wdwSpec.getSourceId(), wdwSpec, sources); } if ( wdwSpec == null ) { wdwSpec = new WindowSpec(); wFn.setWindowSpec(wdwSpec); } // 2. A Window Spec with no Parition Spec, is Partitioned on a Constant(number 0) applyContantPartition(wdwSpec); // 3. For missing Wdw Frames or for Frames with only a Start Boundary, completely // specify them by the rules in {@link effectiveWindowFrame} effectiveWindowFrame(wFn, wdwSpec); // 4. Validate the effective Window Frames with the rules in {@link validateWindowFrame} validateWindowFrame(wdwSpec); // 5. If there is no Order, then add the Partition expressions as the Order. wdwSpec.ensureOrderSpec(); } }