JackieTien97 commented on code in PR #15628:
URL: https://github.com/apache/iotdb/pull/15628#discussion_r2127846370
##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/relational/tvf/VariationTableFunction.java:
##########
@@ -62,6 +67,13 @@ public List<ParameterSpecification>
getArgumentsSpecifications() {
ScalarParameterSpecification.builder()
.name(DELTA_PARAMETER_NAME)
.type(Type.DOUBLE)
+ .defaultValue(0.0)
+ .addChecker(NON_NEGATIVE_DOUBLE_CHECKER)
+ .build(),
+ ScalarParameterSpecification.builder()
+ .name(IGNORE_NULL_PARAMETER_NAME)
+ .type(Type.BOOLEAN)
+ .defaultValue(false)
Review Comment:
```suggestion
.defaultValue(true)
```
##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/relational/tvf/VariationTableFunction.java:
##########
@@ -147,13 +234,20 @@ public void finish(
outputWindow(properColumnBuilders, passThroughIndexBuilder);
}
- private void outputWindow(
+ protected void outputWindow(
List<ColumnBuilder> properColumnBuilders, ColumnBuilder
passThroughIndexBuilder) {
+ boolean increaseIndex = false;
for (long i = currentStartIndex; i < curIndex; i++) {
+ if (!skipIndex.isEmpty() && i == skipIndex.peek()) {
+ // skip the index if it is in the skip queue
+ skipIndex.poll();
+ continue;
+ }
Review Comment:
we should also output those null line., like 1, null, 1, null, 2, null, 2,
3, null, 3, null,
first group contains 1, null, 1, null
secodn group contains 2, null, 2,
third group contains 3, null, 3, null
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]