Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.junit.jupiter.api.extension.RegisterExtension;

import java.sql.SQLException;
import java.util.Base64;

/**
* Some basic count query tests. These are not too dissimilar from queries that are in some of the YAML tests,
Expand Down Expand Up @@ -114,4 +115,26 @@ void countNotNullAByB() throws SQLException {
.continuationReasonIs(Continuation.Reason.CURSOR_AFTER_LAST);
}
}

@Test
void countWithoutAliasNamePreservedAfterContinuation() throws SQLException {
statement.setMaxRows(1);
Continuation continuation;
try (RelationalResultSet resultSet = statement.executeQuery("SELECT b, count(a) FROM t1 GROUP BY b")) {
ResultSetAssert.assertThat(resultSet)
.hasNextRow()
.hasColumn("_1", 1L)
.hasNoNextRow()
.continuationReasonIs(Continuation.Reason.QUERY_EXECUTION_LIMIT_REACHED);
continuation = resultSet.getContinuation();
}
statement.setMaxRows(1);
try (RelationalResultSet resultSet = statement.executeQuery("EXECUTE CONTINUATION B64'" + Base64.getEncoder().encodeToString(continuation.serialize()) + "'")) {
ResultSetAssert.assertThat(resultSet)
.hasNextRow()
.hasColumn("_1", 1L)
.hasNoNextRow()
.continuationReasonIs(Continuation.Reason.QUERY_EXECUTION_LIMIT_REACHED);
}
}
}
Loading