Skip to content

Commit

Permalink
feat(StoneDB 8.0): Fix up the compiling warnings(miscellaneous). (#547)
Browse files Browse the repository at this point in the history
  • Loading branch information
lujiashun committed Oct 8, 2022
1 parent 52a721e commit 7ff713d
Show file tree
Hide file tree
Showing 40 changed files with 66 additions and 84 deletions.
2 changes: 1 addition & 1 deletion storage/tianmu/async_tests/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void TestSubmitRandom(std::shared_ptr<core::TaskExecutor> task_executor) {
ready_future.wait();
}

int main(int argc, char **argv) {
int main([[maybe_unused]]int argc,[[maybe_unused]] char **argv) {
auto started = Tianmu::base::steady_clock_type::now();
std::shared_ptr<core::TaskExecutor> task_executor(new core::TaskExecutor);
std::future<void> ready_future = task_executor->Init(std::thread::hardware_concurrency());
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/async_tests/task_executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class TaskExecutor {
auto task = std::make_unique<FuncTask<Func>>(std::move(func));
auto ret = task->get_future();
AddTask(std::move(task));
return std::move(ret);
return ret;
}

void Exit();
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/base/core/iostream_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ inline future<temporary_buffer<char>> data_source_impl::skip(uint64_t n) {
return get().then([&](temporary_buffer<char> buffer) -> std::experimental::optional<temporary_buffer<char>> {
if (buffer.size() >= n) {
buffer.trim_front(n);
return std::move(buffer);
return buffer;
}
n -= buffer.size();
return {};
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/base/core/sleep.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ future<> sleep(std::chrono::duration<Rep, Period> dur) {
class sleep_aborted : public std::exception {
public:
/// Reports the exception reason.
virtual const char *what() const noexcept { return "Sleep is aborted"; }
virtual const char *what() const noexcept override { return "Sleep is aborted"; }
};

/// Returns a future which completes after a specified time has elapsed
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/base/net/posix_stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ class posix_udp_channel : public udp_channel_impl {

future<> posix_udp_channel::send(ipv4_addr dst, const char *message) {
auto len = strlen(message);
return _fd->sendto(make_ipv4_address(dst), message, len).then([len](size_t size TIANMU_UNUSED) {
return _fd->sendto(make_ipv4_address(dst), message, len).then([len]([[maybe_unused]] size_t size) {
assert(size == len);
});
}
Expand Down
6 changes: 3 additions & 3 deletions storage/tianmu/common/compile_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@

namespace Tianmu {

#ifdef __clang__
#if defined(__clang__)
// in clang
#elif __GNUC__
#elif defined(__GNUC__)
//
//__GNUC__ // major
//__GNUC_MINOR__ // minor
//__GNUC_PATCHLEVEL__ // patch
// C++0x features
//
#if (__GNUC__ > 4 && __GUNC__ < 7) || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)
#if (__GNUC__ > 4 && __GNUC__ < 7) || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)
// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are
// passed on the command line, which in turn defines
// __GXX_EXPERIMENTAL_CXX0X__.
Expand Down
1 change: 1 addition & 0 deletions storage/tianmu/common/exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class TIANMUError {
TIANMUError(ErrorCode tianmu_error_code = ErrorCode::SUCCESS) : ec(tianmu_error_code) {}
TIANMUError(ErrorCode tianmu_error_code, std::string message) : ec(tianmu_error_code), message(message) {}
TIANMUError(const TIANMUError &tianmu_e) : ec(tianmu_e.ec), message(tianmu_e.message) {}
TIANMUError &operator=(const TIANMUError&) = default;
operator ErrorCode() { return ec; }
ErrorCode GetErrorCode() { return ec; }
bool operator==(ErrorCode tianmu_ec) { return tianmu_ec == ec; }
Expand Down
4 changes: 2 additions & 2 deletions storage/tianmu/compress/text_compressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ CprsErr TextCompressor::CompressZlib(char *dest, int &dlen, char **index, const
uint64_t destlen = dlen - pos;
int ret = compress2(reinterpret_cast<Bytef *>(dest + pos), &destlen, srcdata.get(), srclen, Z_DEFAULT_COMPRESSION);
if (ret != Z_OK) {
TIANMU_LOG(LogCtl_Level::ERROR, "compress2 failure %d, destlen: %d, srclen %d, packlen %u", ret, destlen, srclen,
TIANMU_LOG(LogCtl_Level::ERROR, "compress2 failure %d, destlen: %lu, srclen %lu, packlen %u", ret, destlen, srclen,
packlen);
return CprsErr::CPRS_ERR_OTH;
}
Expand All @@ -442,7 +442,7 @@ CprsErr TextCompressor::DecompressZlib(char *dest, int dlen, char *src, int slen
const int ret =
uncompress(reinterpret_cast<Bytef *>(dest), &destlen, reinterpret_cast<const Bytef *>(src + spos), srclen);
if (ret != Z_OK) {
TIANMU_LOG(LogCtl_Level::ERROR, "uncompress error: %d, srclen: %d destlen = %d", ret, srclen, dlen);
TIANMU_LOG(LogCtl_Level::ERROR, "uncompress error: %d, srclen: %lu destlen = %d", ret, srclen, dlen);
return CprsErr::CPRS_ERR_OTH;
}
size_t sumlen = 0;
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/column.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Column {
Column(const Column &c) {
if (this != &c) *this = c;
}

constexpr Column& operator=(const Column&) = default;
inline const ColumnType &Type() const { return ct; }
inline common::CT TypeName() const { return ct.GetTypeName(); }
inline void SetTypeName(common::CT type) { ct.SetTypeName(type); }
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/compiled_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ void CompiledQuery::CQStep::Print(Query *query) {
std::sprintf(buf, "RESULT(T:%d)", N(t1.n));
break;
default:
std::sprintf(buf, "Unsupported type of CQStep: %d", type);
std::sprintf(buf, "Unsupported type of CQStep: %d", static_cast<int>(type));
}
TIANMU_LOG(LogCtl_Level::DEBUG, "%s", buf);
}
Expand Down
12 changes: 6 additions & 6 deletions storage/tianmu/core/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ fs::path Engine::GetNextDataDir() {
auto si = fs::space(s);
auto usage = 100 - ((si.available * 100) / si.capacity);
if (usage > static_cast<size_t>(tianmu_sysvar_disk_usage_threshold)) {
TIANMU_LOG(LogCtl_Level::WARN, "disk %s usage %d%%", s.native().c_str(), usage);
TIANMU_LOG(LogCtl_Level::WARN, "disk %s usage %lu%%", s.native().c_str(), usage);
return true;
}
return false;
Expand Down Expand Up @@ -259,8 +259,8 @@ int Engine::Init(uint engine_slot) {
[]() {
TIANMU_LOG(
LogCtl_Level::INFO,
"Memory: release [%llu %llu %llu %llu] %llu, total "
"%llu. (un)freeable %lu/%lu, total alloc/free "
"Memory: release [%llu %llu %llu %llu] %lu, total "
"%lu. (un)freeable %lu/%lu, total alloc/free "
"%lu/%lu",
mm::TraceableObject::Instance()->getReleaseCount1(), mm::TraceableObject::Instance()->getReleaseCount2(),
mm::TraceableObject::Instance()->getReleaseCount3(), mm::TraceableObject::Instance()->getReleaseCount4(),
Expand Down Expand Up @@ -318,7 +318,7 @@ void Engine::HandleDeferredJobs() {
fs::remove(t.file, ec);
// Ignore ENOENT since files might be deleted by 'drop table'.
if (ec && ec != std::errc::no_such_file_or_directory) {
TIANMU_LOG(LogCtl_Level::ERROR, "Failed to remove file %s Error:%s", t.file.string().c_str(), ec.message());
TIANMU_LOG(LogCtl_Level::ERROR, "Failed to remove file %s Error:%s", t.file.string().c_str(), ec.message().c_str());
}
} else {
gc_tasks.emplace_back(t);
Expand Down Expand Up @@ -589,7 +589,7 @@ std::shared_ptr<TableOption> Engine::GetTableOption(const std::string &table, TA

int power = has_pack(form->s->comment);
if (power < 5 || power > 16) {
TIANMU_LOG(LogCtl_Level::ERROR, "create table comment: pack size shift(%d) should be >=5 and <= 16");
TIANMU_LOG(LogCtl_Level::ERROR, "create table comment: pack size shift(%d) should be >=5 and <= 16",power);
throw common::SyntaxException("Unexpected data pack size.");
}

Expand Down Expand Up @@ -967,7 +967,7 @@ int get_parameter(THD *thd, enum tianmu_var_name vn, double &value) {
return 0;
}

int get_parameter(THD *thd, enum tianmu_var_name vn, int64_t &value) {
int get_parameter(THD *thd, enum tianmu_var_name vn, [[maybe_unused]] int64_t &value) {
std::string var_data = get_parameter_name(vn);
// stonedb8 start
bool null_val;
Expand Down
9 changes: 3 additions & 6 deletions storage/tianmu/core/engine_results.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,15 @@ void scan_fields(mem_root_deque<Item *> &fields, uint *&buf_lens, std::map<int,
}
}

// stonedb8 List -> mem_root_deque
void restore_fields(mem_root_deque<Item *> &fields, std::map<int, Item *> &items_backup) {
// nothing to restore
if (items_backup.size() == 0) {
return;
}

Item *item;
int count = 0;
for (auto it = fields.begin(); it != fields.end(); ++it) { // stonedb8
item = *it;
if (items_backup.find(count) != items_backup.end()) fields[count] = items_backup[count]; // stonedb8
for (auto it = fields.begin(); it != fields.end(); ++it) {
if (items_backup.find(count) != items_backup.end()) fields[count] = items_backup[count];
count++;
}
}
Expand Down Expand Up @@ -381,7 +378,7 @@ void ResultSender::Finalize(TempTable *result_table) {
<< "\tClientPort:" << thd->peer_port << "\tUser:" << sctx.user().str << global_serverinfo_
<< "\tAffectRows:" << affect_rows << "\tResultRows:" << rows_sent << "\tDBName:" << thd->db().str
<< "\tCosttime(ms):" << cost_time << "\tSQL:" << thd->query().str << system::unlock;
TIANMU_LOG(LogCtl_Level::DEBUG, "Result: %" PRId64 " Costtime(ms): %" PRId64, rows_sent, cost_time);
TIANMU_LOG(LogCtl_Level::DEBUG, "Result: %ld Costtime(ms): %llu", rows_sent, cost_time);
}

void ResultSender::CleanUp() { restore_fields(fields, items_backup); }
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/groupby_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ void GroupByWrapper::AddAggregatedColumn(int orig_attr_no, TempTable::Attr &a, i
TIANMU_LOG(LogCtl_Level::DEBUG,
"attr_no %d, input_mode[attr_no] %d, a.alias %s, a.si.separator "
"%s, direction %d, ag_type %d, ag_size %d",
attr_no, input_mode[attr_no], a.alias, a.si.separator.c_str(), a.si.order, ag_type, ag_size);
attr_no, static_cast<int>(input_mode[attr_no]), a.alias, a.si.separator.c_str(), a.si.order,static_cast<int>(ag_type), ag_size);

gt.AddAggregatedColumn(virt_col[attr_no], ag_oper, ag_distinct, ag_type, ag_size, ag_prec, ag_collation,
a.si); // note: size will be automatically calculated for all numericals
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/index_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ IndexTable::IndexTable(int64_t _size, int64_t _orig_size, [[maybe_unused]] int m
buf = (unsigned char *)alloc(buffer_size_in_bytes, mm::BLOCK_TYPE::BLOCK_TEMPORARY, true);
if (!buf) {
Unlock();
TIANMU_LOG(LogCtl_Level::ERROR, "Could not allocate memory for IndexTable, size :%u", buffer_size_in_bytes);
TIANMU_LOG(LogCtl_Level::ERROR, "Could not allocate memory for IndexTable, size :%lu", buffer_size_in_bytes);
throw common::OutOfMemoryException();
}
std::memset(buf, 0, buffer_size_in_bytes);
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/item_tianmu_field.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Item_tianmufield : public Item_field {
bool get_date(MYSQL_TIME *ltime, uint fuzzydate) override;
bool get_date_result(MYSQL_TIME *ltime, uint fuzzydate) /*override*/ { return get_date(ltime, fuzzydate); }
bool get_time(MYSQL_TIME *ltime) override;
bool get_timeval(struct my_timeval *tm, int *warnings) /*override*/;
bool get_timeval(struct my_timeval *tm, int *warnings) override;
table_map used_tables() const override { return ifield->used_tables(); }
enum Item_result result_type() const override {
return was_aggregation ? aggregation_result : Item_field::result_type();
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/joiner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ TwoDimensionalJoiner::~TwoDimensionalJoiner() {
}

JoinAlgType TwoDimensionalJoiner::ChooseJoinAlgorithm([[maybe_unused]] MultiIndex &mind, Condition &cond) {
auto choose_map_or_hash = ([&tianmu_sysvar_force_hashjoin, &cond] {
auto choose_map_or_hash = ([&cond] {
if ((!tianmu_sysvar_force_hashjoin) && (cond.Size() == 1))
return JoinAlgType::JTYPE_MAP; // available types checked inside

Expand Down
4 changes: 2 additions & 2 deletions storage/tianmu/core/joiner_hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ int64_t JoinerHash::NewMatchDim(MINewContents *new_mind1, MIUpdatingIterator *ta
}
}
if (no_of_matching_rows > 65536 || no_of_matching_rows < 0)
TIANMU_LOG(LogCtl_Level::DEBUG, "no_of_matching_rows %d", no_of_matching_rows);
TIANMU_LOG(LogCtl_Level::DEBUG, "no_of_matching_rows %ld", no_of_matching_rows);
joined_tuples += no_of_matching_rows;
omit_this_packrow = true;
}
Expand Down Expand Up @@ -771,7 +771,7 @@ int64_t JoinerHash::NewMatchDim(MINewContents *new_mind1, MIUpdatingIterator *ta
matching_row++;
}
if (outer_nulls_only) joined_tuples = 0; // outer tuples added later
TIANMU_LOG(LogCtl_Level::DEBUG, "JoinerHash::test %d,matching_row %d", joined_tuples, matching_row);
TIANMU_LOG(LogCtl_Level::DEBUG, "JoinerHash::test %ld,matching_row %ld", joined_tuples, matching_row);
*join_tuple = joined_tuples;
return joined_tuples;
}
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/joiner_mapped.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ std::unique_ptr<JoinerMapFunction> JoinerMapped::GenerateFunction(vcolumn::Virtu

rc_control_.lock(m_conn->GetThreadID())
<< "Join mapping (multimaps) created on " << mit.NumOfTuples() << " rows." << system::unlock;
return std::move(map_function);
return map_function;
}

int64_t JoinerParallelMapped::ExecuteMatchLoop(std::shared_ptr<MultiIndexBuilder::BuildItem> *indextable,
Expand Down
1 change: 1 addition & 0 deletions storage/tianmu/core/mi_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ class MIInpackIterator : public MIIterator {
public:
MIInpackIterator(const MIIterator &sec) : MIIterator(sec) {}
MIInpackIterator() : MIIterator() {}
MIInpackIterator(const MIInpackIterator&) = default ;
void swap(MIInpackIterator &i);
MIInpackIterator &operator=(const MIInpackIterator &m) {
MIInpackIterator tmp(m);
Expand Down
3 changes: 3 additions & 0 deletions storage/tianmu/core/mysql_expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ DataType MysqlExpression::EvalType(TypOfVars *tv) {
case ROW_RESULT:
DEBUG_ASSERT(0 && "unexpected type: ROW_RESULT");
break;
default:
DEBUG_ASSERT(0 && "unexpected type: INVALID_RESULT");
break;
}
return type;
}
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/proxy_hash_joiner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class MIIteratorPoller {
no_more_ = true;
}

return std::move(pack_iter);
return pack_iter;
}

private:
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/rc_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ int RCTable::Insert(TABLE *table) {
}

if (tab->InsertIndex(current_txn_, fields, NumOfObj()) == common::ErrorCode::DUPP_KEY) {
TIANMU_LOG(LogCtl_Level::INFO, "Insert duplicate key on row %d", NumOfObj() - 1);
TIANMU_LOG(LogCtl_Level::INFO, "Insert duplicate key on row %ld", NumOfObj() - 1);
return HA_ERR_FOUND_DUPP_KEY;
}
}
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/rcattr_exqp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ common::ErrorCode RCAttr::EvaluateOnIndex_BetweenInt(MIUpdatingIterator &mit, in

++iter;
} else {
TIANMU_LOG(LogCtl_Level::ERROR, "GetCurKV valid! col:[%u]=%I64d, Path:%s", ColId(), pv1,
TIANMU_LOG(LogCtl_Level::ERROR, "GetCurKV valid! col:[%u]=%ld, Path:%s", ColId(), pv1,
m_share->owner->Path().data());
break;
}
Expand Down
6 changes: 3 additions & 3 deletions storage/tianmu/core/sorter3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,13 +475,13 @@ bool SorterLimit::PutValue(Sorter3 *s) {
// not called
uint tmp_noobj = sl->GetObjNo();
unsigned char *buf1 = sl->Getbuf();
TIANMU_LOG(LogCtl_Level::DEBUG, "PutValue: total bytes %d, tmp_noobj %ld ", total_bytes, tmp_noobj);
TIANMU_LOG(LogCtl_Level::DEBUG, "PutValue: total bytes %d, tmp_noobj %u ", total_bytes, tmp_noobj);

if (tmp_noobj) {
if (no_obj + tmp_noobj <= size) {
std::memcpy(buf + no_obj * total_bytes, buf1, tmp_noobj * total_bytes);
no_obj += tmp_noobj;
TIANMU_LOG(LogCtl_Level::DEBUG, "PutValue: no_obj %ld, tmp_noobj %ld, total_bytes %ld buf %s", no_obj, tmp_noobj,
TIANMU_LOG(LogCtl_Level::DEBUG, "PutValue: no_obj %u, tmp_noobj %u, total_bytes %u buf %s", no_obj, tmp_noobj,
total_bytes, buf);
} else {
TIANMU_LOG(LogCtl_Level::ERROR, "error in Putvalue, out of boundary size %d no_obj+tmp_noobj %d", size,
Expand All @@ -493,4 +493,4 @@ bool SorterLimit::PutValue(Sorter3 *s) {
return true;
}
} // namespace core
} // namespace Tianmu
} // namespace Tianmu
4 changes: 2 additions & 2 deletions storage/tianmu/core/sorter_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ bool SorterWrapper::InitPackrow(MIIterator &mit) // return true if the packrow
}
}

TIANMU_LOG(LogCtl_Level::DEBUG, "InitPackrow: no_values_encoded %d, begin to loadpacks scol size %d ",
TIANMU_LOG(LogCtl_Level::DEBUG, "InitPackrow: no_values_encoded %ld, begin to loadpacks scol size %lu ",
no_values_encoded, scol.size());
// Not excluded: lock packs
if (!ha_rcengine_->query_thread_pool.is_owner()) {
Expand Down Expand Up @@ -264,7 +264,7 @@ bool SorterWrapper::PutValues(MIIterator &mit) {
bool SorterWrapper::PutValues(SorterWrapper &sw) {
if (s == NULL) return false; // trivial sorter (constant values)
no_values_encoded += sw.GetEncodedValNum();
TIANMU_LOG(LogCtl_Level::DEBUG, "PutValues: no_values_encoded %d \n", no_values_encoded);
TIANMU_LOG(LogCtl_Level::DEBUG, "PutValues: no_values_encoded %lu \n", no_values_encoded);
return s->PutValue(sw.GetSorter());
}

Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/task_executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class TaskExecutor {
auto task = std::make_unique<FuncTask<Func>>(std::move(func));
auto ret = task->get_future();
AddTask(std::move(task));
return std::move(ret);
return ret;
}

void Exit();
Expand Down
10 changes: 5 additions & 5 deletions storage/tianmu/core/temp_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ class TempTable : public JustATable {
uint64_t ExactDistinctVals([[maybe_unused]] Filter *f) override { return common::NULL_VALUE_64; }
bool IsDistinct([[maybe_unused]] Filter *f) override { return false; }
size_t MaxStringSize(Filter *f = NULL) override; // maximal byte string length in column
int64_t RoughMin(Filter *f = NULL, common::RSValue *rf = NULL) override {
int64_t RoughMin([[maybe_unused]] Filter *f = NULL, [[maybe_unused]] common::RSValue *rf = NULL) override {
return common::MINUS_INF_64;
} // for numerical: best rough approximation of min for a given filter (or
// global min if filter is NULL)
int64_t RoughMax(Filter *f = NULL, common::RSValue *rf = NULL) override {
int64_t RoughMax( [[maybe_unused]] Filter *f = NULL,[[maybe_unused]] common::RSValue *rf = NULL) override {
return common::PLUS_INF_64;
} // for numerical: best rough approximation of max for a given filter (or
// global max if filter is NULL)
Expand Down Expand Up @@ -265,10 +265,10 @@ class TempTable : public JustATable {
bool IsNull(int64_t obj,
int attr) override; // return true if the value of attr. is null

int64_t RoughMin([[maybe_unused]] int n_a, Filter *f = NULL) { return common::MINUS_INF_64; }
int64_t RoughMax([[maybe_unused]] int n_a, Filter *f = NULL) { return common::PLUS_INF_64; }
int64_t RoughMin([[maybe_unused]] int n_a, [[maybe_unused]] Filter *f = NULL) { return common::MINUS_INF_64; }
int64_t RoughMax([[maybe_unused]] int n_a, [[maybe_unused]] Filter *f = NULL) { return common::PLUS_INF_64; }

uint MaxStringSize(int n_a, Filter *f = NULL) override {
uint MaxStringSize(int n_a, [[maybe_unused]] Filter *f = NULL) override {
if (n_a < 0) return GetFieldSize(-n_a - 1);
return GetFieldSize(n_a);
}
Expand Down
4 changes: 2 additions & 2 deletions storage/tianmu/core/temp_table_low.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ bool TempTable::OrderByAndMaterialize(std::vector<SortDescriptor> &ord, int64_t
}

TIANMU_LOG(LogCtl_Level::DEBUG,
"SortTable preparation done. row num %d, offset %d, limit %d, "
"SortTable preparation done. row num %ld, offset %ld, limit %ld, "
"task_num %d",
local_row, offset, limit, task_num);

Expand Down Expand Up @@ -552,7 +552,7 @@ size_t TempTable::TaskPutValueInST(MIIterator *it, Transaction *ci, SorterWrappe
local_row += it->GetPackSizeLeft();
it->NextPackrow();

TIANMU_LOG(LogCtl_Level::DEBUG, "skip this pack it %x", it);
TIANMU_LOG(LogCtl_Level::DEBUG, "skip this pack it: %p", it);
continue;
}
}
Expand Down
Loading

0 comments on commit 7ff713d

Please sign in to comment.