Skip to content

Commit

Permalink
Add query stage to verifier client info
Browse files Browse the repository at this point in the history
  • Loading branch information
aweisberg authored and highker committed Apr 9, 2022
1 parent e9ece3b commit 23b1e85
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ public class ClientInfo
private final Optional<String> testName;
private final String sourceQueryName;
private final String suite;
private final String queryStage;

public ClientInfo(String testId, Optional<String> testName, String sourceQueryName, String suite)
public ClientInfo(String testId, Optional<String> testName, String sourceQueryName, String suite, String queryStage)
{
this.testId = requireNonNull(testId, "testId is null");
this.testName = requireNonNull(testName, "testName is null");
this.sourceQueryName = requireNonNull(sourceQueryName, "sourceQueryName is null");
this.suite = requireNonNull(suite, "suite is null");
this.queryStage = requireNonNull(queryStage, "queryStage is null");
}

@JsonProperty
Expand Down Expand Up @@ -69,6 +71,12 @@ public String getSuite()
return suite;
}

@JsonProperty
public String getQueryStage()
{
return queryStage;
}

public String serialize()
{
return CLIENT_INFO_JSON_CODEC.toJson(this).replaceAll("\\n", "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ private <T> T executeOnce(Statement statement, QueryStage queryStage, StatementE
testId,
testName,
verificationContext.getSourceQueryName(),
verificationContext.getSuite()).serialize();
verificationContext.getSuite(),
queryStage.name()).serialize();

try (PrestoConnection connection = getConnection(queryStage, clientInfo)) {
try (java.sql.Statement jdbcStatement = connection.createStatement()) {
Expand Down

0 comments on commit 23b1e85

Please sign in to comment.