提交 ab446dc2 编写于 作者: P Po-Chuan Hsieh 提交者: Facebook Github Bot

Fix build with USE_RTTI=0

Summary:
utilities/column_aware_encoding_util.cc:61:23: error: cannot use dynamic_cast with -fno-rtti
  table_reader_.reset(dynamic_cast<BlockBasedTable*>(table_reader.release()));
                      ^
1 error generated.

It was added as a [local patch](https://svnweb.freebsd.org/ports/head/databases/rocksdb/files/patch-utilities-column_aware_encoding_util.cc) on FreeBSD since RocksDB 5.8.
It also fixes #2707.
Closes https://github.com/facebook/rocksdb/pull/3514

Differential Revision: D7005571

Pulled By: siying

fbshipit-source-id: 351a9055d21d0accdd7a932e8e7bfcd3c8e22068
上级 c178da05
......@@ -25,6 +25,7 @@
#include "table/block_based_table_factory.h"
#include "table/format.h"
#include "table/table_reader.h"
#include "util/cast_util.h"
#include "util/coding.h"
#include "utilities/col_buf_decoder.h"
#include "utilities/col_buf_encoder.h"
......@@ -58,7 +59,7 @@ void ColumnAwareEncodingReader::InitTableReader(const std::string& file_path) {
/*skip_filters=*/false),
std::move(file_), file_size, &table_reader, /*enable_prefetch=*/false);
table_reader_.reset(dynamic_cast<BlockBasedTable*>(table_reader.release()));
table_reader_.reset(static_cast_with_check<BlockBasedTable, TableReader>(table_reader.release()));
}
void ColumnAwareEncodingReader::GetKVPairsFromDataBlocks(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册