[chore](fix) Fix some spell errors in be's comments. #13452
This commit is contained in:
@ -176,7 +176,7 @@ Status CgroupsMgr::_config_disk_throttle(std::string user_name, std::string leve
|
||||
|
||||
// add olap engine data path here
|
||||
auto stores = StorageEngine::instance()->get_stores();
|
||||
// buld load data path, it is alreay in data path
|
||||
// buld load data path, it is already in data path
|
||||
// _exec_env->load_path_mgr()->get_load_data_path(&data_paths);
|
||||
|
||||
std::stringstream ctrl_cmd;
|
||||
|
||||
@ -100,7 +100,7 @@ public:
|
||||
|
||||
// set the disk throttle for the user by getting resource value from the map and echo it to the cgroups.
|
||||
// currently, both the user and groups under the user are set to the same value
|
||||
// because throttle does not support hierachy.
|
||||
// because throttle does not support hierarchy.
|
||||
// Input parameters:
|
||||
// user_name: name for the user
|
||||
// resource_share: resource value get from fe
|
||||
|
||||
@ -432,7 +432,7 @@ Status BrokerScanner::_line_split_to_values(const Slice& line) {
|
||||
read_by_column_def = range.read_by_column_def;
|
||||
}
|
||||
const std::vector<std::string>& columns_from_path = range.columns_from_path;
|
||||
// read data by column defination, resize _split_values to _src_solt_size
|
||||
// read data by column definition, resize _split_values to _src_solt_size
|
||||
if (read_by_column_def) {
|
||||
// fill slots by NULL
|
||||
while (_split_values.size() + columns_from_path.size() < _src_slot_descs.size()) {
|
||||
|
||||
@ -329,7 +329,7 @@ void JsonReader::_close() {
|
||||
|
||||
// read one json string from line reader or file reader and parse it to json doc.
|
||||
// return Status::DataQualityError() if data has quality error.
|
||||
// return other error if encounter other problemes.
|
||||
// return other error if encounter other problems.
|
||||
// return Status::OK() if parse succeed or reach EOF.
|
||||
Status JsonReader::_parse_json_doc(size_t* size, bool* eof) {
|
||||
// read a whole message
|
||||
|
||||
@ -156,7 +156,7 @@ public:
|
||||
void evaluate_or(vectorized::MutableColumns& block, uint16_t* sel, uint16_t selected_size,
|
||||
bool* flags) const override;
|
||||
|
||||
// note(wb) we didnt't impelment evaluate_vec method here, because storage layer only support AND predicate now;
|
||||
// note(wb) we didnt't implement evaluate_vec method here, because storage layer only support AND predicate now;
|
||||
};
|
||||
|
||||
class AndBlockColumnPredicate : public MutilColumnBlockPredicate {
|
||||
|
||||
@ -105,7 +105,7 @@ public:
|
||||
|
||||
virtual bool can_do_bloom_filter() const { return false; }
|
||||
|
||||
// used to evaluate pre read column in lazy matertialization
|
||||
// used to evaluate pre read column in lazy materialization
|
||||
// now only support integer/float
|
||||
// a vectorized eval way
|
||||
virtual void evaluate_vec(const vectorized::IColumn& column, uint16_t size, bool* flags) const {
|
||||
|
||||
@ -337,7 +337,7 @@ Status MergeIterator::next_batch(RowBlockV2* block) {
|
||||
// UnionIterator will read data from input iterator one by one.
|
||||
class UnionIterator : public RowwiseIterator {
|
||||
public:
|
||||
// Iterators' ownership it transfered to this class.
|
||||
// Iterators' ownership it transferred to this class.
|
||||
// This class will delete all iterators when destructs
|
||||
// Client should not use iterators any more.
|
||||
UnionIterator(std::vector<RowwiseIterator*>& v) : _origin_iters(v.begin(), v.end()) {}
|
||||
|
||||
@ -142,7 +142,7 @@ MemTable::~MemTable() {
|
||||
if (_vec_skip_list != nullptr && keys_type() != KeysType::DUP_KEYS) {
|
||||
VecTable::Iterator it(_vec_skip_list.get());
|
||||
for (it.SeekToFirst(); it.Valid(); it.Next()) {
|
||||
// We should release agg_places here, because they are not relesed when a
|
||||
// We should release agg_places here, because they are not released when a
|
||||
// load is canceled.
|
||||
for (size_t i = _schema->num_key_columns(); i < _schema->num_columns(); ++i) {
|
||||
auto function = _agg_functions[i];
|
||||
|
||||
@ -192,7 +192,7 @@ private:
|
||||
int64_t _flush_size = 0;
|
||||
// Number of rows inserted to this memtable.
|
||||
// This is not the rows in this memtable, because rows may be merged
|
||||
// in unique or aggragate key model.
|
||||
// in unique or aggregate key model.
|
||||
int64_t _rows = 0;
|
||||
void (MemTable::*_insert_fn)(const Tuple* tuple) = nullptr;
|
||||
void (MemTable::*_aggregate_two_row_fn)(const ContiguousRow& new_row,
|
||||
|
||||
@ -60,7 +60,7 @@ public:
|
||||
|
||||
Status submit(std::unique_ptr<MemTable> mem_table);
|
||||
|
||||
// error has happpens, so we cancel this token
|
||||
// error has happens, so we cancel this token
|
||||
// And remove all tasks in the queue.
|
||||
void cancel();
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@ struct BloomFilterTraits<int128_t> {
|
||||
// high cardinality key columns and none-agg value columns for high selectivity and storage
|
||||
// efficiency.
|
||||
// This builder builds a bloom filter page by every data page, with a page id index.
|
||||
// Meanswhile, It adds an ordinal index to load bloom filter index according to requirement.
|
||||
// Meanwhile, It adds an ordinal index to load bloom filter index according to requirement.
|
||||
//
|
||||
template <FieldType field_type>
|
||||
class BloomFilterIndexWriterImpl : public BloomFilterIndexWriter {
|
||||
|
||||
@ -707,10 +707,10 @@ Status SegmentIterator::next_batch(RowBlockV2* block) {
|
||||
* If a type can be read fast, we can try to eliminate Lazy Materialization, because we think for this type, seek cost > read cost.
|
||||
* This is an estimate, if we want more precise cost, statistics collection is necessary(this is a todo).
|
||||
* In short, when returned non-pred columns contains string/hll/bitmap, we using Lazy Materialization.
|
||||
* Otherwish, we disable it.
|
||||
* Otherwise, we disable it.
|
||||
*
|
||||
* When Lazy Materialization enable, we need to read column at least two times.
|
||||
* Firt time to read Pred col, second time to read non-pred.
|
||||
* First time to read Pred col, second time to read non-pred.
|
||||
* Here's an interesting question to research, whether read Pred col once is the best plan.
|
||||
* (why not read Pred col twice or more?)
|
||||
*
|
||||
@ -720,7 +720,7 @@ Status SegmentIterator::next_batch(RowBlockV2* block) {
|
||||
* 2 Whether the predicate type can be evaluate in a fast way(using SIMD to eval pred)
|
||||
* Such as integer type and float type, they can be eval fast.
|
||||
* But for BloomFilter/string/date, they eval slow.
|
||||
* If a type can be eval fast, we use vectorizaion to eval it.
|
||||
* If a type can be eval fast, we use vectorization to eval it.
|
||||
* Otherwise, we use short-circuit to eval it.
|
||||
*
|
||||
*
|
||||
|
||||
@ -91,7 +91,7 @@ private:
|
||||
void _init_lazy_materialization();
|
||||
void _vec_init_lazy_materialization();
|
||||
// TODO: Fix Me
|
||||
// CHAR type in storge layer padding the 0 in length. But query engine need ignore the padding 0.
|
||||
// CHAR type in storage layer padding the 0 in length. But query engine need ignore the padding 0.
|
||||
// so segment iterator need to shrink char column before output it. only use in vec query engine.
|
||||
void _vec_init_char_column_id();
|
||||
|
||||
@ -181,7 +181,7 @@ private:
|
||||
std::vector<ColumnPredicate*> _short_cir_eval_predicate;
|
||||
std::vector<uint32_t> _delete_range_column_ids;
|
||||
std::vector<uint32_t> _delete_bloom_filter_column_ids;
|
||||
// when lazy materialization is enable, segmentIter need to read data at least twice
|
||||
// when lazy materialization is enabled, segmentIter need to read data at least twice
|
||||
// first, read predicate columns by various index
|
||||
// second, read non-predicate columns
|
||||
// so we need a field to stand for columns first time to read
|
||||
|
||||
@ -82,7 +82,7 @@ DataStreamSender::Channel::~Channel() {
|
||||
if (_closure != nullptr && _closure->unref()) {
|
||||
delete _closure;
|
||||
}
|
||||
// release this before request desctruct
|
||||
// release this before request destruct
|
||||
_brpc_request.release_finst_id();
|
||||
_brpc_request.release_query_id();
|
||||
}
|
||||
@ -347,8 +347,8 @@ DataStreamSender::DataStreamSender(ObjectPool* pool, int sender_id, const RowDes
|
||||
_name = "DataStreamSender";
|
||||
}
|
||||
|
||||
// We use the ParttitionRange to compare here. It should not be a member function of PartitionInfo
|
||||
// class becaurce there are some other member in it.
|
||||
// We use the PartitionRange to compare here. It should not be a member function of PartitionInfo
|
||||
// class because there are some other member in it.
|
||||
// TODO: move this to dpp_sink
|
||||
static bool compare_part_use_range(const PartitionInfo* v1, const PartitionInfo* v2) {
|
||||
return v1->range() < v2->range();
|
||||
|
||||
@ -75,7 +75,7 @@ bool DateTimeValue::check_date(uint32_t year, uint32_t month, uint32_t day) {
|
||||
bool DateTimeValue::from_date_str(const char* date_str, int len) {
|
||||
const char* ptr = date_str;
|
||||
const char* end = date_str + len;
|
||||
// ONLY 2, 6 can follow by a sapce
|
||||
// ONLY 2, 6 can follow by a space
|
||||
const static int allow_space_mask = 4 | 64;
|
||||
const static int MAX_DATE_PARTS = 8;
|
||||
uint32_t date_val[MAX_DATE_PARTS];
|
||||
@ -196,7 +196,7 @@ bool DateTimeValue::from_date_str(const char* date_str, int len) {
|
||||
// [YY_PART_YEAR * 10000L + 101, 991231] for two digits year 1970 ~1999
|
||||
// (991231, 10000101) invalid, because support 1000-01-01
|
||||
// [10000101, 99991231] for four digits year date value.
|
||||
// (99991231, 101000000) invalid, NOTE below this is datetime vaule hh:mm:ss must exist.
|
||||
// (99991231, 101000000) invalid, NOTE below this is datetime value hh:mm:ss must exist.
|
||||
// [101000000, (YY_PART_YEAR - 1)##1231235959] two digits year datetime value
|
||||
// ((YY_PART_YEAR - 1)##1231235959, YY_PART_YEAR##0101000000) invalid
|
||||
// ((YY_PART_YEAR)##1231235959, 99991231235959] two digits year datetime value 1970 ~ 1999
|
||||
|
||||
@ -81,7 +81,7 @@ class HeartbeatFlags;
|
||||
// once to properly initialise service state.
|
||||
class ExecEnv {
|
||||
public:
|
||||
// Initial exec enviorment. must call this to init all
|
||||
// Initial exec environment. must call this to init all
|
||||
static Status init(ExecEnv* env, const std::vector<StorePath>& store_paths);
|
||||
static void destroy(ExecEnv* exec_env);
|
||||
|
||||
|
||||
@ -445,7 +445,7 @@ Status FileResultWriter::_send_result() {
|
||||
|
||||
// The final stat result include:
|
||||
// FileNumber, TotalRows, FileSize and URL
|
||||
// The type of these field should be conssitent with types defined
|
||||
// The type of these field should be consistent with types defined
|
||||
// in OutFileClause.java of FE.
|
||||
MysqlRowBuffer row_buffer;
|
||||
row_buffer.push_int(_file_idx); // file number
|
||||
|
||||
@ -62,7 +62,7 @@ public:
|
||||
|
||||
// check if this load channel mem consumption exceeds limit.
|
||||
// If yes, it will pick a tablets channel to try to reduce memory consumption.
|
||||
// The mehtod will not return until the chosen tablet channels finished memtable
|
||||
// The method will not return until the chosen tablet channels finished memtable
|
||||
// flush.
|
||||
template <typename TabletWriterAddResult>
|
||||
Status handle_mem_exceed_limit(TabletWriterAddResult* response);
|
||||
|
||||
@ -241,7 +241,7 @@ int BfdParser::decode_address(const char* str, const char** end, std::string* fi
|
||||
func_name->append("??");
|
||||
return -1;
|
||||
}
|
||||
// demange function
|
||||
// demangle function
|
||||
if (ctx.func_name != nullptr) {
|
||||
#define DMGL_PARAMS (1 << 0)
|
||||
#define DMGL_ANSI (1 << 1)
|
||||
|
||||
@ -31,7 +31,7 @@ namespace doris {
|
||||
///
|
||||
/// Bit-packing always has a "bit width" parameter that determines the range of
|
||||
/// representable unsigned values: [0, 2^bit_width - 1]. The packed representation
|
||||
/// is logically the concatenatation of the lower bits of the input values (in
|
||||
/// is logically the concatenation of the lower bits of the input values (in
|
||||
/// little-endian order). E.g. the values 1, 2, 3, 4 packed with bit width 4 results
|
||||
/// in the two output bytes: [ 0 0 1 0 | 0 0 0 1 ] [ 0 1 0 0 | 0 0 1 1 ]
|
||||
/// 2 1 4 3
|
||||
|
||||
@ -36,7 +36,7 @@ namespace doris {
|
||||
//
|
||||
|
||||
// max compression reuse buffer size
|
||||
// if max_compress_len is bigger than this, donot use faststring in context
|
||||
// if max_compress_len is bigger than this, don't use faststring in context
|
||||
const static int MAX_COMPRESSION_BUFFER_SIZE_FOR_REUSE = 1024 * 1024 * 8;
|
||||
class BlockCompressionCodec {
|
||||
public:
|
||||
|
||||
@ -114,7 +114,7 @@ void HistogramStat::add(const uint64_t& value) {
|
||||
}
|
||||
|
||||
void HistogramStat::merge(const HistogramStat& other) {
|
||||
// This function needs to be performned with the outer lock acquired
|
||||
// This function needs to be performed with the outer lock acquired
|
||||
// However, atomic operation on every member is still need, since Add()
|
||||
// requires no lock and value update can still happen concurrently
|
||||
uint64_t old_min = min();
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
* JsonbParserT parses JSON string, and directly serializes into JSONB
|
||||
* packed bytes. There are three ways to parse a JSON string: (1) using
|
||||
* c-string, (2) using string with len, (3) using std::istream object. You can
|
||||
* use custome streambuf to redirect output. JsonbOutBuffer is a streambuf used
|
||||
* use custom streambuf to redirect output. JsonbOutBuffer is a streambuf used
|
||||
* internally if the input is raw character buffer.
|
||||
*
|
||||
* You can reuse an JsonbParserT object to parse/serialize multiple JSON
|
||||
@ -40,7 +40,7 @@
|
||||
* string to an id, and store the dictionary id in JSONB to save space. The
|
||||
* purpose of using an external dictionary is more towards a collection of
|
||||
* documents (which has common keys) rather than a single document, so that
|
||||
* space saving will be siginificant.
|
||||
* space saving will be significant.
|
||||
*
|
||||
* ** Endianness **
|
||||
* Note: JSONB serialization doesn't assume endianness of the server. However
|
||||
|
||||
@ -49,7 +49,7 @@ struct NodeInfo {
|
||||
*/
|
||||
class JsonbUpdater {
|
||||
public:
|
||||
// buffer_size is the maxinum number of bytes can be packed in document
|
||||
// buffer_size is the maximum number of bytes can be packed in document
|
||||
JsonbUpdater(JsonbDocument* doc, uint buffer_size, double shrink_ratio = 0.5)
|
||||
: document_(doc), buffer_size_(buffer_size), str_shrink_ratio_(shrink_ratio) {
|
||||
root_ = document_->getValue();
|
||||
|
||||
@ -66,7 +66,7 @@ public:
|
||||
|
||||
/** Create combined aggregate function (ex: sumIf)
|
||||
* from nested function (ex: sum)
|
||||
* and arguments for combined agggregate function (ex: UInt64, UInt8 for sumIf).
|
||||
* and arguments for combined aggregate function (ex: UInt64, UInt8 for sumIf).
|
||||
* It's assumed that function transform_arguments was called before this function and 'arguments' are validated.
|
||||
*/
|
||||
virtual AggregateFunctionPtr transform_aggregate_function(
|
||||
|
||||
@ -34,7 +34,7 @@ void register_aggregate_function_reader_load(AggregateFunctionSimpleFactory& fac
|
||||
register_function("hll_union", create_aggregate_function_HLL_union<false>);
|
||||
}
|
||||
|
||||
// only replace funtion in load/reader do different agg operation.
|
||||
// only replace function in load/reader do different agg operation.
|
||||
// because Doris can ensure that the data is globally ordered in reader, but cannot in load
|
||||
// 1. reader, get the first value of input data.
|
||||
// 2. load, get the last value of input data.
|
||||
|
||||
@ -415,7 +415,7 @@ public:
|
||||
|
||||
/** Returns a permutation that sorts elements of this column,
|
||||
* i.e. perm[i]-th element of source column should be i-th element of sorted column.
|
||||
* reverse - reverse ordering (acsending).
|
||||
* reverse - reverse ordering (ascending).
|
||||
* limit - if isn't 0, then only first limit elements of the result column could be sorted.
|
||||
* nan_direction_hint - see above.
|
||||
*/
|
||||
|
||||
@ -173,7 +173,7 @@ public:
|
||||
}
|
||||
|
||||
void pop_back(size_t n) override { data.erase(data.end() - n, data.end()); }
|
||||
// it's impossable to use ComplexType as key , so we don't have to implemnt them
|
||||
// it's impossible to use ComplexType as key , so we don't have to implement them
|
||||
[[noreturn]] StringRef serialize_value_into_arena(size_t n, Arena& arena,
|
||||
char const*& begin) const override {
|
||||
LOG(FATAL) << "serialize_value_into_arena not implemented";
|
||||
|
||||
@ -134,7 +134,7 @@ public:
|
||||
|
||||
const Container& get_data() const { return _codes; }
|
||||
|
||||
// it's impossable to use ComplexType as key , so we don't have to implemnt them
|
||||
// it's impossible to use ComplexType as key , so we don't have to implement them
|
||||
[[noreturn]] StringRef serialize_value_into_arena(size_t n, Arena& arena,
|
||||
char const*& begin) const override {
|
||||
LOG(FATAL) << "serialize_value_into_arena not supported in ColumnDictionary";
|
||||
|
||||
@ -37,7 +37,7 @@ using ConstNullMapPtr = const NullMap*;
|
||||
|
||||
/// Class that specifies nullable columns. A nullable column represents
|
||||
/// a column, which may have any type, provided with the possibility of
|
||||
/// storing NULL values. For this purpose, a ColumNullable object stores
|
||||
/// storing NULL values. For this purpose, a ColumnNullable object stores
|
||||
/// an ordinary column along with a special column, namely a byte map,
|
||||
/// whose type is ColumnUInt8. The latter column indicates whether the
|
||||
/// value of a given row is a NULL or not. Such a design is preferred
|
||||
|
||||
@ -150,7 +150,7 @@ public:
|
||||
return res;
|
||||
}
|
||||
|
||||
/// Get peice of memory with alignment
|
||||
/// Get piece of memory with alignment
|
||||
char* aligned_alloc(size_t size, size_t alignment) {
|
||||
do {
|
||||
void* head_pos = head->pos;
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
{
|
||||
private:
|
||||
friend class COW<Column>;
|
||||
/// Leave all constructors in private section. They will be avaliable through 'create' method.
|
||||
/// Leave all constructors in private section. They will be available through 'create' method.
|
||||
Column();
|
||||
/// Provide 'clone' method. It can be virtual if you want polymorphic behaviour.
|
||||
virtual Column * clone() const;
|
||||
|
||||
@ -117,7 +117,7 @@ void set(T& x) {
|
||||
* takes any pointer-like object;
|
||||
* for (3) and (4), LookupResult = Cell *, and both getters are implemented.
|
||||
* They have to be specialized for each particular Cell class to supersede the
|
||||
* default verision that takes a generic pointer-like object.
|
||||
* default version that takes a generic pointer-like object.
|
||||
*/
|
||||
struct VoidKey {};
|
||||
struct VoidMapped {
|
||||
|
||||
@ -51,7 +51,7 @@ constexpr T get_exp(std::size_t x) {
|
||||
|
||||
} // namespace exp_details
|
||||
|
||||
/// On overlow, the function returns unspecified value.
|
||||
/// On overflow, the function returns unspecified value.
|
||||
|
||||
inline uint64_t int_exp2(int x) {
|
||||
return 1ULL << x;
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
#include "vec/common/uint128.h"
|
||||
#include "vec/core/types.h"
|
||||
#include "vec/runtime/vdatetime_value.h"
|
||||
/** Preceptually-correct number comparisons.
|
||||
/** Perceptually-correct number comparisons.
|
||||
* Example: Int8(-1) != UInt8(255)
|
||||
*/
|
||||
|
||||
@ -42,7 +42,7 @@ namespace accurate {
|
||||
b) uint vs any uint
|
||||
c) float vs any float
|
||||
2) int vs uint
|
||||
a) sizeof(int) <= sizeof(uint). Accurate comparison with MAX_INT tresholds
|
||||
a) sizeof(int) <= sizeof(uint). Accurate comparison with MAX_INT thresholds
|
||||
b) sizeof(int) > sizeof(uint). Casting to int
|
||||
3) integral_type vs floating_type
|
||||
a) sizeof(integral_type) <= 4. Comparison via casting arguments to Float64
|
||||
@ -160,7 +160,7 @@ inline bool_if_double_can_be_used<TAInt, TAFloat> equalsOpTmpl(TAFloat a, TAInt
|
||||
return static_cast<double>(a) == static_cast<double>(b);
|
||||
}
|
||||
|
||||
/* Final realiztions */
|
||||
/* Final realizations */
|
||||
|
||||
template <typename A, typename B>
|
||||
inline bool_if_not_safe_conversion<A, B> greaterOp(A a, B b) {
|
||||
|
||||
@ -100,7 +100,7 @@ public:
|
||||
virtual DataTypePtr promote_numeric_type() const;
|
||||
|
||||
/** Directly insert default value into a column. Default implementation use method IColumn::insert_default.
|
||||
* This should be overriden if data type default value differs from column default value (example: Enum data types).
|
||||
* This should be overridden if data type default value differs from column default value (example: Enum data types).
|
||||
*/
|
||||
virtual void insert_default_into(IColumn& column) const;
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ inline UInt32 least_decimal_precision_for(TypeIndex int_type) {
|
||||
/// Int128 38
|
||||
/// Operation between two decimals leads to Decimal(P, S), where
|
||||
/// P is one of (9, 18, 38); equals to the maximum precision for the biggest underlying type of operands.
|
||||
/// S is maximum scale of operands. The allowed valuas are [0, precision]
|
||||
/// S is maximum scale of operands. The allowed values are [0, precision]
|
||||
template <typename T>
|
||||
class DataTypeDecimal final : public IDataType {
|
||||
static_assert(IsDecimalNumber<T>);
|
||||
|
||||
@ -29,7 +29,7 @@ struct RowRef {
|
||||
SizeT row_num = 0;
|
||||
uint8_t block_offset;
|
||||
// Use in right join to mark row is visited
|
||||
// TODO: opt the varaible to use it only need
|
||||
// TODO: opt the variable to use it only need
|
||||
bool visited = false;
|
||||
|
||||
RowRef() {}
|
||||
|
||||
@ -201,7 +201,7 @@ struct DateFormatImpl {
|
||||
}
|
||||
};
|
||||
|
||||
// TODO: This function should be depend on argments not always nullable
|
||||
// TODO: This function should be depend on arguments not always nullable
|
||||
template <typename DateType>
|
||||
struct FromUnixTimeImpl {
|
||||
using FromType = Int32;
|
||||
|
||||
@ -506,7 +506,7 @@ struct DecimalBinaryOperation {
|
||||
}
|
||||
|
||||
private:
|
||||
/// there's implicit type convertion here
|
||||
/// there's implicit type conversion here
|
||||
static NativeResultType apply(NativeResultType a, NativeResultType b) {
|
||||
if (config::enable_decimalv3) {
|
||||
if constexpr (OpTraits::can_overflow && check_overflow) {
|
||||
|
||||
@ -98,7 +98,7 @@ Block create_block_with_nested_columns(const Block& block, const ColumnNumbers&
|
||||
/// Returns the copy of a given block in only args column specified in
|
||||
/// the "arguments" parameter is replaced with its respective nested
|
||||
/// column if it is nullable.
|
||||
/// TODO: the old funciton `create_block_with_nested_columns` have perfermance problem, replace all
|
||||
/// TODO: the old funciton `create_block_with_nested_columns` have performance problem, replace all
|
||||
/// by the function and delete old one.
|
||||
Block create_block_with_nested_columns_only_args(const Block& block, const ColumnNumbers& args);
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ struct NumComparisonImpl {
|
||||
/// If you don't specify NO_INLINE, the compiler will inline this function, but we don't need this as this function contains tight loop inside.
|
||||
static void NO_INLINE vector_vector(const PaddedPODArray<A>& a, const PaddedPODArray<B>& b,
|
||||
PaddedPODArray<UInt8>& c) {
|
||||
/** GCC 4.8.2 vectorizes a loop only if it is written in this form.
|
||||
/** GCC 4.8.2 vectorized a loop only if it is written in this form.
|
||||
* In this case, if you loop through the array index (the code will look simpler),
|
||||
* the loop will not be vectorized.
|
||||
*/
|
||||
|
||||
@ -39,7 +39,7 @@ struct MinusImpl {
|
||||
return DecimalV2Value(a.value() - b.value());
|
||||
}
|
||||
|
||||
/// Apply operation and check overflow. It's used for Deciamal operations. @returns true if overflowed, false otherwise.
|
||||
/// Apply operation and check overflow. It's used for Decimal operations. @returns true if overflowed, false otherwise.
|
||||
template <typename Result = ResultType>
|
||||
static inline bool apply(A a, B b, Result& c) {
|
||||
return common::sub_overflow(static_cast<Result>(a), b, c);
|
||||
|
||||
@ -60,7 +60,7 @@ struct MultiplyImpl {
|
||||
}
|
||||
}
|
||||
|
||||
/// Apply operation and check overflow. It's used for Deciamal operations. @returns true if overflowed, false otherwise.
|
||||
/// Apply operation and check overflow. It's used for Decimal operations. @returns true if overflowed, false otherwise.
|
||||
template <typename Result = ResultType>
|
||||
static inline bool apply(A a, B b, Result& c) {
|
||||
return common::mul_overflow(static_cast<Result>(a), b, c);
|
||||
|
||||
@ -282,7 +282,7 @@ Status BlockReader::_unique_key_next_block(Block* block, MemPool* mem_pool, Obje
|
||||
}
|
||||
} while (target_block_row < _batch_size);
|
||||
|
||||
// do filter detete row in base compaction, only base compaction need to do the job
|
||||
// do filter delete row in base compaction, only base compaction need to do the job
|
||||
if (_filter_delete) {
|
||||
int delete_sign_idx = _reader_context.tablet_schema->field_index(DELETE_SIGN);
|
||||
DCHECK(delete_sign_idx > 0);
|
||||
|
||||
@ -344,7 +344,7 @@ Status arrow_column_to_doris_column(const arrow::Array* arrow_column, size_t arr
|
||||
Status arrow_column_to_doris_column(const arrow::Array* arrow_column, size_t arrow_batch_cur_idx,
|
||||
ColumnPtr& doris_column, const DataTypePtr& type,
|
||||
size_t num_elements, const cctz::time_zone& ctz) {
|
||||
// src column always be nullable for simpify converting
|
||||
// src column always be nullable for simplify converting
|
||||
CHECK(doris_column->is_nullable());
|
||||
MutableColumnPtr data_column = nullptr;
|
||||
auto* nullable_column = reinterpret_cast<vectorized::ColumnNullable*>(
|
||||
|
||||
@ -127,7 +127,7 @@ TEST_F(DecimalValueTest, int_to_decimal) {
|
||||
DecimalValue value8(11, 0);
|
||||
EXPECT_EQ("11", value8.to_string(3));
|
||||
|
||||
// more than 9digit, fraction will be trancated to 999999999
|
||||
// more than 9digit, fraction will be truncated to 999999999
|
||||
DecimalValue value9(1230123456789, 1230123456789);
|
||||
EXPECT_EQ("1230123456789.999999999", value9.to_string(10));
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ namespace doris::vectorized {
|
||||
int64_t str_to_date_time(std::string datetime_str, bool data_time) {
|
||||
VecDateTimeValue v;
|
||||
v.from_date_str(datetime_str.c_str(), datetime_str.size());
|
||||
if (data_time) { //bool data_time only to simplifly means data_time or data to cast, just use in time-functions uint test
|
||||
if (data_time) { //bool data_time only to simplify means data_time or data to cast, just use in time-functions uint test
|
||||
v.to_datetime();
|
||||
} else {
|
||||
v.cast_to_date();
|
||||
|
||||
Reference in New Issue
Block a user