You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-4839: Fix clang build (#2100)
* Fix clang build * Extern C returned to plugin_instance Co-authored-by: Leonid Fedorov <l.fedorov@mail.corp.ru>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -169,3 +169,4 @@ storage-manager/unit_tests
|
||||
.drone.yml
|
||||
result/
|
||||
mariadb-columnstore-regression-test/
|
||||
build/Testing/
|
||||
|
@ -97,13 +97,13 @@ namespace BRM
|
||||
|
||||
namespace rowgroup
|
||||
{
|
||||
struct Row;
|
||||
class Row;
|
||||
};
|
||||
|
||||
|
||||
namespace execplan
|
||||
{
|
||||
struct SimpleColumn;
|
||||
class SimpleColumn;
|
||||
};
|
||||
|
||||
|
||||
|
@ -20,8 +20,10 @@
|
||||
#define MCS_TSFLOAT128_H_INCLUDED
|
||||
|
||||
#include <cfloat>
|
||||
#include <cctype>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include "mcs_numeric_limits.h"
|
||||
|
||||
#ifdef __aarch64__
|
||||
@ -103,7 +105,7 @@ static const float128_t mcs_fl_one = 1.0, mcs_fl_Zero[] = {0.0, -0.0,};
|
||||
template<> class numeric_limits<float128_t> {
|
||||
public:
|
||||
static constexpr bool is_specialized = true;
|
||||
static constexpr float128_t max()
|
||||
static float128_t max()
|
||||
{
|
||||
return mcs_ieee854_float128{ .ieee = {0xffffffff,
|
||||
0xffffffff,
|
||||
@ -112,7 +114,7 @@ template<> class numeric_limits<float128_t> {
|
||||
0x7ffe,
|
||||
0x0}}.value;
|
||||
}
|
||||
static constexpr float128_t min()
|
||||
static float128_t min()
|
||||
{
|
||||
return mcs_ieee854_float128{ .ieee = {0x0,
|
||||
0x0,
|
||||
|
@ -40,7 +40,7 @@
|
||||
src_restrictions, \
|
||||
clobb) \
|
||||
::memcpy((dst), (src), sizeof(int128_t));
|
||||
#elif defined(__GNUC__) && (__GNUC___ > 7)
|
||||
#elif defined(__GNUC__) && (__GNUC___ > 7) || defined(__clang__)
|
||||
#define MACRO_VALUE_PTR_128(dst, \
|
||||
dst_restrictions, \
|
||||
src, \
|
||||
@ -143,6 +143,12 @@ class TSInt128
|
||||
// Copy ctor
|
||||
TSInt128(const TSInt128& other): s128Value(other.s128Value) { }
|
||||
|
||||
TSInt128& operator=(const TSInt128& other)
|
||||
{
|
||||
s128Value = other.s128Value;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// aligned argument
|
||||
explicit TSInt128(const int128_t& x) { s128Value = x; }
|
||||
|
||||
|
@ -62,6 +62,14 @@ using namespace cacheutils;
|
||||
#include "IDBPolicy.h"
|
||||
using namespace idbdatafile;
|
||||
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
|
||||
// for warnings on typeid :expression with side effects will be evaluated despite being used as an operand to 'typeid'
|
||||
#endif
|
||||
|
||||
|
||||
//TODO: this should be in a common header somewhere
|
||||
struct extentInfo
|
||||
{
|
||||
@ -2504,3 +2512,6 @@ void AlterTableProcessor::renameColumn(uint32_t sessionID, execplan::CalpontSyst
|
||||
}
|
||||
// vim:ts=4 sw=4:
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
@ -414,7 +414,6 @@ string CalpontSelectExecutionPlan::queryTypeToString(const uint32_t queryType)
|
||||
void CalpontSelectExecutionPlan::serialize(messageqcpp::ByteStream& b) const
|
||||
{
|
||||
ReturnedColumnList::const_iterator rcit;
|
||||
vector<ReturnedColumn*>::const_iterator it;
|
||||
ColumnMap::const_iterator mapiter;
|
||||
TableList::const_iterator tit;
|
||||
|
||||
@ -727,7 +726,6 @@ bool CalpontSelectExecutionPlan::operator==(const CalpontSelectExecutionPlan& t)
|
||||
|
||||
ReturnedColumnList::const_iterator rcit;
|
||||
ReturnedColumnList::const_iterator rcit2;
|
||||
vector<ReturnedColumn*>::const_iterator it, it2;
|
||||
SelectList::const_iterator sit, sit2;
|
||||
ColumnMap::const_iterator map_it, map_it2;
|
||||
|
||||
|
@ -279,7 +279,6 @@ void FunctionColumn::unserialize(messageqcpp::ByteStream& b)
|
||||
uint32_t size, i;
|
||||
//SRCP rc;
|
||||
SPTP pt;
|
||||
FunctionParm::iterator it;
|
||||
|
||||
fFunctionParms.erase(fFunctionParms.begin(), fFunctionParms.end());
|
||||
fSimpleColumnList.clear();
|
||||
|
@ -87,6 +87,14 @@ using namespace logging;
|
||||
#include "jlf_tuplejoblist.h"
|
||||
#include "mcs_decimal.h"
|
||||
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
|
||||
// for warnings on typeid :expression with side effects will be evaluated despite being used as an operand to 'typeid'
|
||||
#endif
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
using namespace joblist;
|
||||
@ -3558,3 +3566,6 @@ void JLF_ExecPlanToJobList::addJobSteps(JobStepVector& nsv, JobInfo& jobInfo, bo
|
||||
} // end of joblist namespace
|
||||
// vim:ts=4 sw=4:
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
@ -35,6 +35,14 @@ using namespace joblist;
|
||||
|
||||
#include "jlf_graphics.h"
|
||||
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
|
||||
// for warnings on typeid :expression with side effects will be evaluated despite being used as an operand to 'typeid'
|
||||
#endif
|
||||
|
||||
|
||||
namespace jlf_graphics
|
||||
{
|
||||
|
||||
@ -411,3 +419,6 @@ ostream& writeDotCmds(ostream& dotFile, const JobStepVector& query, const JobSte
|
||||
|
||||
// vim:ts=4 sw=4 syntax=cpp:
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
@ -73,6 +73,14 @@ using namespace joblist;
|
||||
|
||||
#include "statistics.h"
|
||||
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
|
||||
// for warnings on typeid :expression with side effects will be evaluated despite being used as an operand to 'typeid'
|
||||
#endif
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
@ -2610,7 +2618,7 @@ SP_JoinInfo joinToLargeTable(uint32_t large, TableInfoMap& tableInfoMap, JobInfo
|
||||
// @bug6158, try to put BPS on large side if possible
|
||||
if (tsas && smallSides.size() == 1)
|
||||
{
|
||||
SJSTEP sspjs = tableInfoMap[cId].fQuerySteps.back(), get();
|
||||
SJSTEP sspjs = tableInfoMap[cId].fQuerySteps.back();
|
||||
BatchPrimitive* sbps = dynamic_cast<BatchPrimitive*>(sspjs.get());
|
||||
TupleHashJoinStep* sthjs = dynamic_cast<TupleHashJoinStep*>(sspjs.get());
|
||||
|
||||
@ -4623,3 +4631,7 @@ SJSTEP unionQueries(JobStepVector& queries, uint64_t distinctUnionNum, JobInfo&
|
||||
}
|
||||
// vim:ts=4 sw=4:
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
|
@ -47,6 +47,13 @@ using namespace execplan;
|
||||
|
||||
#include "atomicops.h"
|
||||
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
|
||||
// for warnings on typeid :expression with side effects will be evaluated despite being used as an operand to 'typeid'
|
||||
#endif
|
||||
|
||||
namespace joblist
|
||||
{
|
||||
int JobList::fPmsConfigured = 0;
|
||||
@ -1218,5 +1225,9 @@ void TupleJobList::abort()
|
||||
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
// vim:ts=4 sw=4:
|
||||
|
||||
|
@ -92,11 +92,17 @@ using namespace rowgroup;
|
||||
|
||||
#include "mcsv1_udaf.h"
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
|
||||
// for warnings on typeid :expression with side effects will be evaluated despite being used as an operand to 'typeid'
|
||||
#endif
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
using namespace joblist;
|
||||
|
||||
|
||||
void projectSimpleColumn(const SimpleColumn* sc, JobStepVector& jsv, JobInfo& jobInfo)
|
||||
{
|
||||
if (sc == NULL)
|
||||
@ -2346,3 +2352,6 @@ SJLP JobListFactory::makeJobList(
|
||||
}
|
||||
// vim:ts=4 sw=4:
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
@ -147,7 +147,6 @@ pColScanStep::pColScanStep(
|
||||
return;
|
||||
|
||||
int err, i, mask;
|
||||
BRM::LBIDRange_v::iterator it;
|
||||
|
||||
finishedSending = false;
|
||||
recvWaiting = 0;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* @file
|
||||
*/
|
||||
#ifndef JOBLIST_RESOURCEDISTRIBUTER_H
|
||||
#define JOBLIST_RESOURCEMANAGER_H
|
||||
#define JOBLIST_RESOURCEDISTRIBUTER_H
|
||||
|
||||
#include <unistd.h>
|
||||
#include <list>
|
||||
|
@ -153,7 +153,6 @@ uint32_t RowEstimator::estimateDistinctValues(const execplan::CalpontSystemCatal
|
||||
{
|
||||
switch (ct.colDataType)
|
||||
{
|
||||
|
||||
case CalpontSystemCatalog::BIT:
|
||||
return 2;
|
||||
|
||||
|
@ -117,7 +117,8 @@ void VirtualTable::addColumn(const SRCP& column)
|
||||
}
|
||||
else // new column type has added, but this code is not updated.
|
||||
{
|
||||
oss << "not supported column type: " << typeid(*(column.get())).name();
|
||||
auto & columnType = *(column.get());
|
||||
oss << "not supported column type: " << typeid(columnType).name();
|
||||
throw runtime_error(oss.str());
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
/** @brief
|
||||
The name that will be used for display purposes.
|
||||
*/
|
||||
const char* table_type() const
|
||||
const char* table_type() const override
|
||||
{
|
||||
return "ColumnStore";
|
||||
}
|
||||
@ -85,7 +85,7 @@ public:
|
||||
This is a list of flags that indicate what functionality the storage engine
|
||||
implements. The current table flags are documented in handler.h
|
||||
*/
|
||||
ulonglong table_flags() const
|
||||
ulonglong table_flags() const override
|
||||
{
|
||||
return int_table_flags;
|
||||
}
|
||||
@ -100,7 +100,7 @@ public:
|
||||
If all_parts is set, MySQL wants to know the flags for the combined
|
||||
index, up to and including 'part'.
|
||||
*/
|
||||
ulong index_flags(uint32_t inx, uint32_t part, bool all_parts) const
|
||||
ulong index_flags(uint32_t inx, uint32_t part, bool all_parts) const override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -113,7 +113,7 @@ public:
|
||||
send. Return *real* limits of your storage engine here; MySQL will do
|
||||
min(your_limits, MySQL_limits) automatically.
|
||||
*/
|
||||
uint32_t max_supported_record_length() const
|
||||
uint32_t max_supported_record_length() const override
|
||||
{
|
||||
return HA_MAX_REC_LENGTH;
|
||||
}
|
||||
@ -121,7 +121,7 @@ public:
|
||||
/** @brief
|
||||
Called in test_quick_select to determine if indexes should be used.
|
||||
*/
|
||||
virtual double scan_time()
|
||||
virtual double scan_time() override
|
||||
{
|
||||
return (double) (stats.records + stats.deleted) / 20.0 + 10;
|
||||
}
|
||||
@ -129,7 +129,7 @@ public:
|
||||
/** @brief
|
||||
Analyze table command.
|
||||
*/
|
||||
int analyze(THD* thd, HA_CHECK_OPT* check_opt);
|
||||
int analyze(THD* thd, HA_CHECK_OPT* check_opt) override;
|
||||
|
||||
/*
|
||||
Everything below are methods that we implement in ha_example.cc.
|
||||
@ -141,7 +141,7 @@ public:
|
||||
/** @brief
|
||||
We implement this in ha_example.cc; it's a required method.
|
||||
*/
|
||||
int open(const char* name, int mode, uint32_t test_if_locked); // required
|
||||
int open(const char* name, int mode, uint32_t test_if_locked) override; // required
|
||||
|
||||
// MCOL-4282 This function is called by open_tables in sql_base.cc.
|
||||
// We mutate the optimizer flags here for prepared statements as this
|
||||
@ -160,71 +160,71 @@ public:
|
||||
/** @brief
|
||||
We implement this in ha_example.cc; it's a required method.
|
||||
*/
|
||||
int close(void); // required
|
||||
int close(void) override; // required
|
||||
|
||||
/** @brief
|
||||
We implement this in ha_example.cc. It's not an obligatory method;
|
||||
skip it and and MySQL will treat it as not implemented.
|
||||
*/
|
||||
int write_row(const uchar* buf);
|
||||
int write_row(const uchar* buf) override;
|
||||
|
||||
/** @brief
|
||||
We implement this in ha_example.cc. It's not an obligatory method;
|
||||
skip it and and MySQL will treat it as not implemented.
|
||||
*/
|
||||
void start_bulk_insert(ha_rows rows, uint flags = 0) ;
|
||||
void start_bulk_insert(ha_rows rows, uint flags = 0) override;
|
||||
void start_bulk_insert_from_cache(ha_rows rows, uint flags = 0);
|
||||
|
||||
/**@bug 2461 - Overloaded end_bulk_insert. MariaDB uses the abort bool, mysql does not. */
|
||||
int end_bulk_insert() ;
|
||||
int end_bulk_insert() override;
|
||||
|
||||
/** @brief
|
||||
We implement this in ha_example.cc. It's not an obligatory method;
|
||||
skip it and and MySQL will treat it as not implemented.
|
||||
*/
|
||||
int update_row(const uchar* old_data, const uchar* new_data) override;
|
||||
int direct_update_rows_init(List<Item> *update_fields);
|
||||
int direct_update_rows_init(List<Item> *update_fields) override;
|
||||
int direct_update_rows(ha_rows *update_rows);
|
||||
int direct_update_rows(ha_rows *update_rows, ha_rows *found_rows);
|
||||
int direct_update_rows(ha_rows *update_rows, ha_rows *found_rows) override;
|
||||
|
||||
/** @brief
|
||||
We implement this in ha_example.cc. It's not an obligatory method;
|
||||
skip it and and MySQL will treat it as not implemented.
|
||||
*/
|
||||
int delete_row(const uchar* buf);
|
||||
int direct_delete_rows_init();
|
||||
int direct_delete_rows(ha_rows *deleted_rows);
|
||||
int delete_row(const uchar* buf) override;
|
||||
int direct_delete_rows_init() override;
|
||||
int direct_delete_rows(ha_rows *deleted_rows) override;
|
||||
|
||||
/** @brief
|
||||
We implement this in ha_example.cc. It's not an obligatory method;
|
||||
skip it and and MySQL will treat it as not implemented.
|
||||
*/
|
||||
int index_read_map(uchar* buf, const uchar* key,
|
||||
key_part_map keypart_map, enum ha_rkey_function find_flag);
|
||||
key_part_map keypart_map, enum ha_rkey_function find_flag) override;
|
||||
|
||||
/** @brief
|
||||
We implement this in ha_example.cc. It's not an obligatory method;
|
||||
skip it and and MySQL will treat it as not implemented.
|
||||
*/
|
||||
int index_next(uchar* buf);
|
||||
int index_next(uchar* buf) override;
|
||||
|
||||
/** @brief
|
||||
We implement this in ha_example.cc. It's not an obligatory method;
|
||||
skip it and and MySQL will treat it as not implemented.
|
||||
*/
|
||||
int index_prev(uchar* buf);
|
||||
int index_prev(uchar* buf) override;
|
||||
|
||||
/** @brief
|
||||
We implement this in ha_example.cc. It's not an obligatory method;
|
||||
skip it and and MySQL will treat it as not implemented.
|
||||
*/
|
||||
int index_first(uchar* buf);
|
||||
int index_first(uchar* buf) override;
|
||||
|
||||
/** @brief
|
||||
We implement this in ha_example.cc. It's not an obligatory method;
|
||||
skip it and and MySQL will treat it as not implemented.
|
||||
*/
|
||||
int index_last(uchar* buf);
|
||||
int index_last(uchar* buf) override;
|
||||
|
||||
/** @brief
|
||||
Unlike index_init(), rnd_init() can be called two consecutive times
|
||||
@ -234,34 +234,34 @@ public:
|
||||
cursor to the start of the table; no need to deallocate and allocate
|
||||
it again. This is a required method.
|
||||
*/
|
||||
int rnd_init(bool scan); //required
|
||||
int rnd_end();
|
||||
int rnd_next(uchar* buf); ///< required
|
||||
int rnd_pos(uchar* buf, uchar* pos); ///< required
|
||||
int rnd_init(bool scan) override; //required
|
||||
int rnd_end() override;
|
||||
int rnd_next(uchar* buf) override; ///< required
|
||||
int rnd_pos(uchar* buf, uchar* pos) override; ///< required
|
||||
int reset() override;
|
||||
void position(const uchar* record); ///< required
|
||||
int info(uint32_t); ///< required
|
||||
int extra(enum ha_extra_function operation);
|
||||
int external_lock(THD* thd, int lock_type); ///< required
|
||||
int delete_all_rows(void);
|
||||
void position(const uchar* record) override; ///< required
|
||||
int info(uint32_t) override; ///< required
|
||||
int extra(enum ha_extra_function operation) override;
|
||||
int external_lock(THD* thd, int lock_type) override; ///< required
|
||||
int delete_all_rows(void) override;
|
||||
ha_rows records_in_range(uint32_t inx, const key_range* min_key,
|
||||
const key_range* max_key, page_range* res) override;
|
||||
int delete_table(const char* from);
|
||||
int rename_table(const char* from, const char* to);
|
||||
int delete_table(const char* from) override;
|
||||
int rename_table(const char* from, const char* to) override;
|
||||
int create(const char* name, TABLE* form,
|
||||
HA_CREATE_INFO* create_info); ///< required
|
||||
HA_CREATE_INFO* create_info) override; ///< required
|
||||
|
||||
THR_LOCK_DATA** store_lock(THD* thd, THR_LOCK_DATA** to,
|
||||
enum thr_lock_type lock_type); ///< required
|
||||
const COND* cond_push(const COND* cond);
|
||||
enum thr_lock_type lock_type) override; ///< required
|
||||
const COND* cond_push(const COND* cond) override;
|
||||
void cond_pop() override;
|
||||
uint8 table_cache_type()
|
||||
uint8 table_cache_type() override
|
||||
{
|
||||
return HA_CACHE_TBL_NOCACHE;
|
||||
}
|
||||
|
||||
int repair(THD* thd, HA_CHECK_OPT* check_opt);
|
||||
bool is_crashed() const;
|
||||
int repair(THD* thd, HA_CHECK_OPT* check_opt) override;
|
||||
bool is_crashed() const override;
|
||||
|
||||
bool isReadOnly() const
|
||||
{
|
||||
|
@ -32,9 +32,10 @@ class StoreFieldMariaDB: public StoreField
|
||||
Field *m_field;
|
||||
const CalpontSystemCatalog::ColType &m_type;
|
||||
public:
|
||||
StoreFieldMariaDB(Field *f, CalpontSystemCatalog::ColType &type)
|
||||
StoreFieldMariaDB(Field *f, const CalpontSystemCatalog::ColType &type)
|
||||
:m_field(f), m_type(type)
|
||||
{ }
|
||||
|
||||
const CalpontSystemCatalog::ColType &type() const { return m_type; }
|
||||
int32_t colWidth() const override { return m_type.colWidth; }
|
||||
int32_t precision() const override { return m_type.precision; }
|
||||
|
@ -169,8 +169,6 @@ static const string interval_names[] =
|
||||
"second_microsecond"
|
||||
};
|
||||
|
||||
const unsigned NONSUPPORTED_ERR_THRESH = 2000;
|
||||
|
||||
// HDFS is never used nowadays, so don't bother
|
||||
bool useHdfs = false; // ResourceManager::instance()->useHdfs();
|
||||
|
||||
|
@ -118,7 +118,7 @@ public:
|
||||
int init_scan() override;
|
||||
int next_row() override;
|
||||
int end_scan() override;
|
||||
void print_error(int, unsigned long);
|
||||
void print_error(int, unsigned long) override;
|
||||
};
|
||||
|
||||
/*@brief select_handler class*/
|
||||
|
@ -63,7 +63,6 @@ namespace
|
||||
typedef messageqcpp::ByteStream::quadbyte quadbyte;
|
||||
|
||||
const quadbyte UNRECOGNIZED_PACKAGE_TYPE = 100;
|
||||
const quadbyte NO_PKNAME_AVAILABLE = 101;
|
||||
|
||||
const std::string DDLProcName = "DDLProc";
|
||||
|
||||
|
@ -19,8 +19,6 @@
|
||||
//
|
||||
|
||||
#include <unistd.h>
|
||||
using namespace std;
|
||||
|
||||
#include <boost/thread/mutex.hpp>
|
||||
using namespace boost;
|
||||
|
||||
|
@ -255,18 +255,6 @@ struct FdCountEntry
|
||||
uint16_t segNum;
|
||||
uint32_t cnt;
|
||||
FdCacheType_t::iterator fdit;
|
||||
|
||||
friend ostream& operator<<(ostream& out, const FdCountEntry& o)
|
||||
{
|
||||
out << " o: " << o.oid
|
||||
<< " d: " << o.dbroot
|
||||
<< " p: " << o.partNum
|
||||
<< " s: " << o.segNum
|
||||
<< " c: " << o.cnt;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
}; // FdCountEntry
|
||||
|
||||
typedef FdCountEntry FdCountEntry_t;
|
||||
|
@ -950,87 +950,6 @@ inline int64_t nextColValue(int type,
|
||||
}
|
||||
|
||||
|
||||
// done should be init'd to false and
|
||||
// index should be init'd to 0 on the first call
|
||||
// done == true when there are no more elements to return.
|
||||
inline uint64_t nextUnsignedColValueHelper(int type,
|
||||
int width,
|
||||
const uint16_t* ridArray,
|
||||
int NVALS,
|
||||
int* index,
|
||||
bool* done,
|
||||
bool* isNull,
|
||||
bool* isEmpty,
|
||||
uint16_t* rid,
|
||||
uint8_t OutputType, uint8_t* val8, unsigned itemsPerBlk)
|
||||
{
|
||||
switch (width)
|
||||
{
|
||||
case 8:
|
||||
return nextUnsignedColValue<8>(type, ridArray, NVALS, index, done, isNull, isEmpty, rid, OutputType, val8,
|
||||
itemsPerBlk);
|
||||
|
||||
case 4:
|
||||
return nextUnsignedColValue<4>(type, ridArray, NVALS, index, done, isNull, isEmpty, rid, OutputType, val8,
|
||||
itemsPerBlk);
|
||||
|
||||
case 2:
|
||||
return nextUnsignedColValue<2>(type, ridArray, NVALS, index, done, isNull, isEmpty, rid, OutputType, val8,
|
||||
itemsPerBlk);
|
||||
|
||||
case 1:
|
||||
return nextUnsignedColValue<1>(type, ridArray, NVALS, index, done, isNull, isEmpty, rid, OutputType, val8,
|
||||
itemsPerBlk);
|
||||
|
||||
default:
|
||||
idbassert(0);
|
||||
}
|
||||
|
||||
/*NOTREACHED*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
// done should be init'd to false and
|
||||
// index should be init'd to 0 on the first call
|
||||
// done == true when there are no more elements to return.
|
||||
inline int64_t nextColValueHelper(int type,
|
||||
int width,
|
||||
const uint16_t* ridArray,
|
||||
int NVALS,
|
||||
int* index,
|
||||
bool* done,
|
||||
bool* isNull,
|
||||
bool* isEmpty,
|
||||
uint16_t* rid,
|
||||
uint8_t OutputType, uint8_t* val8, unsigned itemsPerBlk)
|
||||
{
|
||||
switch (width)
|
||||
{
|
||||
case 8:
|
||||
return nextColValue<8>(type, ridArray, NVALS, index, done, isNull, isEmpty, rid, OutputType, val8,
|
||||
itemsPerBlk);
|
||||
|
||||
case 4:
|
||||
return nextColValue<4>(type, ridArray, NVALS, index, done, isNull, isEmpty, rid, OutputType, val8,
|
||||
itemsPerBlk);
|
||||
|
||||
case 2:
|
||||
return nextColValue<2>(type, ridArray, NVALS, index, done, isNull, isEmpty, rid, OutputType, val8,
|
||||
itemsPerBlk);
|
||||
|
||||
case 1:
|
||||
return nextColValue<1>(type, ridArray, NVALS, index, done, isNull, isEmpty, rid, OutputType, val8,
|
||||
itemsPerBlk);
|
||||
|
||||
default:
|
||||
idbassert(0);
|
||||
}
|
||||
|
||||
/*NOTREACHED*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<int W>
|
||||
inline void p_Col_ridArray(NewColRequestHeader* in,
|
||||
NewColResultHeader* out,
|
||||
|
@ -405,8 +405,6 @@ again:
|
||||
|
||||
dict_OffsetIndex++;
|
||||
}
|
||||
const char backslash = '\\';
|
||||
|
||||
|
||||
void PrimitiveProcessor::p_Dictionary(const DictInput* in,
|
||||
vector<uint8_t>* out,
|
||||
|
@ -1016,7 +1016,8 @@ ColumnCommand* ColumnCommandFabric::createCommand(messageqcpp::ByteStream& bs)
|
||||
break;
|
||||
|
||||
default:
|
||||
throw NotImplementedExcept("ColumnCommandFabric::createCommand: unsupported width " + colType.colWidth);
|
||||
throw NotImplementedExcept(std::string("ColumnCommandFabric::createCommand: unsupported width ")
|
||||
+ std::to_string(colType.colWidth));
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
@ -1024,31 +1025,32 @@ ColumnCommand* ColumnCommandFabric::createCommand(messageqcpp::ByteStream& bs)
|
||||
|
||||
ColumnCommand* ColumnCommandFabric::duplicate(const ColumnCommandUniquePtr& rhs)
|
||||
{
|
||||
if (LIKELY(typeid(*rhs) == typeid(ColumnCommandInt64)))
|
||||
auto & command = *rhs;
|
||||
if (LIKELY(typeid(command) == typeid(ColumnCommandInt64)))
|
||||
{
|
||||
ColumnCommandInt64* ret = new ColumnCommandInt64();
|
||||
*ret = *dynamic_cast<ColumnCommandInt64*>(rhs.get());
|
||||
return ret;
|
||||
}
|
||||
else if (typeid(*rhs) == typeid(ColumnCommandInt128))
|
||||
else if (typeid(command) == typeid(ColumnCommandInt128))
|
||||
{
|
||||
ColumnCommandInt128* ret = new ColumnCommandInt128();
|
||||
*ret = *dynamic_cast<ColumnCommandInt128*>(rhs.get());
|
||||
return ret;
|
||||
}
|
||||
else if (typeid(*rhs) == typeid(ColumnCommandInt8))
|
||||
else if (typeid(command) == typeid(ColumnCommandInt8))
|
||||
{
|
||||
ColumnCommandInt8* ret = new ColumnCommandInt8();
|
||||
*ret = *dynamic_cast<ColumnCommandInt8*>(rhs.get());
|
||||
return ret;
|
||||
}
|
||||
else if (typeid(*rhs) == typeid(ColumnCommandInt16))
|
||||
else if (typeid(command) == typeid(ColumnCommandInt16))
|
||||
{
|
||||
ColumnCommandInt16* ret = new ColumnCommandInt16();
|
||||
*ret = *dynamic_cast<ColumnCommandInt16*>(rhs.get());
|
||||
return ret;
|
||||
}
|
||||
else if (typeid(*rhs) == typeid(ColumnCommandInt32))
|
||||
else if (typeid(command) == typeid(ColumnCommandInt32))
|
||||
{
|
||||
ColumnCommandInt32* ret = new ColumnCommandInt32();
|
||||
*ret = *dynamic_cast<ColumnCommandInt32*>(rhs.get());
|
||||
|
@ -147,7 +147,6 @@ uint32_t lowPriorityThreads;
|
||||
int directIOFlag = O_DIRECT;
|
||||
int noVB = 0;
|
||||
|
||||
const uint8_t fMaxColWidth(8);
|
||||
BPPMap bppMap;
|
||||
boost::mutex bppLock;
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
#ifndef READTASK_H_
|
||||
#define READTASH_H_
|
||||
#define READTASK_H_
|
||||
|
||||
#include "PosixTask.h"
|
||||
|
||||
|
@ -199,17 +199,17 @@ bool opentask(bool connectionTest=false)
|
||||
open_cmd *cmd = (open_cmd *) &hdr[1];
|
||||
string testFile = "metadataJournalTest";
|
||||
// open/create a file named 'opentest1'
|
||||
const char *filename = string(homepath.string()+"/"+prefix+"/"+testFile).c_str();
|
||||
std::string filename = homepath.string()+"/"+prefix+"/"+testFile;
|
||||
hdr->type = SM_MSG_START;
|
||||
hdr->flags = 0;
|
||||
hdr->payloadLen = sizeof(*cmd) + strlen(filename);
|
||||
hdr->payloadLen = sizeof(*cmd) + filename.size();
|
||||
cmd->opcode = OPEN;
|
||||
cmd->openmode = O_WRONLY | O_CREAT;
|
||||
cmd->flen = 19;
|
||||
strcpy((char *) cmd->filename, filename);
|
||||
strcpy((char *) cmd->filename, filename.c_str());
|
||||
|
||||
cout << "open file " << filename << endl;
|
||||
::unlink(filename);
|
||||
::unlink(filename.c_str());
|
||||
|
||||
// set payload to be shorter than actual message lengh
|
||||
// and send a shortened message.
|
||||
|
@ -95,7 +95,6 @@ const HexLookupTable hex_lookup_table = init_hex_lookup_table();
|
||||
|
||||
/* used in the bin2hex function */
|
||||
const char hex_upper[] = "0123456789ABCDEF";
|
||||
const char hex_lower[] = "0123456789abcdef";
|
||||
|
||||
HexLookupTable init_hex_lookup_table() noexcept
|
||||
{
|
||||
|
@ -21,6 +21,11 @@
|
||||
|
||||
using namespace idbdatafile;
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
|
||||
#endif
|
||||
|
||||
extern "C"
|
||||
{
|
||||
FileFactoryEnt plugin_instance()
|
||||
@ -28,3 +33,7 @@ extern "C"
|
||||
return FileFactoryEnt(IDBDataFile::CLOUD, "cloud", new SMFileFactory(), new SMFileSystem());
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <list>
|
||||
#include <stdint.h>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
@ -102,7 +103,7 @@ public:
|
||||
};
|
||||
|
||||
SimpleAllocator() throw() {}
|
||||
SimpleAllocator(boost::shared_ptr<SimplePool> pool) throw()
|
||||
SimpleAllocator(std::shared_ptr<SimplePool> pool) throw()
|
||||
{
|
||||
fPool = pool;
|
||||
}
|
||||
@ -158,10 +159,10 @@ public:
|
||||
|
||||
inline void setPool(SimplePool* pool)
|
||||
{
|
||||
fPool = pool;
|
||||
fPool.reset(pool);
|
||||
}
|
||||
|
||||
boost::shared_ptr<SimplePool> fPool;
|
||||
std::shared_ptr<SimplePool> fPool;
|
||||
};
|
||||
|
||||
|
||||
|
@ -45,32 +45,16 @@ using namespace std;
|
||||
namespace
|
||||
{
|
||||
const uint64_t MAGIC_NUMBER = 0xfdc119a384d0778eULL;
|
||||
const uint64_t VERSION_NUM1 = 1;
|
||||
const uint64_t VERSION_NUM2 = 2;
|
||||
const uint64_t VERSION_NUM3 = 3;
|
||||
const int PTR_SECTION_OFFSET = compress::CompressInterface::HDR_BUF_LEN;
|
||||
|
||||
|
||||
// version 1.1 of the chunk data has a short header
|
||||
// QuickLZ compressed data never has the high bit set on the first byte
|
||||
const uint8_t CHUNK_MAGIC1 = 0xff;
|
||||
const int SIG_OFFSET = 0;
|
||||
const int CHECKSUM_OFFSET = 1;
|
||||
const int LEN_OFFSET = 5;
|
||||
const unsigned HEADER_SIZE = 9;
|
||||
|
||||
/* version 1.2 of the chunk data changes the hash function used to calculate
|
||||
* checksums. We can no longer use the algorithm used in ver 1.1. Everything
|
||||
* else is the same
|
||||
*/
|
||||
const uint8_t CHUNK_MAGIC2 = 0xfe;
|
||||
|
||||
/* version 2.0 of the chunk data uses a new compression algo. For us, because of
|
||||
* the finite number of block sizes we compress, the first byte of the compressed
|
||||
* data will always be 0x80, so it can't be confused with V1.0 data (that has no
|
||||
* header).
|
||||
*/
|
||||
const uint8_t CHUNK_MAGIC3 = 0xfd;
|
||||
|
||||
// The max number of lbids to be stored in segment file.
|
||||
const uint32_t LBID_MAX_SIZE = 10;
|
||||
|
||||
|
@ -1532,8 +1532,8 @@ DataConvert::StringToFloat(cscDataType typeCode,
|
||||
|
||||
if (floatvalue < 0.0 &&
|
||||
typeCode == datatypes::SystemCatalog::UFLOAT &&
|
||||
floatvalue != joblist::FLOATEMPTYROW &&
|
||||
floatvalue != joblist::FLOATNULL)
|
||||
floatvalue != static_cast<float>(joblist::FLOATEMPTYROW) &&
|
||||
floatvalue != static_cast<float>(joblist::FLOATNULL))
|
||||
{
|
||||
value = 0.0; // QQ: should it assign floatvalue?
|
||||
pushWarning = true;
|
||||
@ -1595,8 +1595,8 @@ DataConvert::StringToDouble(cscDataType typeCode,
|
||||
|
||||
if (doublevalue < 0.0 &&
|
||||
typeCode == datatypes::SystemCatalog::UDOUBLE &&
|
||||
doublevalue != joblist::DOUBLEEMPTYROW &&
|
||||
doublevalue != joblist::DOUBLENULL)
|
||||
doublevalue != static_cast<double>(joblist::DOUBLEEMPTYROW) &&
|
||||
doublevalue != static_cast<double>(joblist::DOUBLENULL))
|
||||
{
|
||||
doublevalue = 0.0; // QQ: should it assign "value" ?
|
||||
pushWarning = true;
|
||||
|
@ -1111,11 +1111,11 @@ struct Time
|
||||
signed is_neg : 1;
|
||||
|
||||
// NULL column value = 0xFFFFFFFFFFFFFFFE
|
||||
Time() : msecond (0xFFFFFE),
|
||||
second (0xFF),
|
||||
minute (0xFF),
|
||||
hour (0xFFF),
|
||||
day (0x7FF),
|
||||
Time() : msecond (-2),
|
||||
second (-1),
|
||||
minute (-1),
|
||||
hour (-1),
|
||||
day (-1),
|
||||
is_neg (0b1)
|
||||
{}
|
||||
|
||||
@ -1143,12 +1143,12 @@ struct Time
|
||||
inline
|
||||
void Time::reset()
|
||||
{
|
||||
msecond = 0xFFFFFE;
|
||||
second = 0xFF;
|
||||
minute = 0xFF;
|
||||
hour = 0xFFF;
|
||||
msecond = -2;
|
||||
second = -1;
|
||||
minute = -1;
|
||||
hour = -1;
|
||||
is_neg = 0b1;
|
||||
day = 0x7FF;
|
||||
day = -1;
|
||||
}
|
||||
|
||||
inline
|
||||
|
@ -128,7 +128,7 @@ long long dateGet( uint64_t time, IntervalColumn::interval_type unit, bool dateT
|
||||
return (sec * 1000000) + msec;
|
||||
|
||||
default:
|
||||
throw runtime_error("unit type is not supported: " + unit);
|
||||
throw runtime_error(std::string("unit type is not supported: ") + std::to_string(unit));
|
||||
};
|
||||
}
|
||||
|
||||
@ -215,13 +215,11 @@ long long timeGet( uint64_t time, IntervalColumn::interval_type unit )
|
||||
return (sec * 1000000) + msec;
|
||||
|
||||
default:
|
||||
throw runtime_error("unit type is not supported: " + unit);
|
||||
};
|
||||
throw runtime_error(std::string("unit type is not supported: ") + std::to_string(unit));
|
||||
}; };
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace funcexp
|
||||
{
|
||||
|
||||
|
@ -369,7 +369,7 @@ public:
|
||||
uint64_t getUintVal(rowgroup::Row& row,
|
||||
FunctionParm& fp,
|
||||
bool& isNull,
|
||||
execplan::CalpontSystemCatalog::ColType& op_ct);
|
||||
execplan::CalpontSystemCatalog::ColType& op_ct) override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -155,14 +155,12 @@ private:
|
||||
config::Config* fConfig; /// config file ptr
|
||||
};
|
||||
|
||||
}//namespace logging
|
||||
|
||||
namespace std
|
||||
{
|
||||
template<> inline void swap<logging::Message>(logging::Message& lhs, logging::Message& rhs)
|
||||
inline void swap(logging::Message& lhs, logging::Message& rhs)
|
||||
{
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
}//namespace std
|
||||
|
||||
}//namespace logging
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -51,68 +51,6 @@ inline double cvtArgToDouble(int t, const char* v)
|
||||
|
||||
return d;
|
||||
}
|
||||
inline long long cvtArgToInt(int t, const char* v)
|
||||
{
|
||||
long long ll = 0;
|
||||
|
||||
switch (t)
|
||||
{
|
||||
case INT_RESULT:
|
||||
ll = *((long long*)v);
|
||||
break;
|
||||
|
||||
case REAL_RESULT:
|
||||
ll = (long long)(*((double*)v));
|
||||
break;
|
||||
|
||||
case DECIMAL_RESULT:
|
||||
case STRING_RESULT:
|
||||
ll = strtoll(v, 0, 0);
|
||||
break;
|
||||
|
||||
case ROW_RESULT:
|
||||
break;
|
||||
}
|
||||
|
||||
return ll;
|
||||
}
|
||||
inline string cvtArgToString(int t, const char* v)
|
||||
{
|
||||
string str;
|
||||
|
||||
switch (t)
|
||||
{
|
||||
case INT_RESULT:
|
||||
{
|
||||
long long ll;
|
||||
ll = *((long long*)v);
|
||||
ostringstream oss;
|
||||
oss << ll;
|
||||
str = oss.str();
|
||||
break;
|
||||
}
|
||||
|
||||
case REAL_RESULT:
|
||||
{
|
||||
double d;
|
||||
d = *((double*)v);
|
||||
ostringstream oss;
|
||||
oss << d;
|
||||
str = oss.str();
|
||||
break;
|
||||
}
|
||||
|
||||
case DECIMAL_RESULT:
|
||||
case STRING_RESULT:
|
||||
str = v;
|
||||
break;
|
||||
|
||||
case ROW_RESULT:
|
||||
break;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -18,6 +18,7 @@
|
||||
#ifndef ROWSTORAGE_H
|
||||
#define ROWSTORAGE_H
|
||||
|
||||
#include "resourcemanager.h"
|
||||
#include "rowgroup.h"
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
@ -33,68 +33,6 @@ inline double cvtArgToDouble(int t, const char* v)
|
||||
|
||||
return d;
|
||||
}
|
||||
inline long long cvtArgToInt(int t, const char* v)
|
||||
{
|
||||
long long ll = 0;
|
||||
|
||||
switch (t)
|
||||
{
|
||||
case INT_RESULT:
|
||||
ll = *((long long*)v);
|
||||
break;
|
||||
|
||||
case REAL_RESULT:
|
||||
ll = (long long)(*((double*)v));
|
||||
break;
|
||||
|
||||
case DECIMAL_RESULT:
|
||||
case STRING_RESULT:
|
||||
ll = strtoll(v, 0, 0);
|
||||
break;
|
||||
|
||||
case ROW_RESULT:
|
||||
break;
|
||||
}
|
||||
|
||||
return ll;
|
||||
}
|
||||
inline string cvtArgToString(int t, const char* v)
|
||||
{
|
||||
string str;
|
||||
|
||||
switch (t)
|
||||
{
|
||||
case INT_RESULT:
|
||||
{
|
||||
long long ll;
|
||||
ll = *((long long*)v);
|
||||
ostringstream oss;
|
||||
oss << ll;
|
||||
str = oss.str();
|
||||
break;
|
||||
}
|
||||
|
||||
case REAL_RESULT:
|
||||
{
|
||||
double d;
|
||||
d = *((double*)v);
|
||||
ostringstream oss;
|
||||
oss << d;
|
||||
str = oss.str();
|
||||
break;
|
||||
}
|
||||
|
||||
case DECIMAL_RESULT:
|
||||
case STRING_RESULT:
|
||||
str = v;
|
||||
break;
|
||||
|
||||
case ROW_RESULT:
|
||||
break;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1194,9 +1194,6 @@ void WF_udaf::operator()(int64_t b, int64_t e, int64_t c)
|
||||
|
||||
fPrev = c;
|
||||
}
|
||||
|
||||
boost::shared_ptr<WindowFunctionType> WF_udaf::makeFunction(int id, const string& name, int ct, mcsv1sdk::mcsv1Context& context, WindowFunctionColumn*);
|
||||
|
||||
} //namespace
|
||||
// vim:ts=4 sw=4:
|
||||
|
||||
|
@ -70,14 +70,17 @@ public:
|
||||
{
|
||||
return fUDAFContext;
|
||||
}
|
||||
|
||||
bool getInterrupted()
|
||||
{
|
||||
return bInterrupted;
|
||||
}
|
||||
|
||||
bool * getInterruptedPtr()
|
||||
{
|
||||
return &bInterrupted;
|
||||
}
|
||||
|
||||
bool getDistinct()
|
||||
{
|
||||
return fDistinct;
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
// The param noBRMFcns suppresses init of the ExtentMap, VSS, VBBM, and CopyLocks.
|
||||
// It can speed up init if the caller only needs the other structures.
|
||||
EXPORT DBRM(bool noBRMFcns = false);
|
||||
EXPORT ~DBRM();
|
||||
EXPORT ~DBRM() throw();
|
||||
|
||||
EXPORT static void refreshShm()
|
||||
{
|
||||
|
@ -81,7 +81,7 @@ void LBIDResourceGraph::connectResources(LBID_t start, LBID_t end,
|
||||
{
|
||||
vector<ResourceNode*> intersection, reserveList;
|
||||
RNodes_t::iterator sit;
|
||||
vector<ResourceNode*>::iterator it, next;
|
||||
vector<ResourceNode*>::iterator it;
|
||||
LBID_t i;
|
||||
|
||||
#if 0
|
||||
|
@ -34,7 +34,7 @@
|
||||
namespace WriteEngine
|
||||
{
|
||||
class Log;
|
||||
struct ColumnInfo;
|
||||
class ColumnInfo;
|
||||
|
||||
/** @brief A buffer class to store data written to column files
|
||||
*
|
||||
|
@ -37,7 +37,7 @@
|
||||
namespace WriteEngine
|
||||
{
|
||||
class Log;
|
||||
struct ColumnInfo;
|
||||
class ColumnInfo;
|
||||
|
||||
/** @brief A buffer class to store data written to compressed column files
|
||||
*
|
||||
|
@ -40,7 +40,7 @@ namespace WriteEngine
|
||||
{
|
||||
class Log;
|
||||
|
||||
struct ColumnInfo;
|
||||
class ColumnInfo;
|
||||
|
||||
/**
|
||||
* ColumnBufferManager class provides the functionality for multiple threads to
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
namespace WriteEngine
|
||||
{
|
||||
struct ColumnInfo;
|
||||
class ColumnInfo;
|
||||
class Log;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -487,7 +487,7 @@ public:
|
||||
|
||||
public:
|
||||
friend class BulkLoad;
|
||||
friend struct ColumnInfo;
|
||||
friend class ColumnInfo;
|
||||
friend class ColumnInfoCompressed;
|
||||
|
||||
};
|
||||
|
@ -165,18 +165,6 @@ struct QueueShutdown : public unary_function<T&, void>
|
||||
x.shutdown();
|
||||
}
|
||||
};
|
||||
|
||||
inline const string sin_addr2String(const in_addr src)
|
||||
{
|
||||
string s;
|
||||
#ifdef _MSC_VER
|
||||
s = inet_ntoa(src);
|
||||
#else
|
||||
char dst[INET_ADDRSTRLEN];
|
||||
s = inet_ntop(AF_INET, &src, dst, INET_ADDRSTRLEN);
|
||||
#endif
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
namespace WriteEngine
|
||||
|
@ -58,12 +58,8 @@ namespace
|
||||
// variable name later (to remove the m_ prefix) as time allows.
|
||||
const uint16_t m_endHeader = DCTNRY_END_HEADER; // end of header flag (0xffff)
|
||||
const uint16_t m_offSetZero = BYTE_PER_BLOCK; // value for 0 offset (8192)
|
||||
const int m_lastOffSet = BYTE_PER_BLOCK; // end of last offset
|
||||
const int m_totalHdrBytes = // # bytes in header
|
||||
HDR_UNIT_SIZE + NEXT_PTR_BYTES + HDR_UNIT_SIZE + HDR_UNIT_SIZE;
|
||||
const int m_bigSpace = // free space in an empty block
|
||||
BYTE_PER_BLOCK - (m_totalHdrBytes + HDR_UNIT_SIZE);
|
||||
|
||||
const int START_HDR1 = // start loc of 2nd offset (HDR1)
|
||||
HDR_UNIT_SIZE + NEXT_PTR_BYTES + HDR_UNIT_SIZE;
|
||||
const int PSEUDO_COL_WIDTH = DICT_COL_WIDTH; // used to convert row count to block count
|
||||
|
@ -75,9 +75,6 @@ using namespace idbdatafile;
|
||||
namespace redistribute
|
||||
{
|
||||
|
||||
// need be consistent with we_config.cpp
|
||||
const unsigned DEFAULT_FILES_PER_COLUMN_PARTITION = 4;
|
||||
|
||||
// static variables
|
||||
boost::mutex RedistributeWorkerThread::fActionMutex;
|
||||
volatile bool RedistributeWorkerThread::fStopAction = false;
|
||||
|
@ -19,7 +19,6 @@
|
||||
// $Id: we_dmlcommandproc.cpp 3082 2011-09-26 22:00:38Z chao $
|
||||
|
||||
#include <unistd.h>
|
||||
using namespace std;
|
||||
#include "bytestream.h"
|
||||
using namespace messageqcpp;
|
||||
|
||||
@ -54,6 +53,8 @@ using namespace BRM;
|
||||
#include "checks.h"
|
||||
#include "columnwidth.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace WriteEngine
|
||||
{
|
||||
//StopWatch timer;
|
||||
@ -1897,7 +1898,8 @@ uint8_t WE_DMLCommandProc::processBatchInsertBinary(messageqcpp::ByteStream& bs,
|
||||
bs >> val64;
|
||||
memcpy(&valD, &val64, 8);
|
||||
|
||||
if (valD < 0.0 && valD != joblist::DOUBLEEMPTYROW && valD != joblist::DOUBLENULL)
|
||||
if (valD < 0.0 && valD != static_cast<double>(joblist::DOUBLEEMPTYROW)
|
||||
&& valD != static_cast<double>(joblist::DOUBLENULL))
|
||||
{
|
||||
valD = 0.0;
|
||||
pushWarning = true;
|
||||
@ -1915,7 +1917,8 @@ uint8_t WE_DMLCommandProc::processBatchInsertBinary(messageqcpp::ByteStream& bs,
|
||||
bs >> val32;
|
||||
memcpy(&valF, &val32, 4);
|
||||
|
||||
if (valF < 0.0 && valF != joblist::FLOATEMPTYROW && valF != joblist::FLOATNULL)
|
||||
if (valF < 0.0 && valF != static_cast<float>(joblist::FLOATEMPTYROW)
|
||||
&& valF != static_cast<float>(joblist::FLOATNULL))
|
||||
{
|
||||
valF = 0.0;
|
||||
pushWarning = true;
|
||||
@ -2585,7 +2588,7 @@ uint8_t WE_DMLCommandProc::rollbackBatchAutoOn(messageqcpp::ByteStream& bs, std:
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
err = "No such table for oid " + tableOid;
|
||||
err = std::string("No such table for oid ") + std::to_string(tableOid);
|
||||
rc = 1;
|
||||
return rc;
|
||||
}
|
||||
@ -3847,7 +3850,7 @@ uint8_t WE_DMLCommandProc::processFlushFiles(messageqcpp::ByteStream& bs, std::s
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
err = "Systemcatalog error for tableoid " + tableOid;
|
||||
err = std::string("Systemcatalog error for tableoid ") + std::to_string(tableOid);
|
||||
rc = 1;
|
||||
return rc;
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ public:
|
||||
{
|
||||
log(logging::LOG_TYPE_CRITICAL, strerror(errno));
|
||||
}
|
||||
void ParentLogChildMessage(const std::string &str)
|
||||
void ParentLogChildMessage(const std::string &str) override
|
||||
{
|
||||
log(logging::LOG_TYPE_INFO, str);
|
||||
}
|
||||
|
@ -957,7 +957,7 @@ void WECmdArgs::parseCmdLineArgs(int argc, char** argv)
|
||||
|
||||
default:
|
||||
{
|
||||
std::string aErr = "Unknown command line option " + aCh;
|
||||
std::string aErr = std::string("Unknown command line option ") + std::to_string(aCh);
|
||||
//cout << "Unknown command line option " << aCh << endl;
|
||||
throw (runtime_error(aErr));
|
||||
}
|
||||
@ -1551,7 +1551,7 @@ unsigned int WECmdArgs::getBatchQuantity()
|
||||
|
||||
void WECmdArgs::setEnclByAndEscCharFromJobFile(std::string& JobName)
|
||||
{
|
||||
if ((fEnclosedChar == 0)) // check anything in Jobxml file
|
||||
if (fEnclosedChar == 0) // check anything in Jobxml file
|
||||
{
|
||||
WEXmlgetter aXmlGetter(JobName);
|
||||
vector<string> aSections;
|
||||
|
@ -742,7 +742,7 @@ void WESDHandler::setup()
|
||||
else
|
||||
{
|
||||
std::string aStr;
|
||||
aStr = "Encountered NULL WESplClient : " + PmId;
|
||||
aStr = std::string("Encountered NULL WESplClient : ") + std::to_string(PmId);
|
||||
cout << aStr << endl;
|
||||
fLog.logMsg( aStr, MSGLVL_ERROR );
|
||||
throw WESdHandlerException(aStr);
|
||||
@ -974,7 +974,7 @@ void WESDHandler::checkForConnections()
|
||||
if (aNow - fWeSplClients[PmId]->getLastInTime() > 180)
|
||||
{
|
||||
std::string aStr;
|
||||
aStr = "Heartbeats missed - Non Responsive PM" + PmId;
|
||||
aStr = std::string("Heartbeats missed - Non Responsive PM") + std::to_string(PmId);
|
||||
fLog.logMsg( aStr, MSGLVL_ERROR );
|
||||
fWeSplClients[PmId]->onDisconnect();
|
||||
exit(1); //Otherwise; have to wait till write() comes out
|
||||
|
@ -78,7 +78,7 @@ XMLGenData::XMLGenData( )
|
||||
br = Config::getBulkRoot();
|
||||
boost::filesystem::path p(br);
|
||||
#else
|
||||
boost::filesystem::path p( std::string(Config::getBulkRoot()) );
|
||||
boost::filesystem::path p{ std::string(Config::getBulkRoot()) };
|
||||
#endif
|
||||
p /= JOBDIR;
|
||||
fParms.insert(ParmList::value_type(PATH, p.string()));
|
||||
|
Reference in New Issue
Block a user