Skip to content

Commit 0c86fe9

Browse files
style: auto-fix clang-format issues
1 parent 01e44b4 commit 0c86fe9

9 files changed

Lines changed: 31 additions & 40 deletions

File tree

be/src/connector/deletion_vector/deletion_vector.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ struct DeletionVectorBuildStats {
2727
class DeletionVector {
2828
public:
2929
DeletionVector(const HdfsScannerContext& ctx)
30-
: _deletion_vector_descriptor(ctx.table_specific.deletion_vector_descriptor),
31-
_ctx(ctx) {}
30+
: _deletion_vector_descriptor(ctx.table_specific.deletion_vector_descriptor), _ctx(ctx) {}
3231

3332
Status fill_row_indexes(const SkipRowsContextPtr& skip_rows_ctx);
3433
Status deserialized_inline_dv(std::string& encoded_bitmap_data, const SkipRowsContextPtr& skip_rows_ctx);

be/src/connector/hive_connector.cpp

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ Status HiveDataSource::open(RuntimeState* state) {
152152
if (enable_cache_select) {
153153
// set datacache options for cache select
154154
_scanner_ctx.datacache_options = DataCacheOptions{.enable_datacache = true,
155-
.enable_cache_select = true,
156-
.enable_populate_datacache = true,
157-
.enable_datacache_async_populate_mode = false,
158-
.enable_datacache_io_adaptor = false,
159-
.modification_time = _scan_range.modification_time,
160-
.datacache_evict_probability = 100,
161-
.datacache_priority = datacache_priority,
162-
.datacache_ttl_seconds = datacache_ttl_seconds};
155+
.enable_cache_select = true,
156+
.enable_populate_datacache = true,
157+
.enable_datacache_async_populate_mode = false,
158+
.enable_datacache_io_adaptor = false,
159+
.modification_time = _scan_range.modification_time,
160+
.datacache_evict_probability = 100,
161+
.datacache_priority = datacache_priority,
162+
.datacache_ttl_seconds = datacache_ttl_seconds};
163163
} else if (state->query_options().__isset.enable_scan_datacache &&
164164
state->query_options().enable_scan_datacache) {
165165
// set datacache options for normal query
@@ -220,8 +220,7 @@ Status HiveDataSource::open(RuntimeState* state) {
220220
#endif
221221

222222
if (state->query_options().__isset.enable_dynamic_prune_scan_range) {
223-
_scanner_ctx.options.enable_dynamic_prune_scan_range =
224-
state->query_options().enable_dynamic_prune_scan_range;
223+
_scanner_ctx.options.enable_dynamic_prune_scan_range = state->query_options().enable_dynamic_prune_scan_range;
225224
}
226225
if (state->query_options().__isset.enable_connector_split_io_tasks) {
227226
_scanner_ctx.options.enable_split_tasks = state->query_options().enable_connector_split_io_tasks;
@@ -644,8 +643,7 @@ void HiveDataSource::_init_counter(RuntimeState* state) {
644643
ADD_CHILD_COUNTER(_runtime_profile, "DataCacheWriteCounter", TUnit::UNIT, prefix);
645644
_scanner_ctx.profile.datacache_write_bytes =
646645
ADD_CHILD_COUNTER(_runtime_profile, "DataCacheWriteBytes", TUnit::BYTES, prefix);
647-
_scanner_ctx.profile.datacache_write_timer =
648-
ADD_CHILD_TIMER(_runtime_profile, "DataCacheWriteTimer", prefix);
646+
_scanner_ctx.profile.datacache_write_timer = ADD_CHILD_TIMER(_runtime_profile, "DataCacheWriteTimer", prefix);
649647
_scanner_ctx.profile.datacache_write_fail_counter =
650648
ADD_CHILD_COUNTER(_runtime_profile, "DataCacheWriteFailCounter", TUnit::UNIT, prefix);
651649
_scanner_ctx.profile.datacache_write_fail_bytes =
@@ -666,8 +664,7 @@ void HiveDataSource::_init_counter(RuntimeState* state) {
666664
_scanner_ctx.profile.app_io_bytes_read_counter =
667665
ADD_CHILD_COUNTER(_runtime_profile, "AppIOBytesRead", TUnit::BYTES, prefix);
668666
_scanner_ctx.profile.app_io_timer = ADD_CHILD_TIMER(_runtime_profile, "AppIOTime", prefix);
669-
_scanner_ctx.profile.app_io_counter =
670-
ADD_CHILD_COUNTER(_runtime_profile, "AppIOCounter", TUnit::UNIT, prefix);
667+
_scanner_ctx.profile.app_io_counter = ADD_CHILD_COUNTER(_runtime_profile, "AppIOCounter", TUnit::UNIT, prefix);
671668
_scanner_ctx.profile.fs_bytes_read_counter =
672669
ADD_CHILD_COUNTER(_runtime_profile, "FSIOBytesRead", TUnit::BYTES, prefix);
673670
_scanner_ctx.profile.fs_io_counter = ADD_CHILD_COUNTER(_runtime_profile, "FSIOCounter", TUnit::UNIT, prefix);

be/src/exec/hdfs_scanner/cache_select_scanner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ Status CacheSelectScanner::_fetch_orc() {
9595
// resolve columns
9696
{
9797
std::unordered_set<std::string> known_column_names;
98-
OrcChunkReader::build_column_name_set(&known_column_names, _scanner_ctx.hive_column_names,
99-
reader->getType(), _scanner_ctx.options.case_sensitive,
98+
OrcChunkReader::build_column_name_set(&known_column_names, _scanner_ctx.hive_column_names, reader->getType(),
99+
_scanner_ctx.options.case_sensitive,
100100
_scanner_ctx.options.orc_use_column_names);
101101
RETURN_IF_ERROR(_scanner_ctx.update_materialized_columns(known_column_names));
102102
ASSIGN_OR_RETURN(auto skip, _scanner_ctx.should_skip_by_evaluating_not_existed_slots());

be/src/exec/hdfs_scanner/hdfs_scanner.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ Status HdfsScanner::_build_scanner_context() {
137137
// ObjectPool, made available via ctx.partition_expr_ctxs.
138138
for (size_t i = 0; i < _scanner_ctx.partition_slots.size(); i++) {
139139
int part_col_idx = _scanner_ctx._partition_index_in_hdfs_partition_columns[i];
140-
ASSIGN_OR_RETURN(auto partition_value_column,
141-
ctx.partition_expr_ctxs[part_col_idx]->evaluate(nullptr));
140+
ASSIGN_OR_RETURN(auto partition_value_column, ctx.partition_expr_ctxs[part_col_idx]->evaluate(nullptr));
142141
DCHECK(partition_value_column->is_constant());
143142
partition_values.emplace_back(std::move(partition_value_column));
144143
}
@@ -147,8 +146,7 @@ Status HdfsScanner::_build_scanner_context() {
147146
Columns& extended_values = ctx.extended_values;
148147
for (size_t i = 0; i < _scanner_ctx.extended_col_slots.size(); i++) {
149148
int extended_col_idx = _scanner_ctx.index_in_extended_columns[i];
150-
ASSIGN_OR_RETURN(auto extended_value_column,
151-
ctx.extended_col_expr_ctxs[extended_col_idx]->evaluate(nullptr));
149+
ASSIGN_OR_RETURN(auto extended_value_column, ctx.extended_col_expr_ctxs[extended_col_idx]->evaluate(nullptr));
152150
DCHECK(extended_value_column->is_constant());
153151
extended_values.emplace_back(std::move(extended_value_column));
154152
}
@@ -211,8 +209,7 @@ Status HdfsScanner::_build_scanner_context() {
211209
auto* s = ctx.obj_pool->add(new HdfsScannerPredicateState());
212210
s->conjuncts_manager = std::make_unique<ScanConjunctsManager>(opts);
213211
RETURN_IF_ERROR(s->conjuncts_manager->parse_conjuncts());
214-
s->predicate_parser =
215-
std::make_unique<ConnectorPredicateParser>(&_scanner_ctx.tuple_desc->decoded_slots());
212+
s->predicate_parser = std::make_unique<ConnectorPredicateParser>(&_scanner_ctx.tuple_desc->decoded_slots());
216213
ASSIGN_OR_RETURN(s->predicate_tree,
217214
s->conjuncts_manager->get_predicate_tree(s->predicate_parser.get(), s->predicate_free_pool));
218215
s->runtime_filter_scan_range_pruner = std::make_unique<RuntimeScanRangePruner>(

be/src/exec/hdfs_scanner/hdfs_scanner.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
#include "connector/deletion_vector/deletion_bitmap.h"
2626
#include "exec/olap_scan_prepare.h"
2727
#include "exec/pipeline/scan/morsel.h"
28-
#include "storage/column_predicate.h"
29-
#include "storage/predicate_parser.h"
30-
#include "storage/predicate_tree/predicate_tree.h"
3128
#include "exec/pipeline/scan/scan_morsel.h"
3229
#include "exec/runtime_filter/runtime_filter_probe.h"
3330
#include "exprs/expr.h"
3431
#include "exprs/expr_context.h"
3532
#include "fs/fs.h"
3633
#include "runtime/descriptors.h"
3734
#include "runtime/runtime_state_fwd.h"
35+
#include "storage/column_predicate.h"
36+
#include "storage/predicate_parser.h"
37+
#include "storage/predicate_tree/predicate_tree.h"
3838

3939
namespace starrocks {
4040

@@ -458,7 +458,6 @@ struct HdfsScannerContext {
458458
Status evaluate_on_conjunct_ctxs_by_slot(ChunkPtr* chunk, Filter* filter);
459459

460460
void merge_split_tasks();
461-
462461
};
463462

464463
struct OpenFileOptions {

be/src/exec/hdfs_scanner/hdfs_scanner_orc.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ void OrcRowReaderFilter::setWriterTimezone(const std::string& tz) {
8787
OrcRowReaderFilter::OrcRowReaderFilter(const HdfsScannerContext& scanner_ctx, OrcChunkReader* reader)
8888
: _scanner_ctx(scanner_ctx), _reader(reader), _writer_tzoffset_in_seconds(reader->tzoffset_in_seconds()) {
8989
if (_scanner_ctx.min_max_tuple_desc != nullptr) {
90-
VLOG_FILE << "OrcRowReaderFilter: min_max_tuple_desc = "
91-
<< _scanner_ctx.min_max_tuple_desc->debug_string();
90+
VLOG_FILE << "OrcRowReaderFilter: min_max_tuple_desc = " << _scanner_ctx.min_max_tuple_desc->debug_string();
9291
for (ExprContext* ctx : _scanner_ctx.conjuncts.min_max_ctxs) {
9392
VLOG_FILE << "OrcRowReaderFilter: min_max_ctx = " << ctx->root()->debug_string();
9493
}
@@ -402,8 +401,8 @@ Status HdfsOrcScanner::build_io_ranges(ORCHdfsFileStream* file_stream, const std
402401

403402
Status HdfsOrcScanner::resolve_columns(orc::Reader* reader) {
404403
std::unordered_set<std::string> known_column_names;
405-
OrcChunkReader::build_column_name_set(&known_column_names, _scanner_ctx.hive_column_names,
406-
reader->getType(), _scanner_ctx.options.case_sensitive,
404+
OrcChunkReader::build_column_name_set(&known_column_names, _scanner_ctx.hive_column_names, reader->getType(),
405+
_scanner_ctx.options.case_sensitive,
407406
_scanner_ctx.options.orc_use_column_names);
408407
RETURN_IF_ERROR(_scanner_ctx.update_materialized_columns(known_column_names));
409408
ASSIGN_OR_RETURN(auto skip, _scanner_ctx.should_skip_by_evaluating_not_existed_slots());
@@ -448,8 +447,8 @@ Status HdfsOrcScanner::resolve_columns(orc::Reader* reader) {
448447
Status HdfsOrcScanner::build_split_tasks(orc::Reader* reader, const std::vector<DiskRange>& stripes) {
449448
// we can split task if we enable split tasks feature and have >= 2 stripes.
450449
// but if we have splitted tasks before, we don't want to split again, to avoid infinite loop.
451-
bool enable_split_tasks = (_scanner_ctx.options.enable_split_tasks && stripes.size() >= 2) &&
452-
(_scanner_ctx.split_context == nullptr);
450+
bool enable_split_tasks =
451+
(_scanner_ctx.options.enable_split_tasks && stripes.size() >= 2) && (_scanner_ctx.split_context == nullptr);
453452
if (!enable_split_tasks) return Status::OK();
454453

455454
auto footer = std::make_shared<std::string>(reader->getSerializedFileTail());

be/src/exec/hdfs_scanner/hdfs_scanner_parquet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ Status HdfsParquetScanner::do_open(RuntimeState* runtime_state) {
258258
RETURN_IF_ERROR(open_random_access_file());
259259
// create file reader
260260
_reader = std::make_shared<parquet::FileReader>(runtime_state->chunk_size(), _file.get(), _file->get_size().value(),
261-
_scanner_ctx.datacache_options,
262-
_shared_buffered_input_stream.get(), _skip_rows_ctx);
261+
_scanner_ctx.datacache_options, _shared_buffered_input_stream.get(),
262+
_skip_rows_ctx);
263263
SCOPED_RAW_TIMER(&_app_stats.reader_init_ns);
264264
RETURN_IF_ERROR(_reader->init(&_scanner_ctx));
265265
return Status::OK();

be/src/formats/parquet/group_reader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,8 +515,8 @@ StatusOr<ColumnReaderPtr> GroupReader::_create_column_reader(const GroupReaderPa
515515
schema_node->type == ColumnType::STRUCT) {
516516
// Physical VARIANT columns use _get_variant_shredded_hints; this path
517517
// is for non-virtual VARIANT columns that appear directly in the SELECT list.
518-
VariantShreddedReadHints hints = build_variant_shredded_hints(
519-
_param.scanner_ctx->column_access_paths, column.slot_desc->col_name());
518+
VariantShreddedReadHints hints =
519+
build_variant_shredded_hints(_param.scanner_ctx->column_access_paths, column.slot_desc->col_name());
520520
ASSIGN_OR_RETURN(column_reader, ColumnReaderFactory::create_variant_column_reader(_column_reader_opts,
521521
schema_node, hints));
522522
} else if (column.t_lake_schema_field == nullptr) {

be/test/exec/hdfs_scanner/hdfs_scanner_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ THdfsScanRange* HdfsScannerTest::_create_scan_range(const std::string& file, uin
119119
}
120120

121121
HdfsScannerContext* HdfsScannerTest::_create_param(const std::string& file, THdfsScanRange* range,
122-
TupleDescriptor* tuple_desc) {
122+
TupleDescriptor* tuple_desc) {
123123
auto* param = _pool.add(new HdfsScannerContext());
124124
auto* lazy_column_coalesce_counter = _pool.add(new std::atomic<int32_t>(0));
125125
param->fs = FileSystem::Default();
@@ -485,7 +485,7 @@ static ExprContext* create_expr_context(ObjectPool* pool, const std::vector<TExp
485485
}
486486

487487
static void extend_partition_values(ObjectPool* pool, HdfsScannerContext* params, std::vector<ExprContext*>* part_ctxs,
488-
const std::vector<int64_t>& values) {
488+
const std::vector<int64_t>& values) {
489489
std::vector<int> positions;
490490
for (int i = 0; i < values.size(); i++) {
491491
int64_t v = values[i];

0 commit comments

Comments
 (0)