Skip to content

Commit

Permalink
Add missing @Nullable annotations to SqlQuery (#17398)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekrb19 authored Oct 23, 2024
1 parent 60dadde commit 43b325b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sql/src/main/java/org/apache/druid/sql/http/SqlQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
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;
Expand Down Expand Up @@ -57,12 +58,12 @@ public static List<TypedValue> getParameterList(List<SqlParameter> parameters)
@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");
Expand Down

0 comments on commit 43b325b

Please sign in to comment.