Add missing @Nullable annotations to SqlQuery (#17398)

This commit is contained in:
Abhishek Radhakrishnan 2024-10-22 20:34:46 -07:00 committed by GitHub
parent 60daddedf8
commit 43b325b6aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,6 +29,7 @@ import org.apache.calcite.avatica.remote.TypedValue;
import org.apache.druid.java.util.common.ISE;
import org.apache.druid.query.QueryContext;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@ -57,12 +58,12 @@ public class SqlQuery
@JsonCreator
public SqlQuery(
@JsonProperty("query") final String query,
@JsonProperty("resultFormat") final ResultFormat resultFormat,
@JsonProperty("resultFormat") @Nullable final ResultFormat resultFormat,
@JsonProperty("header") final boolean header,
@JsonProperty("typesHeader") final boolean typesHeader,
@JsonProperty("sqlTypesHeader") final boolean sqlTypesHeader,
@JsonProperty("context") final Map<String, Object> context,
@JsonProperty("parameters") final List<SqlParameter> parameters
@JsonProperty("context") @Nullable final Map<String, Object> context,
@JsonProperty("parameters") @Nullable final List<SqlParameter> parameters
)
{
this.query = Preconditions.checkNotNull(query, "query");