Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hongyunyan committed Nov 28, 2022
1 parent 58045f0 commit 6d2ee5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion dbms/src/Common/TiFlashException.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ namespace DB
"");) \
C(Types, E(Truncated, "Data is truncated during conversion.", "", ""); E(WrongValue, "Input value is in wrong format", "", "");) \
C(Expression, E(DivisionByZero, "Division by 0.", "", "");) \
C(Storage, E(CastError, "Storage cast error.", "", "");) \
C(Checksum, \
E(Missing, "Checksum info for disk I/O checksum was expected but not found.", \
"This may be caused by a failure during data file format upgrade or file lost; \n" \
Expand Down
10 changes: 4 additions & 6 deletions dbms/src/Flash/Coprocessor/DAGStorageInterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,13 +783,11 @@ void DAGStorageInterpreter::buildLocalStreamsForPhysicalTable(
QueryProcessingStage::Enum from_stage = QueryProcessingStage::FetchColumns;
const auto & scan_context = dag_context.scan_context_map.at(table_scan.getTableScanExecutorID());

// We need read with scan_context here, while IStorage::read() can't support it.
// Thus, we need first to cast to StorageDeltaMerge to call the corresponding read() function.
// We want to collect performance metrics in storage level, thus we need read with scan_context here.
// while IStorage::read() can't support it, and only StorageDeltaMerge support to read with scan_context to collect the information.
// Thus, storage must cast to StorageDeltaMergePtr here to call the corresponding read() function.
StorageDeltaMergePtr delta_merge_storage = std::dynamic_pointer_cast<StorageDeltaMerge>(storage);
if (delta_merge_storage == nullptr)
{
throw TiFlashException(fmt::format("delta_merge_storage which cast from storage is null"), Errors::Storage::CastError);
}
RUNTIME_CHECK_MSG(delta_merge_storage != nullptr, "delta_merge_storage which cast from storage is null");
pipeline.streams = delta_merge_storage->read(required_columns, query_info, context, from_stage, max_block_size, max_streams, scan_context);

injectFailPointForLocalRead(query_info);
Expand Down

0 comments on commit 6d2ee5a

Please sign in to comment.