Skip to content

Commit

Permalink
remove useless codes
Browse files Browse the repository at this point in the history
  • Loading branch information
taiyang-li committed Nov 29, 2023
1 parent 9caaebb commit 362677c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cpp-ch/local-engine/Parser/SerializedPlanParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,8 @@ QueryPlanPtr SerializedPlanParser::parse(std::unique_ptr<substrait::Plan> plan)
pb_util::JsonOptions options;
std::string json;
auto s = pb_util::MessageToJsonString(*plan, &json, options);
// if (!s.ok())
// throw Exception(ErrorCodes::LOGICAL_ERROR, "Can not convert Substrait Plan to Json");
if (!s.ok())
throw Exception(ErrorCodes::LOGICAL_ERROR, "Can not convert Substrait Plan to Json");
LOG_DEBUG(&Poco::Logger::get("SerializedPlanParser"), "substrait plan:\n{}", json);
}
parseExtensions(plan->extensions());
Expand Down
1 change: 0 additions & 1 deletion cpp-ch/local-engine/Shuffle/CachedShuffleWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class CachedShuffleWriter : public ShuffleWriterBase
void initOutputIfNeeded(DB::Block & block);

bool stopped = false;
// PartitionInfo partition_info;
DB::Block output_header;
SplitOptions options;
SplitResult split_result;
Expand Down
1 change: 0 additions & 1 deletion cpp-ch/local-engine/Shuffle/PartitionWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ PartitionWriter::PartitionWriter(CachedShuffleWriter * shuffle_writer_)
, partition_block_buffer(options->partition_num)
, partition_buffer(options->partition_num)
{
// std::cout << "throw_if_memory_exceed: " << options->throw_if_memory_exceed << std::endl;
for (size_t partition_i = 0; partition_i < options->partition_num; ++partition_i)
{
partition_block_buffer[partition_i] = std::make_shared<ColumnsBuffer>(options->split_size);
Expand Down
3 changes: 1 addition & 2 deletions cpp-ch/local-engine/Shuffle/PartitionWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class PartitionWriter : boost::noncopyable

size_t total_partition_buffer_size = 0;

std::atomic<bool> evicting_or_writing{false};
bool evicting_or_writing{false};
};

class LocalPartitionWriter : public PartitionWriter
Expand Down Expand Up @@ -109,7 +109,6 @@ class CelebornPartitionWriter : public PartitionWriter
size_t unsafeEvictPartitions(bool for_memory_spill) override;
void unsafeStop() override;

std::atomic<bool> evicting_or_writing = 0;
std::unique_ptr<CelebornClient> celeborn_client;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ class S3FileReadBufferBuilder : public ReadBufferBuilder
/* restricted_seek */ true);
};

DB::StoredObjects stored_objects{DB::StoredObject{key, "", object_size}};
DB::StoredObjects stored_objects{DB::StoredObject{key, object_size}};
auto s3_impl = std::make_unique<DB::ReadBufferFromRemoteFSGather>(
std::move(read_buffer_creator), stored_objects, new_settings, /* cache_log */ nullptr, /* use_external_buffer */ true);

Expand Down

0 comments on commit 362677c

Please sign in to comment.