Skip to content

Commit

Permalink
Use RowTypePtr in QueryAssertions.* (facebookincubator#7607)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: facebookincubator#7607

Reviewed By: xiaoxmeng

Differential Revision: D51400887

Pulled By: mbasmanova

fbshipit-source-id: 9eeb78b3f0f9737d8d4127eb0904ed231fd2e1bb
  • Loading branch information
mbasmanova authored and facebook-github-bot committed Nov 16, 2023
1 parent da81fdd commit cc967f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions velox/exec/tests/utils/QueryAssertions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ velox::variant arrayVariantAt(

std::vector<MaterializedRow> materialize(
::duckdb::DataChunk* dataChunk,
const std::shared_ptr<const RowType>& rowType) {
const RowTypePtr& rowType) {
VELOX_CHECK_EQ(
rowType->size(), dataChunk->GetTypes().size(), "Wrong number of columns");

Expand Down Expand Up @@ -880,7 +880,7 @@ DuckDBQueryResult DuckDbQueryRunner::execute(const std::string& sql) {

void DuckDbQueryRunner::execute(
const std::string& sql,
const std::shared_ptr<const RowType>& resultRowType,
const RowTypePtr& resultRowType,
std::function<void(std::vector<MaterializedRow>&)> resultCallback) {
auto duckDbResult = execute(sql);

Expand Down Expand Up @@ -1091,7 +1091,7 @@ bool assertEqualResults(

void assertResults(
const std::vector<RowVectorPtr>& results,
const std::shared_ptr<const RowType>& resultType,
const RowTypePtr& resultType,
const std::string& duckDbSql,
DuckDbQueryRunner& duckDbQueryRunner) {
MaterializedRowMultiset actualRows;
Expand Down Expand Up @@ -1179,7 +1179,7 @@ static bool compareOrderedPartitionsVectors(

void assertResultsOrdered(
const std::vector<RowVectorPtr>& results,
const std::shared_ptr<const RowType>& resultType,
const RowTypePtr& resultType,
const std::string& duckDbSql,
DuckDbQueryRunner& duckDbQueryRunner,
const std::vector<uint32_t>& sortingKeys) {
Expand Down
10 changes: 5 additions & 5 deletions velox/exec/tests/utils/QueryAssertions.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class DuckDbQueryRunner {

MaterializedRowMultiset execute(
const std::string& sql,
const std::shared_ptr<const RowType>& resultRowType) {
const RowTypePtr& resultRowType) {
MaterializedRowMultiset allRows;
execute(
sql,
Expand All @@ -60,7 +60,7 @@ class DuckDbQueryRunner {

std::vector<MaterializedRow> executeOrdered(
const std::string& sql,
const std::shared_ptr<const RowType>& resultRowType) {
const RowTypePtr& resultRowType) {
std::vector<MaterializedRow> allRows;
execute(
sql,
Expand All @@ -76,7 +76,7 @@ class DuckDbQueryRunner {

void execute(
const std::string& sql,
const std::shared_ptr<const RowType>& resultRowType,
const RowTypePtr& resultRowType,
std::function<void(std::vector<MaterializedRow>&)> resultCallback);
};

Expand Down Expand Up @@ -154,13 +154,13 @@ void assertEmptyResults(const std::vector<RowVectorPtr>& results);

void assertResults(
const std::vector<RowVectorPtr>& results,
const std::shared_ptr<const RowType>& resultType,
const RowTypePtr& resultType,
const std::string& duckDbSql,
DuckDbQueryRunner& duckDbQueryRunner);

void assertResultsOrdered(
const std::vector<RowVectorPtr>& results,
const std::shared_ptr<const RowType>& resultType,
const RowTypePtr& resultType,
const std::string& duckDbSql,
DuckDbQueryRunner& duckDbQueryRunner,
const std::vector<uint32_t>& sortingKeys);
Expand Down

0 comments on commit cc967f4

Please sign in to comment.