flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] JingsongLi edited a comment on issue #8102: [FLINK-12087][table-runtime-blink] Introduce over window operators to blink batch
Date Mon, 08 Apr 2019 06:01:12 GMT
JingsongLi edited a comment on issue #8102: [FLINK-12087][table-runtime-blink] Introduce over
window operators to blink batch
URL: https://github.com/apache/flink/pull/8102#issuecomment-480694448
 
 
   Consider a new `BaseSlidingOverFrame`:
   It has two abstract method:
   1.`public abstract boolean isLeftBoundRowInWindow(BaseRow inputRow, int inputIndex, BaseRow
currentRow, int currentIndex);`
   2.`public abstract boolean isRightBoundRowInWindow(BaseRow inputRow, int inputIndex, BaseRow
currentRow, int currentIndex);`
   In `process`, it will invoke `isLeftBoundRowInWindow` and `isRightBoundRowInWindow` to
determine boundaries.
   
   In `RowSlidingOverFrame`:
   ```
   	@Override
   	public boolean isLeftBoundRowInWindow(BaseRow inputRow, int inputIndex, BaseRow currentRow,
   			int currentIndex) {
   		return inputIndex >= currentIndex + leftOffset;
   	}
   
   	@Override
   	public boolean isRightBoundRowInWindow(BaseRow inputRow, int inputIndex, BaseRow currentRow,
   			int currentIndex) {
   		return inputIndex <= currentIndex + rightOffset;
   	}
   ```
   
   In `RangeSlidingOverFrame`:
   ```
   	@Override
   	public boolean isLeftBoundRowInWindow(BaseRow inputRow, int inputIndex, BaseRow currentRow,
   			int currentIndex) {
   		return lbound.compare(inputRow, currentRow) >= 0;
   	}
   
   	@Override
   	public boolean isRightBoundRowInWindow(BaseRow inputRow, int inputIndex, BaseRow currentRow,
   			int currentIndex) {
   		return rbound.compare(inputRow, currentRow) <= 0;
   	}
   ```
   
   I mean the `isLeftBoundRowInWindow` and `isRightBoundRowInWindow` make thing more complicated.
Still has args: `(BaseRow inputRow, int inputIndex, BaseRow currentRow, int currentIndex)`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message