You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "KKcorps (via GitHub)" <gi...@apache.org> on 2023/04/10 15:02:27 UTC

[GitHub] [pinot] KKcorps commented on a diff in pull request #10584: Enable index config by default.

KKcorps commented on code in PR #10584:
URL: https://github.com/apache/pinot/pull/10584#discussion_r1161798288


##########
pinot-spi/src/main/java/org/apache/pinot/spi/config/table/IndexConfig.java:
##########
@@ -35,7 +35,15 @@ public class IndexConfig extends BaseJsonConfig {
   public static final IndexConfig DISABLED = new IndexConfig(false);
   private final boolean _enabled;
 
+  /**
+   * This is used as the default constructor for subclasses. The attribute {@link #_enabled} will be initialized to
+   * {@code enabled == null || enabled}, so it will be false if and only if {@code Boolean.FALSE.equals(enabled)}.
+   */
   @JsonCreator
+  public IndexConfig(@JsonProperty("enabled") Boolean enabled) {
+    this(enabled == null || enabled);
+  }
+
   public IndexConfig(@JsonProperty("enabled") boolean enabled) {

Review Comment:
   Do we need this constructor? We can directly set the value it in the previous one right?



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org