Skip to content

Commit d45c64f

Browse files
oneonestarebyhr
authored andcommitted
Remove non-null restriction for QueryHistory
1 parent a5390e6 commit d45c64f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

gateway-ha/src/main/java/io/trino/gateway/ha/persistence/dao/QueryHistory.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*/
1414
package io.trino.gateway.ha.persistence.dao;
1515

16+
import jakarta.annotation.Nullable;
1617
import org.jdbi.v3.core.mapper.reflect.ColumnName;
1718

1819
import static java.util.Objects.requireNonNull;
@@ -21,16 +22,14 @@ public record QueryHistory(
2122
@ColumnName("query_id") String queryId,
2223
@ColumnName("query_text") String queryText,
2324
@ColumnName("backend_url") String backendUrl,
24-
@ColumnName("user_name") String userName,
25-
@ColumnName("source") String source,
25+
@ColumnName("user_name") @Nullable String userName,
26+
@ColumnName("source") @Nullable String source,
2627
@ColumnName("created") long created)
2728
{
2829
public QueryHistory
2930
{
3031
requireNonNull(queryId, "queryId is null");
3132
requireNonNull(queryText, "queryText is null");
3233
requireNonNull(backendUrl, "backendUrl is null");
33-
requireNonNull(userName, "userName is null");
34-
requireNonNull(source, "source is null");
3534
}
3635
}

0 commit comments

Comments
 (0)