Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JinheLin committed Dec 27, 2024
1 parent b88095a commit 1a7da3f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dbms/src/Flash/tests/bench_aggregation_hash_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ try
LOG_DEBUG(log, "build_side_watch: {}, hashmap size: {}", build_side_watch.elapsed(), data_variants->size());

std::vector<AggregatedDataVariantsPtr> variants{data_variants};
auto merging_buckets = aggregator->mergeAndConvertToBlocks(variants, /*final=*/true, /*max_thread=*/1);
auto merging_buckets = aggregator->mergeAndConvertToBlocks(variants, /*final=*/true, /*max_threads=*/1);
std::vector<Block> res_block;

Stopwatch probe_side_watch;
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Interpreters/ExpressionAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ void ExpressionAnalyzer::optimizeGroupBy()
}

select_query->group_expression_list = std::make_shared<ASTExpressionList>();
select_query->group_expression_list->children.emplace_back(std::make_shared<ASTLiteral>(UInt64(unused_column)));
select_query->group_expression_list->children.emplace_back(std::make_shared<ASTLiteral>(unused_column));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class RegionBlockReaderBenchTest : public benchmark::Fixture
WriteBufferFromOwnString pk_buf;
if (table_info.is_common_handle)
{
auto & primary_index_info = table_info.getPrimaryIndexInfo();
const auto & primary_index_info = table_info.getPrimaryIndexInfo();
for (size_t i = 0; i < primary_index_info.idx_cols.size(); i++)
{
auto idx = column_name_columns_index_map[primary_index_info.idx_cols[i].name];
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Storages/KVStore/tests/gtest_spill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class KVStoreSpillTest : public KVStoreTestBase

protected:
StorageDeltaMergePtr storage;
TableID table_id;
TableID table_id{0};
};

TEST_F(KVStoreSpillTest, CreateBlock)
Expand Down
3 changes: 1 addition & 2 deletions dbms/src/Storages/S3/tests/gtest_filecache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ class FileCacheTest : public ::testing::Test
void waitForBgDownload(const FileCache & file_cache)
{
Stopwatch sw;
UInt64 downloading = 0;
while ((downloading = file_cache.bg_downloading_count.load(std::memory_order_relaxed)) > 0)
while (file_cache.bg_downloading_count.load(std::memory_order_relaxed) > 0)
{
std::this_thread::sleep_for(1000ms);
}
Expand Down
13 changes: 7 additions & 6 deletions dbms/src/TiDB/tests/gtest_row_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,15 @@ TEST(RowV2Suite, FloatValue)
ASSERT_FLOAT_VALUE(std::numeric_limits<Float64>::max());
}

#define ASSERT_STRING_VALUE_LENGTH(b, s) ASSERT_EQ(getValueLengthByRowV2<b>(s), std::make_tuple(s, s.length()))

TEST(RowV2Suite, StringValueLength)
{
ASSERT_STRING_VALUE_LENGTH(false, String(""));
ASSERT_STRING_VALUE_LENGTH(false, String("aaa"));
ASSERT_STRING_VALUE_LENGTH(false, String(std::numeric_limits<UInt16>::max(), 'a'));
ASSERT_STRING_VALUE_LENGTH(true, String(std::numeric_limits<UInt16>::max() + 1, 'a'));
auto assert_string_value_length = [](bool b, String s) {
ASSERT_EQ(getValueLengthByRowV2<b>(s), std::make_tuple(s, s.length()));
};
assert_string_value_length(false, String(""));
assert_string_value_length(false, String("aaa"));
assert_string_value_length(false, String(std::numeric_limits<UInt16>::max(), 'a'));
assert_string_value_length(true, String(std::numeric_limits<UInt16>::max() + 1, 'a'));
}

#define ASSERT_DECIMAL_VALUE(d) ASSERT_EQ(std::get<0>(getValueLengthByRowV2<false>(d)), d)
Expand Down

0 comments on commit 1a7da3f

Please sign in to comment.