gortiz commented on code in PR #10584:
URL: https://github.com/apache/pinot/pull/10584#discussion_r1161801712
##########
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:
I usually try to keep older constructors to do not break binary backward
compatibility, but I don't think anyone had time to add code that relay on this
constructor. Another reason to keep it here may be to skip boxing/unboxing, but
this shouldn't be in the hotpath.
So I'm going to remove it.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]