drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gparai <...@git.apache.org>
Subject [GitHub] drill pull request #534: [DRILL-4743] HashJoin's not fully parallelized in q...
Date Tue, 12 Jul 2016 19:24:12 GMT
Github user gparai commented on a diff in the pull request:

    https://github.com/apache/drill/pull/534#discussion_r70504774
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/options/TypeValidators.java
---
    @@ -90,6 +105,66 @@ public void validate(OptionValue v) {
         }
       }
     
    +  public static class MinRangeDoubleValidator extends RangeDoubleValidator implements
DependentTypeValidators {
    +    private final double min;
    +    private final double max;
    +    private final String maxValidatorName;
    +
    +    public MinRangeDoubleValidator(String name, double min, double max, double def, String
maxValidatorName) {
    +      super(name, min, max, def);
    +      this.min = min;
    +      this.max = max;
    +      this.maxValidatorName = maxValidatorName;
    +    }
    +
    +    @Override
    +    public void validate(OptionValue v) {
    +      super.validate(v);
    +    }
    +
    +    @Override
    +    public void validate(OptionValue v, final BaseOptionManager manager) {
    +      super.validate(v);
    +      OptionValue maxValue = manager.getOption(maxValidatorName);
    +
    +      if (v.float_val > maxValue.float_val) {
    +        throw UserException.validationError()
    +                .message(String.format("Option %s must be less than Option %s", getOptionName(),
maxValidatorName))
    --- End diff --
    
    Done


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message