Github user hsuanyi commented on a diff in the pull request: https://github.com/apache/drill/pull/397#discussion_r56459723 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlOperator.java --- @@ -64,4 +108,47 @@ public boolean isDeterministic() { public List<DrillFuncHolder> getFunctions() { return functions; } + + public static class DrillSqlOperatorBuilder { + private String name; + private final List<DrillFuncHolder> functions = Lists.newArrayList(); + private int argCountMin = Integer.MAX_VALUE; + private int argCountMax = Integer.MIN_VALUE; + private boolean isDeterministic = true; + + public DrillSqlOperatorBuilder setName(final String name) { + this.name = name; + return this; + } + + public DrillSqlOperatorBuilder addFunctions(Collection<DrillFuncHolder> functions) { + this.functions.addAll(functions); + return this; + } + + public DrillSqlOperatorBuilder setArgumentCount(final int argCountMin, final int argCountMax) { + this.argCountMin = Math.min(this.argCountMin, argCountMin); + this.argCountMax = Math.max(this.argCountMax, argCountMax); + return this; + } + + public DrillSqlOperatorBuilder setDeterministic(boolean isDeterministic) { + if(this.isDeterministic) { --- End diff -- addressed
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---