Skip to content

Commit

Permalink
Add minor refactoring changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanvive committed Jun 28, 2019
1 parent 3f2d381 commit f64efce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.siddhi.annotation.Example;
import io.siddhi.annotation.Extension;
import io.siddhi.annotation.Parameter;
import io.siddhi.annotation.ParameterOverload;
import io.siddhi.annotation.util.DataType;
import io.siddhi.core.config.SiddhiQueryContext;
import io.siddhi.core.event.ComplexEventChunk;
Expand Down Expand Up @@ -81,7 +82,13 @@
type = {DataType.STRING},
optional = true,
defaultValue = "asc")
}, examples = @Example(
},
parameterOverloads = {
@ParameterOverload(parameterNames = {"window.length", "attribute"}),
@ParameterOverload(parameterNames = {"window.length", "attribute", "order", "..."}),
@ParameterOverload(parameterNames = {"window.length", "attribute", "order", "attribute", "..."})
},
examples = @Example(
syntax = "define stream cseEventStream (symbol string, price float, volume long);\n" +
"define window cseEventWindow (symbol string, price float, volume long) sort(2,volume, 'asc')" +
";\n@info(name = 'query0')\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ public static void validateExpressionExecutors(Object objectHavingAnnotation,
}
} else if (overloadParameterNames.length > 0 &&
overloadParameterNames[overloadParameterNames.length - 1].equals(REPETITIVE_PARAMETER_NOTATION)) {

Parameter previousParameter = null;
boolean isExpectedParameterOverload = true;
for (int i = 0; i < attributeExpressionExecutors.length; i++) {
Parameter parameter = null;
Expand Down

0 comments on commit f64efce

Please sign in to comment.