mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-04-18 21:44:02 +03:00
MCOL-271 empty strings should not be NULLs (#2794)
This patch improves handling of NULLs in textual fields in ColumnStore. Previously empty strings were considered NULLs and it could be a problem if data scheme allows for empty strings. It was also one of major reasons of behavior difference between ColumnStore and other engines in MariaDB family. Also, this patch fixes some other bugs and incorrect behavior, for example, incorrect comparison for "column <= ''" which evaluates to constant True for all purposes before this patch.
This commit is contained in:
parent
0ea592da80
commit
b53c231ca6
@ -320,9 +320,20 @@ local Pipeline(branch, platform, event, arch='amd64', server='10.6-enterprise')
|
||||
image: 'docker:git',
|
||||
volumes: [pipeline._volumes.docker, pipeline._volumes.mdb],
|
||||
environment: {
|
||||
REGRESSION_REF: '${REGRESSION_REF:-' + regression_ref + '}',
|
||||
REGRESSION_BRANCH_REF: '${DRONE_SOURCE_BRANCH}',
|
||||
REGRESSION_REF_AUX: regression_ref,
|
||||
},
|
||||
commands: [
|
||||
// compute branch.
|
||||
'echo "$$REGRESSION_REF"',
|
||||
'echo "$$REGRESSION_BRANCH_REF"',
|
||||
// if REGRESSION_REF is empty, try to see whether regression repository has a branch named as one we PR.
|
||||
'export REGRESSION_REF=$${REGRESSION_REF:-$$(git ls-remote https://github.com/mariadb-corporation/mariadb-columnstore-regression-test --h --sort origin "refs/heads/$$REGRESSION_BRANCH_REF" | grep -E -o "[^/]+$$")}',
|
||||
'echo "$$REGRESSION_REF"',
|
||||
// REGRESSION_REF can be empty if there is no appropriate branch in regression repository.
|
||||
// assign what is appropriate by default.
|
||||
'export REGRESSION_REF=$${REGRESSION_REF:-$$REGRESSION_REF_AUX}',
|
||||
'echo "$$REGRESSION_REF"',
|
||||
// clone regression test repo
|
||||
'git clone --recurse-submodules --branch $$REGRESSION_REF --depth 1 https://github.com/mariadb-corporation/mariadb-columnstore-regression-test',
|
||||
// where are we now?
|
||||
|
@ -58,6 +58,16 @@ int128_t SystemCatalog::TypeAttributesStd::decimal128FromString(const std::strin
|
||||
return result;
|
||||
}
|
||||
|
||||
int128_t SystemCatalog::TypeAttributesStd::decimal128FromString(const utils::NullString& value,
|
||||
bool* saturate) const
|
||||
{
|
||||
if (value.isNull())
|
||||
{
|
||||
return TSInt128::NullValue;
|
||||
}
|
||||
return decimal128FromString(value.unsafeStringRef(), saturate);
|
||||
}
|
||||
|
||||
const string& TypeHandlerSInt8::name() const
|
||||
{
|
||||
static const string xname = "TINYINT";
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "mcs_decimal.h"
|
||||
#include "mcs_double.h"
|
||||
#include "mcs_longdouble.h"
|
||||
#include "nullstring.h"
|
||||
|
||||
typedef int32_t mcs_sint32_t;
|
||||
|
||||
@ -241,6 +242,7 @@ class SystemCatalog
|
||||
@brief Convenience method to get int128 from a std::string.
|
||||
*/
|
||||
int128_t decimal128FromString(const std::string& value, bool* saturate = 0) const;
|
||||
int128_t decimal128FromString(const utils::NullString& value, bool* saturate = 0) const;
|
||||
|
||||
/**
|
||||
@brief The method sets the legacy scale and precision of a wide decimal
|
||||
|
@ -607,26 +607,45 @@ std::string Decimal::toStringTSInt64() const
|
||||
// Dispatcher method for toString() implementations
|
||||
std::string Decimal::toString(bool hasTSInt128) const
|
||||
{
|
||||
// There must be no empty at this point though
|
||||
if (isNull())
|
||||
utils::NullString result = toNullString(hasTSInt128);
|
||||
if (result.isNull())
|
||||
{
|
||||
return std::string("NULL");
|
||||
}
|
||||
return result.unsafeStringRef();
|
||||
}
|
||||
|
||||
utils::NullString Decimal::toNullString(bool hasTSInt128) const
|
||||
{
|
||||
// There must be no empty at this point though
|
||||
utils::NullString result;
|
||||
if (isNull())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string v;
|
||||
if (LIKELY(hasTSInt128 || isTSInt128ByPrecision()))
|
||||
{
|
||||
if (scale)
|
||||
{
|
||||
return toStringTSInt128WithScale();
|
||||
v = toStringTSInt128WithScale();
|
||||
}
|
||||
else
|
||||
{
|
||||
v = TSInt128::toString();
|
||||
}
|
||||
return TSInt128::toString();
|
||||
}
|
||||
// TSInt64 Decimal
|
||||
if (scale)
|
||||
else if (scale) // TSInt64 Decimal
|
||||
{
|
||||
return toStringTSInt64();
|
||||
v = toStringTSInt64();
|
||||
}
|
||||
return std::to_string(value);
|
||||
else
|
||||
{
|
||||
v = std::to_string(value);
|
||||
}
|
||||
result.assign(v);
|
||||
return result;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const Decimal& dec)
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "checks.h"
|
||||
#include "branchpred.h"
|
||||
#include "mcs_data_condition.h"
|
||||
#include "nullstring.h"
|
||||
|
||||
namespace datatypes
|
||||
{
|
||||
@ -811,6 +812,7 @@ class Decimal : public TDecimal128, public TDecimal64
|
||||
// where precision can't detect decimal type properly, e.g.
|
||||
// DECIMAL(10)/DECIMAL(38)
|
||||
std::string toString(bool hasTSInt128 = false) const;
|
||||
utils::NullString toNullString(bool hasTSInt128 = false) const;
|
||||
friend std::ostream& operator<<(std::ostream& os, const Decimal& dec);
|
||||
|
||||
int8_t scale; // 0~38
|
||||
|
@ -22,6 +22,7 @@
|
||||
***********************************************************************/
|
||||
|
||||
#include "calpontdmlpackage.h"
|
||||
#include "exceptclasses.h"
|
||||
using namespace std;
|
||||
|
||||
namespace dmlpackage
|
||||
|
@ -29,6 +29,7 @@ using namespace std;
|
||||
#define COMMANDDMLPKG_DLLEXPORT
|
||||
#include "commanddmlpackage.h"
|
||||
#undef COMMANDDMLPKG_DLLEXPORT
|
||||
#include "exceptclasses.h"
|
||||
namespace dmlpackage
|
||||
{
|
||||
CommandDMLPackage::CommandDMLPackage()
|
||||
|
@ -32,22 +32,17 @@ DMLColumn::DMLColumn()
|
||||
{
|
||||
}
|
||||
|
||||
DMLColumn::DMLColumn(std::string name, std::string value, bool isFromCol, uint32_t funcScale, bool isNULL)
|
||||
DMLColumn::DMLColumn(std::string name, utils::NullString& value, bool isFromCol,
|
||||
uint32_t funcScale, bool isNULL)
|
||||
{
|
||||
fName = name;
|
||||
fData = value;
|
||||
|
||||
if ((strcasecmp(value.c_str(), "NULL") == 0) || (value.length() == 0))
|
||||
{
|
||||
isNULL = true;
|
||||
}
|
||||
|
||||
fisNULL = isNULL;
|
||||
fColValuesList.push_back(value);
|
||||
fisNULL = isNULL || value.isNull() || (strcasecmp(value.str(), "NULL") == 0);
|
||||
fIsFromCol = isFromCol;
|
||||
fFuncScale = funcScale;
|
||||
}
|
||||
|
||||
DMLColumn::DMLColumn(std::string name, std::vector<std::string>& valueList, bool isFromCol,
|
||||
DMLColumn::DMLColumn(std::string name, const std::vector<utils::NullString>& valueList, bool isFromCol,
|
||||
uint32_t funcScale, bool isNULL)
|
||||
{
|
||||
fName = name;
|
||||
@ -69,25 +64,17 @@ int DMLColumn::read(messageqcpp::ByteStream& bytestream)
|
||||
uint32_t vectorSize;
|
||||
bytestream >> vectorSize;
|
||||
|
||||
if (vectorSize > 0)
|
||||
for (uint32_t i = 0; i < vectorSize; i++)
|
||||
{
|
||||
for (uint32_t i = 0; i < vectorSize; i++)
|
||||
{
|
||||
std::string dataStr;
|
||||
bytestream >> dataStr;
|
||||
// if ( !fisNULL && (dataStr.length() == 0 ))
|
||||
// dataStr = (char) 0;
|
||||
utils::NullString dataStr;
|
||||
bytestream >> dataStr;
|
||||
// if ( !fisNULL && (dataStr.length() == 0 ))
|
||||
// dataStr = (char) 0;
|
||||
|
||||
fColValuesList.push_back(dataStr);
|
||||
}
|
||||
fColValuesList.push_back(dataStr);
|
||||
}
|
||||
else
|
||||
bytestream >> fData; // deprecated.
|
||||
|
||||
if ((fColValuesList.size() < 1) && (fColValuesList.size() > 0)) // deprecated.
|
||||
fData = fColValuesList[0]; // deprecated.
|
||||
|
||||
// bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fisNULL);
|
||||
bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fIsFromCol);
|
||||
bytestream >> (uint32_t&)fFuncScale;
|
||||
return retval;
|
||||
@ -101,17 +88,11 @@ int DMLColumn::write(messageqcpp::ByteStream& bytestream)
|
||||
uint32_t vectorSize = fColValuesList.size();
|
||||
bytestream << vectorSize;
|
||||
|
||||
if (vectorSize > 0)
|
||||
for (uint32_t i = 0; i < vectorSize; i++)
|
||||
{
|
||||
for (uint32_t i = 0; i < vectorSize; i++)
|
||||
{
|
||||
bytestream << fColValuesList[i];
|
||||
}
|
||||
bytestream << fColValuesList[i];
|
||||
}
|
||||
else
|
||||
bytestream << fData; // deprecated.
|
||||
|
||||
// bytestream << static_cast<uint8_t>(fisNULL);
|
||||
bytestream << static_cast<uint8_t>(fIsFromCol);
|
||||
bytestream << (uint32_t)fFuncScale;
|
||||
return retval;
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "dmlobject.h"
|
||||
#include "bytestream.h"
|
||||
#include <boost/algorithm/string/case_conv.hpp>
|
||||
#include "nullstring.h"
|
||||
|
||||
#define EXPORT
|
||||
|
||||
@ -43,16 +44,18 @@ class DMLColumn : public DMLObject
|
||||
*/
|
||||
EXPORT DMLColumn();
|
||||
|
||||
/** @brief ctor
|
||||
*/
|
||||
|
||||
EXPORT DMLColumn(std::string name, std::string value, bool isFromCol = false, uint32_t funcScale = 0,
|
||||
bool isNULL = false);
|
||||
/** @brief new ctor
|
||||
* isNUll is currently not in use. It supposed to indicate whether each value is null or not.
|
||||
*/
|
||||
|
||||
EXPORT DMLColumn(std::string name, std::vector<std::string>& valueList, bool isFromCol = false,
|
||||
EXPORT DMLColumn(std::string name, const std::vector<utils::NullString>& valueList, bool isFromCol = false,
|
||||
uint32_t funcScale = 0, bool isNULL = false);
|
||||
|
||||
/** @brief new ctor
|
||||
*
|
||||
*/
|
||||
|
||||
EXPORT DMLColumn(std::string name, utils::NullString& value, bool isFromCol = false,
|
||||
uint32_t funcScale = 0, bool isNULL = false);
|
||||
|
||||
/** @brief dtor
|
||||
@ -73,12 +76,7 @@ class DMLColumn : public DMLObject
|
||||
|
||||
/** @brief get the data for the column
|
||||
*/
|
||||
const std::string get_Data() const
|
||||
{
|
||||
return fData;
|
||||
}
|
||||
|
||||
const std::vector<std::string>& get_DataVector() const
|
||||
const std::vector<utils::NullString>& get_DataVector() const
|
||||
{
|
||||
return fColValuesList;
|
||||
}
|
||||
@ -132,21 +130,11 @@ class DMLColumn : public DMLObject
|
||||
{
|
||||
fFuncScale = funcScale;
|
||||
}
|
||||
void set_Data(std::string data)
|
||||
{
|
||||
fData = data;
|
||||
}
|
||||
|
||||
void set_DataVector(std::vector<std::string>& dataVec)
|
||||
{
|
||||
fColValuesList = dataVec;
|
||||
}
|
||||
|
||||
protected:
|
||||
private:
|
||||
std::string fName;
|
||||
std::string fData;
|
||||
std::vector<std::string> fColValuesList;
|
||||
std::vector<utils::NullString> fColValuesList;
|
||||
bool fisNULL;
|
||||
bool fIsFromCol;
|
||||
uint32_t fFuncScale;
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <iostream>
|
||||
#include <bitset>
|
||||
#include <stdint.h>
|
||||
#include "nullstring.h"
|
||||
|
||||
namespace dmlpackage
|
||||
{
|
||||
@ -67,7 +68,7 @@ typedef std::vector<std::string> AtomList;
|
||||
|
||||
typedef std::vector<char*> QueryBuffer;
|
||||
|
||||
typedef std::vector<std::string> ColValuesList;
|
||||
typedef std::vector<utils::NullString> ColValuesList;
|
||||
typedef std::vector<std::string> ColNameList;
|
||||
typedef std::map<uint32_t, ColValuesList> TableValuesMap;
|
||||
typedef std::bitset<4096> NullValuesBitset;
|
||||
|
@ -186,10 +186,12 @@ int InsertDMLPackage::buildFromBuffer(std::string& buffer, int columns, int rows
|
||||
n++;
|
||||
colValue = dataList[n];
|
||||
n++;
|
||||
// XXX check for "null"? what values do we have here?
|
||||
utils::NullString nullColValue(colValue);
|
||||
#ifdef DML_PACKAGE_DEBUG
|
||||
// cout << "The column data: " << colName << " " << colValue << endl;
|
||||
#endif
|
||||
DMLColumn* aColumn = new DMLColumn(colName, colValue, false);
|
||||
DMLColumn* aColumn = new DMLColumn(colName, nullColValue, false);
|
||||
(aRowPtr->get_ColumnList()).push_back(aColumn);
|
||||
}
|
||||
|
||||
@ -208,7 +210,7 @@ int InsertDMLPackage::buildFromMysqlBuffer(ColNameList& colNameList, TableValues
|
||||
initializeTable();
|
||||
Row* aRowPtr = new Row();
|
||||
std::string colName;
|
||||
std::vector<std::string> colValList;
|
||||
ColValuesList colValList;
|
||||
|
||||
for (int j = 0; j < columns; j++)
|
||||
{
|
||||
@ -258,7 +260,10 @@ int InsertDMLPackage::buildFromSqlStatement(SqlStatement& sqlStatement)
|
||||
|
||||
for (unsigned int i = 0; i < columnNameList.size(); i++)
|
||||
{
|
||||
DMLColumn* aColumn = new DMLColumn(columnNameList[i], valuesList[i], isNULL);
|
||||
// XXX can here be NULLs?
|
||||
idbassert(!isNULL);
|
||||
utils::NullString ithValue(valuesList[i]);
|
||||
DMLColumn* aColumn = new DMLColumn(columnNameList[i], ithValue);
|
||||
(aRow->get_ColumnList()).push_back(aColumn);
|
||||
}
|
||||
|
||||
@ -275,6 +280,7 @@ int InsertDMLPackage::buildFromSqlStatement(SqlStatement& sqlStatement)
|
||||
while (iter != valuesList.end())
|
||||
{
|
||||
colValue = *iter;
|
||||
utils::NullString nullColValue;
|
||||
|
||||
if (strcasecmp(colValue.c_str(), "NULL") == 0)
|
||||
{
|
||||
@ -282,10 +288,11 @@ int InsertDMLPackage::buildFromSqlStatement(SqlStatement& sqlStatement)
|
||||
}
|
||||
else
|
||||
{
|
||||
nullColValue.assign(colValue);
|
||||
isNULL = false;
|
||||
}
|
||||
|
||||
DMLColumn* aColumn = new DMLColumn(colName, colValue, isNULL);
|
||||
DMLColumn* aColumn = new DMLColumn(colName, nullColValue, isNULL);
|
||||
(aRow->get_ColumnList()).push_back(aColumn);
|
||||
|
||||
++iter;
|
||||
|
@ -47,7 +47,7 @@ Row::Row(const Row& row)
|
||||
for (unsigned int i = 0; i < row.fColumnList.size(); i++)
|
||||
{
|
||||
const DMLColumn* aColumn = row.get_ColumnAt(i);
|
||||
DMLColumn* newColumn = new DMLColumn(aColumn->get_Name(), aColumn->get_Data());
|
||||
DMLColumn* newColumn = new DMLColumn(aColumn->get_Name(), aColumn->get_DataVector());
|
||||
fColumnList.push_back(newColumn);
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,8 @@ int UpdateDMLPackage::buildFromSqlStatement(SqlStatement& sqlStatement)
|
||||
while (iter != updateStmt.fColAssignmentListPtr->end())
|
||||
{
|
||||
ColumnAssignment* colaPtr = *iter;
|
||||
DMLColumn* colPtr = new DMLColumn(colaPtr->fColumn, colaPtr->fScalarExpression);
|
||||
NullString expr(colaPtr->fScalarExpression);
|
||||
DMLColumn* colPtr = new DMLColumn(colaPtr->fColumn, expr);
|
||||
rowPtr->get_ColumnList().push_back(colPtr);
|
||||
|
||||
++iter;
|
||||
@ -205,12 +206,13 @@ int UpdateDMLPackage::buildFromBuffer(std::string& buffer, int columns, int rows
|
||||
// Build a column list
|
||||
colName = dataList[n++];
|
||||
colValue = dataList[n++];
|
||||
NullString val(colValue);
|
||||
#ifdef DML_PACKAGE_DEBUG
|
||||
|
||||
// cout << "The column data: " << colName << " " << colValue << endl;
|
||||
#endif
|
||||
|
||||
DMLColumn* aColumn = new DMLColumn(colName, colValue);
|
||||
DMLColumn* aColumn = new DMLColumn(colName, val);
|
||||
(aRowPtr->get_ColumnList()).push_back(aColumn);
|
||||
}
|
||||
|
||||
@ -228,7 +230,7 @@ int UpdateDMLPackage::buildFromMysqlBuffer(ColNameList& colNameList, TableValues
|
||||
initializeTable();
|
||||
Row* aRowPtr = new Row();
|
||||
std::string colName;
|
||||
std::vector<std::string> colValList;
|
||||
ColValuesList colValList;
|
||||
|
||||
for (int j = 0; j < columns; j++)
|
||||
{
|
||||
@ -262,7 +264,8 @@ void UpdateDMLPackage::buildUpdateFromMysqlBuffer(UpdateSqlStatement& updateStmt
|
||||
while (iter != updateStmt.fColAssignmentListPtr->end())
|
||||
{
|
||||
ColumnAssignment* colaPtr = *iter;
|
||||
DMLColumn* colPtr = new DMLColumn(colaPtr->fColumn, colaPtr->fScalarExpression, colaPtr->fFromCol,
|
||||
NullString scalarExpression(colaPtr->fScalarExpression);
|
||||
DMLColumn* colPtr = new DMLColumn(colaPtr->fColumn, scalarExpression, colaPtr->fFromCol,
|
||||
colaPtr->fFuncScale, colaPtr->fIsNull);
|
||||
rowPtr->get_ColumnList().push_back(colPtr);
|
||||
|
||||
|
@ -27,14 +27,11 @@
|
||||
#include <map>
|
||||
#include <bitset>
|
||||
#include <stdint.h>
|
||||
#include "dmlpkg.h"
|
||||
|
||||
#define EXPORT
|
||||
namespace dmlpackage
|
||||
{
|
||||
typedef std::vector<std::string> ColValuesList;
|
||||
typedef std::vector<std::string> ColNameList;
|
||||
typedef std::map<uint32_t, ColValuesList> TableValuesMap;
|
||||
typedef std::bitset<4096> NullValuesBitset;
|
||||
|
||||
/** @brief describes the general interface
|
||||
* and implementation of a Vendor DML Statement
|
||||
@ -60,7 +57,7 @@ class VendorDMLStatement
|
||||
EXPORT VendorDMLStatement(std::string dmlstatement, int stmttype, std::string tName, std::string schema,
|
||||
int rows, int columns, ColNameList& colNameList, TableValuesMap& tableValuesMap,
|
||||
NullValuesBitset& nullValues, int sessionID);
|
||||
|
||||
|
||||
/** @brief destructor
|
||||
*/
|
||||
EXPORT ~VendorDMLStatement();
|
||||
|
@ -417,14 +417,11 @@ void AggregateColumn::evaluate(Row& row, bool& isNull)
|
||||
default:
|
||||
{
|
||||
auto const str = row.getConstString(fInputIndex);
|
||||
if (str.eq(utils::ConstString(CPNULLSTRMARK)))
|
||||
isNull = true;
|
||||
else
|
||||
fResult.strVal = str.toString();
|
||||
fResult.strVal.dropString();
|
||||
if (!str.isNull())
|
||||
fResult.strVal.assign((const uint8_t*)str.str(), str.length());
|
||||
|
||||
// stringColVal is padded with '\0' to colWidth so can't use str.length()
|
||||
if (strlen(fResult.strVal.c_str()) == 0)
|
||||
isNull = true;
|
||||
isNull = isNull || fResult.strVal.isNull();
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -356,10 +356,12 @@ class AggregateColumn : public ReturnedColumn
|
||||
/**
|
||||
* F&E
|
||||
*/
|
||||
virtual const std::string& getStrVal(rowgroup::Row& row, bool& isNull) override
|
||||
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
|
||||
{
|
||||
evaluate(row, isNull);
|
||||
return TreeNode::getStrVal(fTimeZone);
|
||||
bool localIsNull = false;
|
||||
evaluate(row, localIsNull);
|
||||
isNull = isNull || localIsNull;
|
||||
return localIsNull ? fResult.strVal.dropString() : TreeNode::getStrVal(fTimeZone);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -211,7 +211,7 @@ class ArithmeticColumn : public ReturnedColumn
|
||||
* F&E framework *
|
||||
***********************************************************/
|
||||
public:
|
||||
virtual const std::string& getStrVal(rowgroup::Row& row, bool& isNull) override
|
||||
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
|
||||
{
|
||||
return fExpression->getStrVal(row, isNull);
|
||||
}
|
||||
|
@ -109,10 +109,12 @@ class ArithmeticOperator : public Operator
|
||||
inline virtual void evaluate(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override;
|
||||
|
||||
using Operator::getStrVal;
|
||||
virtual const std::string& getStrVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
|
||||
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
|
||||
{
|
||||
evaluate(row, isNull, lop, rop);
|
||||
return TreeNode::getStrVal(fTimeZone);
|
||||
bool localIsNull = false;
|
||||
evaluate(row, localIsNull, lop, rop);
|
||||
isNull = isNull || localIsNull;
|
||||
return localIsNull ? fResult.strVal.dropString() : TreeNode::getStrVal(fTimeZone);
|
||||
}
|
||||
using Operator::getIntVal;
|
||||
virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
|
||||
|
@ -712,18 +712,18 @@ CalpontSystemCatalog::OID CalpontSystemCatalog::lookupOID(const TableColName& ta
|
||||
{
|
||||
ct.defaultValue = ((*it)->GetStringData(0));
|
||||
|
||||
if ((!ct.defaultValue.empty()) || (ct.defaultValue.length() > 0))
|
||||
if (!ct.defaultValue.isNull())
|
||||
{
|
||||
if (ct.constraintType != NOTNULL_CONSTRAINT)
|
||||
ct.constraintType = DEFAULT_CONSTRAINT;
|
||||
}
|
||||
}
|
||||
else if ((*it)->ColumnOID() == DICTOID_SYSCOLUMN_SCHEMA)
|
||||
tcn.schema = ((*it)->GetStringData(0));
|
||||
tcn.schema = ((*it)->GetStringData(0).safeString(""));
|
||||
else if ((*it)->ColumnOID() == DICTOID_SYSCOLUMN_TABLENAME)
|
||||
tcn.table = ((*it)->GetStringData(0));
|
||||
tcn.table = ((*it)->GetStringData(0).safeString(""));
|
||||
else if ((*it)->ColumnOID() == DICTOID_SYSCOLUMN_COLNAME)
|
||||
tcn.column = ((*it)->GetStringData(0));
|
||||
tcn.column = ((*it)->GetStringData(0).safeString(""));
|
||||
}
|
||||
|
||||
// temporialy memory leak fix until defaultvalue is added.
|
||||
@ -1195,7 +1195,7 @@ const CalpontSystemCatalog::ColType CalpontSystemCatalog::colType(const OID& Oid
|
||||
{
|
||||
ct.defaultValue = ((*it)->GetStringData(0));
|
||||
|
||||
if ((!ct.defaultValue.empty()) || (ct.defaultValue.length() > 0))
|
||||
if (!ct.defaultValue.isNull())
|
||||
{
|
||||
if (ct.constraintType != NOTNULL_CONSTRAINT)
|
||||
ct.constraintType = DEFAULT_CONSTRAINT;
|
||||
@ -1204,11 +1204,11 @@ const CalpontSystemCatalog::ColType CalpontSystemCatalog::colType(const OID& Oid
|
||||
// NJL fix. The schema, table, and column now return the oids for the dictionary columns
|
||||
// on schema, table, and column.
|
||||
else if ((*it)->ColumnOID() == DICTOID_SYSCOLUMN_SCHEMA)
|
||||
tcn.schema = ((*it)->GetStringData(0));
|
||||
tcn.schema = ((*it)->GetStringData(0).safeString(""));
|
||||
else if ((*it)->ColumnOID() == DICTOID_SYSCOLUMN_TABLENAME)
|
||||
tcn.table = ((*it)->GetStringData(0));
|
||||
tcn.table = ((*it)->GetStringData(0).safeString(""));
|
||||
else if ((*it)->ColumnOID() == DICTOID_SYSCOLUMN_COLNAME)
|
||||
tcn.column = ((*it)->GetStringData(0));
|
||||
tcn.column = ((*it)->GetStringData(0).safeString(""));
|
||||
else if ((*it)->ColumnOID() == oid[13])
|
||||
{
|
||||
if (static_cast<ConstraintType>((*it)->GetData(0)) == 0)
|
||||
@ -1447,11 +1447,11 @@ const CalpontSystemCatalog::TableColName CalpontSystemCatalog::colName(const OID
|
||||
for (it = sysDataList.begin(); it != sysDataList.end(); it++)
|
||||
{
|
||||
if ((*it)->ColumnOID() == oid2)
|
||||
tableColName.schema = (*it)->GetStringData(0);
|
||||
tableColName.schema = (*it)->GetStringData(0).safeString("");
|
||||
else if ((*it)->ColumnOID() == oid3)
|
||||
tableColName.table = (*it)->GetStringData(0);
|
||||
tableColName.table = (*it)->GetStringData(0).safeString("");
|
||||
else if ((*it)->ColumnOID() == oid4)
|
||||
tableColName.column = (*it)->GetStringData(0);
|
||||
tableColName.column = (*it)->GetStringData(0).safeString("");
|
||||
}
|
||||
|
||||
if (oid > 3000)
|
||||
@ -1548,11 +1548,11 @@ const CalpontSystemCatalog::TableColName CalpontSystemCatalog::dictColName(const
|
||||
for (it = sysDataList.begin(); it != sysDataList.end(); it++)
|
||||
{
|
||||
if ((*it)->ColumnOID() == oid2)
|
||||
tableColName.schema = (*it)->GetStringData(0);
|
||||
tableColName.schema = (*it)->GetStringData(0).safeString("");
|
||||
else if ((*it)->ColumnOID() == oid3)
|
||||
tableColName.table = (*it)->GetStringData(0);
|
||||
tableColName.table = (*it)->GetStringData(0).safeString("");
|
||||
else if ((*it)->ColumnOID() == oid4)
|
||||
tableColName.column = (*it)->GetStringData(0);
|
||||
tableColName.column = (*it)->GetStringData(0).safeString("");
|
||||
}
|
||||
|
||||
if (oid > 3000)
|
||||
@ -2811,8 +2811,8 @@ CalpontSystemCatalog::getTables(const std::string schema, int lower_case_table_n
|
||||
{
|
||||
for (int i = 0; i < (*it)->dataCount(); i++)
|
||||
{
|
||||
tables.push_back(make_pair(0, make_table("", (*it)->GetStringData(i))));
|
||||
tnl.push_back((*it)->GetStringData(i));
|
||||
tables.push_back(make_pair(0, make_table("", (*it)->GetStringData(i).safeString(""))));
|
||||
tnl.push_back((*it)->GetStringData(i).safeString(""));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2822,7 +2822,7 @@ CalpontSystemCatalog::getTables(const std::string schema, int lower_case_table_n
|
||||
if ((*it)->ColumnOID() == oid2)
|
||||
{
|
||||
for (int i = 0; i < (*it)->dataCount(); i++)
|
||||
tables[i].second.schema = (*it)->GetStringData(i);
|
||||
tables[i].second.schema = (*it)->GetStringData(i).safeString("");
|
||||
}
|
||||
}
|
||||
|
||||
@ -3210,7 +3210,7 @@ const CalpontSystemCatalog::RIDList CalpontSystemCatalog::columnRIDs(const Table
|
||||
|
||||
for (int i = 0; i < (*it)->dataCount(); i++)
|
||||
{
|
||||
TableColName tcn = make_tcn(aTableName.schema, aTableName.table, (*it)->GetStringData(i));
|
||||
TableColName tcn = make_tcn(aTableName.schema, aTableName.table, (*it)->GetStringData(i).safeString(""));
|
||||
fOIDmap[tcn] = rl[i].objnum;
|
||||
|
||||
if (fIdentity == EC)
|
||||
@ -3266,7 +3266,7 @@ const CalpontSystemCatalog::RIDList CalpontSystemCatalog::columnRIDs(const Table
|
||||
{
|
||||
ctList[i].defaultValue = ((*it)->GetStringData(i));
|
||||
|
||||
if ((!ctList[i].defaultValue.empty()) || (ctList[i].defaultValue.length() > 0))
|
||||
if (!ctList[i].defaultValue.isNull())
|
||||
{
|
||||
if (ctList[i].constraintType != NOTNULL_CONSTRAINT)
|
||||
ctList[i].constraintType = DEFAULT_CONSTRAINT;
|
||||
@ -3435,9 +3435,9 @@ const CalpontSystemCatalog::TableName CalpontSystemCatalog::tableName(const OID&
|
||||
}
|
||||
|
||||
if ((*it)->ColumnOID() == oid2)
|
||||
tableName.schema = (*it)->GetStringData(0);
|
||||
tableName.schema = (*it)->GetStringData(0).safeString("");
|
||||
else if ((*it)->ColumnOID() == oid3)
|
||||
tableName.table = (*it)->GetStringData(0);
|
||||
tableName.table = (*it)->GetStringData(0).safeString("");
|
||||
}
|
||||
|
||||
//@Bug 2682. datacount 0 sometimes does not mean the table is not found.
|
||||
@ -5670,7 +5670,7 @@ void CalpontSystemCatalog::getSchemaInfo(const string& in_schema, int lower_case
|
||||
{
|
||||
for (int i = 0; i < (*it)->dataCount(); i++)
|
||||
{
|
||||
tableNames.push_back((*it)->GetStringData(i));
|
||||
tableNames.push_back((*it)->GetStringData(i).safeString(""));
|
||||
tbIter = tbInfo.find(tableNames[i]);
|
||||
|
||||
if (tbIter == tbInfo.end())
|
||||
@ -5713,7 +5713,7 @@ void CalpontSystemCatalog::getSchemaInfo(const string& in_schema, int lower_case
|
||||
// lk2.lock();
|
||||
for (int i = 0; i < (*it)->dataCount(); i++)
|
||||
{
|
||||
TableColName tcn = make_tcn(schema, tableNames[i], (*it)->GetStringData(i));
|
||||
TableColName tcn = make_tcn(schema, tableNames[i], (*it)->GetStringData(i).safeString(""));
|
||||
fOIDmap[tcn] = rl[i].objnum;
|
||||
|
||||
if (fIdentity == EC)
|
||||
@ -5768,7 +5768,7 @@ void CalpontSystemCatalog::getSchemaInfo(const string& in_schema, int lower_case
|
||||
{
|
||||
ctList[i].defaultValue = ((*it)->GetStringData(i));
|
||||
|
||||
if ((!ctList[i].defaultValue.empty()) || (ctList[i].defaultValue.length() > 0))
|
||||
if (!ctList[i].defaultValue.isNull())
|
||||
{
|
||||
if (ctList[i].constraintType != NOTNULL_CONSTRAINT)
|
||||
ctList[i].constraintType = DEFAULT_CONSTRAINT;
|
||||
@ -6301,7 +6301,6 @@ void CalpontSystemCatalog::checkSysCatVer()
|
||||
|
||||
CalpontSystemCatalog::ColType::ColType()
|
||||
: constraintType(NO_CONSTRAINT)
|
||||
, defaultValue("")
|
||||
, colPosition(-1)
|
||||
, compressionType(NO_COMPRESSION)
|
||||
, columnOID(0)
|
||||
@ -6376,6 +6375,22 @@ boost::any CalpontSystemCatalog::ColType::convertColumnData(const std::string& d
|
||||
return h->convertFromString(*this, prm, data, pushWarning);
|
||||
}
|
||||
|
||||
boost::any CalpontSystemCatalog::ColType::convertColumnData(const NullString& data, bool& pushWarning,
|
||||
long timeZone, bool noRoundup,
|
||||
bool isUpdate) const
|
||||
{
|
||||
pushWarning = false;
|
||||
const datatypes::TypeHandler* h = typeHandler();
|
||||
if (!h)
|
||||
throw QueryDataExcept("convertColumnData: unknown column data type.", dataTypeErr);
|
||||
|
||||
if (data.isNull())
|
||||
return h->getNullValueForType(*this);
|
||||
|
||||
const datatypes::ConvertFromStringParam prm(timeZone, noRoundup, isUpdate);
|
||||
return h->convertFromString(*this, prm, data.unsafeStringRef(), pushWarning);
|
||||
}
|
||||
|
||||
CalpontSystemCatalog::ColType CalpontSystemCatalog::ColType::convertUnionColType(
|
||||
vector<CalpontSystemCatalog::ColType>& types,
|
||||
unsigned int& rc)
|
||||
|
@ -50,6 +50,7 @@
|
||||
|
||||
#include "mcs_datatype.h"
|
||||
#include "collation.h" // CHARSET_INFO, class Charset
|
||||
#include "nullstring.h"
|
||||
|
||||
class ExecPlanTest;
|
||||
namespace messageqcpp
|
||||
@ -207,7 +208,7 @@ class CalpontSystemCatalog : public datatypes::SystemCatalog
|
||||
{
|
||||
ConstraintType constraintType;
|
||||
DictOID ddn;
|
||||
std::string defaultValue;
|
||||
NullString defaultValue;
|
||||
int32_t colPosition; // temporally put here. may need to have ColInfo struct later
|
||||
int32_t compressionType;
|
||||
OID columnOID;
|
||||
@ -271,6 +272,18 @@ class CalpontSystemCatalog : public datatypes::SystemCatalog
|
||||
boost::any convertColumnData(const std::string& data, bool& bSaturate, long timeZone,
|
||||
bool nulFlag = false, bool noRoundup = false, bool isUpdate = false) const;
|
||||
|
||||
/**
|
||||
* @brief convert a columns data, represnted as a string,
|
||||
* to its native format
|
||||
* @param data - the string representation, with special NULL value
|
||||
* @param [OUT] bSaturate - the value was truncated/adjusted
|
||||
* @param timeZone - the time zone name, for TIMESTAMP conversion
|
||||
* @param nRoundtrip
|
||||
* @param isUpdate
|
||||
*/
|
||||
boost::any convertColumnData(const NullString& data, bool& bSaturate, long timeZone,
|
||||
bool noRoundup = false, bool isUpdate = false) const;
|
||||
|
||||
const std::string toString() const;
|
||||
|
||||
// Put these here so udf doesn't need to link libexecplan
|
||||
|
@ -28,6 +28,9 @@
|
||||
#include <string>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "nullstring.h"
|
||||
using namespace utils;
|
||||
|
||||
namespace execplan
|
||||
{
|
||||
/** @file
|
||||
@ -58,17 +61,24 @@ class ColumnResult
|
||||
dcount++;
|
||||
}
|
||||
|
||||
const std::string& GetStringData(uint32_t index) const
|
||||
const NullString& GetStringData(uint32_t index) const
|
||||
{
|
||||
return stringData[index];
|
||||
}
|
||||
|
||||
void PutStringData(const std::string& s)
|
||||
void PutStringData(const NullString& s)
|
||||
{
|
||||
stringData.push_back(s);
|
||||
dcount++;
|
||||
}
|
||||
|
||||
void PutStringData(const char*str, size_t len)
|
||||
{
|
||||
idbassert(str != nullptr || len == 0);
|
||||
NullString tmp(str, len);
|
||||
PutStringData(tmp);
|
||||
}
|
||||
|
||||
int ColumnOID() const
|
||||
{
|
||||
return oid;
|
||||
@ -106,7 +116,7 @@ class ColumnResult
|
||||
// ColumnResult& operator=(const ColumnResult& rhs);
|
||||
|
||||
std::vector<int64_t> intData;
|
||||
std::vector<std::string> stringData;
|
||||
std::vector<NullString> stringData;
|
||||
std::vector<uint64_t> rids;
|
||||
int oid;
|
||||
int dcount; // data, string, and row counters
|
||||
|
@ -39,14 +39,14 @@ namespace execplan
|
||||
/**
|
||||
* Constructors/Destructors
|
||||
*/
|
||||
ConstantColumn::ConstantColumn() : ReturnedColumn(), fType(0)
|
||||
ConstantColumn::ConstantColumn() : ReturnedColumn(), fType(NULLDATA)
|
||||
{
|
||||
}
|
||||
|
||||
ConstantColumn::ConstantColumn(const string& sql, TYPE type)
|
||||
: ReturnedColumn(), fConstval(sql), fType(type), fData(sql)
|
||||
{
|
||||
fResult.strVal = sql;
|
||||
fResult.strVal.assign(sql);
|
||||
|
||||
fResult.intVal = atoll(sql.c_str());
|
||||
fResult.uintVal = strtoull(sql.c_str(), NULL, 0);
|
||||
@ -81,7 +81,7 @@ ConstantColumn::ConstantColumn(const string& sql, TYPE type)
|
||||
ConstantColumn::ConstantColumn(const string& sql, const double val)
|
||||
: ReturnedColumn(), fConstval(sql), fType(NUM), fData(sql)
|
||||
{
|
||||
fResult.strVal = sql;
|
||||
fResult.strVal.assign(sql);
|
||||
fResult.doubleVal = val;
|
||||
fResult.intVal = (int64_t)val;
|
||||
fResult.uintVal = (uint64_t)val;
|
||||
@ -96,7 +96,7 @@ ConstantColumn::ConstantColumn(const string& sql, const double val)
|
||||
ConstantColumn::ConstantColumn(const string& sql, const long double val)
|
||||
: ReturnedColumn(), fConstval(sql), fType(NUM), fData(sql)
|
||||
{
|
||||
fResult.strVal = sql;
|
||||
fResult.strVal.assign(sql);
|
||||
fResult.doubleVal = (double)val;
|
||||
fResult.intVal = (int64_t)val;
|
||||
fResult.uintVal = (uint64_t)val;
|
||||
@ -111,7 +111,7 @@ ConstantColumn::ConstantColumn(const string& sql, const long double val)
|
||||
ConstantColumn::ConstantColumn(const string& sql, const int64_t val, TYPE type)
|
||||
: ReturnedColumn(), fConstval(sql), fType(type), fData(sql)
|
||||
{
|
||||
fResult.strVal = sql;
|
||||
fResult.strVal.assign(sql);
|
||||
fResult.intVal = val;
|
||||
fResult.uintVal = (uint64_t)fResult.intVal;
|
||||
fResult.floatVal = (float)fResult.intVal;
|
||||
@ -125,7 +125,7 @@ ConstantColumn::ConstantColumn(const string& sql, const int64_t val, TYPE type)
|
||||
ConstantColumn::ConstantColumn(const string& sql, const uint64_t val, TYPE type)
|
||||
: ReturnedColumn(), fConstval(sql), fType(type), fData(sql)
|
||||
{
|
||||
fResult.strVal = sql;
|
||||
fResult.strVal.assign(sql);
|
||||
fResult.uintVal = val;
|
||||
fResult.intVal = (int64_t)fResult.uintVal;
|
||||
fResult.floatVal = (float)fResult.uintVal;
|
||||
@ -139,7 +139,7 @@ ConstantColumn::ConstantColumn(const string& sql, const uint64_t val, TYPE type)
|
||||
ConstantColumn::ConstantColumn(const string& sql, const IDB_Decimal& val)
|
||||
: ReturnedColumn(), fConstval(sql), fType(NUM), fData(sql)
|
||||
{
|
||||
fResult.strVal = sql;
|
||||
fResult.strVal.assign(sql);
|
||||
fResult.intVal = (int64_t)atoll(sql.c_str());
|
||||
fResult.uintVal = strtoull(sql.c_str(), NULL, 0);
|
||||
fResult.floatVal = atof(sql.c_str());
|
||||
@ -167,9 +167,9 @@ ConstantColumn::ConstantColumn(const int64_t val, TYPE type) : ReturnedColumn(),
|
||||
{
|
||||
ostringstream oss;
|
||||
oss << val;
|
||||
fConstval = oss.str();
|
||||
fConstval.assign(oss.str());
|
||||
fData = oss.str();
|
||||
fResult.strVal = fData;
|
||||
fResult.strVal.assign(fData);
|
||||
fResult.intVal = val;
|
||||
fResult.uintVal = (uint64_t)fResult.intVal;
|
||||
fResult.floatVal = (float)fResult.intVal;
|
||||
@ -185,9 +185,9 @@ ConstantColumn::ConstantColumn(const uint64_t val, TYPE type, int8_t scale, uint
|
||||
{
|
||||
ostringstream oss;
|
||||
oss << val;
|
||||
fConstval = oss.str();
|
||||
fConstval.assign(oss.str());
|
||||
fData = oss.str();
|
||||
fResult.strVal = fData;
|
||||
fResult.strVal.assign(fData);
|
||||
fResult.intVal = (int64_t)val;
|
||||
fResult.uintVal = val;
|
||||
fResult.floatVal = (float)fResult.uintVal;
|
||||
@ -205,7 +205,8 @@ ConstantColumn::~ConstantColumn()
|
||||
const string ConstantColumn::toString() const
|
||||
{
|
||||
ostringstream oss;
|
||||
oss << "ConstantColumn: " << fConstval << " intVal=" << fResult.intVal << " uintVal=" << fResult.uintVal;
|
||||
oss << "ConstantColumn: " << fConstval.safeString("<<NuLL>>") << " intVal=" << fResult.intVal
|
||||
<< " uintVal=" << fResult.uintVal;
|
||||
oss << '(';
|
||||
|
||||
if (fType == LITERAL)
|
||||
@ -228,7 +229,7 @@ std::string ConstantColumn::toCppCode(IncludeSet& includes) const
|
||||
{
|
||||
includes.insert("constantcolumn.h");
|
||||
std::stringstream ss;
|
||||
ss << "ConstantColumn(" << std::quoted(fData) << ", " << fConstval << ")";
|
||||
ss << "ConstantColumn(" << std::quoted(fData) << ", " << fConstval.safeString() << ")";
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
@ -305,7 +306,10 @@ bool ConstantColumn::operator==(const ConstantColumn& t) const
|
||||
if (*rc1 != *rc2)
|
||||
return false;
|
||||
|
||||
if (fConstval != t.fConstval)
|
||||
if (fConstval.isNull() != t.fConstval.isNull())
|
||||
return false;
|
||||
|
||||
if (!fConstval.isNull() && fConstval.unsafeStringRef() != t.fConstval.unsafeStringRef())
|
||||
return false;
|
||||
|
||||
if (fType != t.fType)
|
||||
|
@ -27,6 +27,10 @@
|
||||
#include <string>
|
||||
|
||||
#include "returnedcolumn.h"
|
||||
#include "nullstring.h"
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "execinfo.h"
|
||||
|
||||
namespace messageqcpp
|
||||
{
|
||||
@ -100,16 +104,28 @@ class ConstantColumn : public ReturnedColumn
|
||||
/**
|
||||
* accessor
|
||||
*/
|
||||
inline const std::string& constval() const
|
||||
inline const utils::NullString& constval() const
|
||||
{
|
||||
if (isNull())
|
||||
{
|
||||
static NullString nullstr;
|
||||
return nullstr;
|
||||
}
|
||||
return fConstval;
|
||||
}
|
||||
/**
|
||||
* accessor
|
||||
*/
|
||||
inline void constval(const std::string& constval)
|
||||
inline void constval(const utils::NullString& constval)
|
||||
{
|
||||
fConstval = constval;
|
||||
fResult.strVal = constval;
|
||||
}
|
||||
inline void constval(const std::string& constval)
|
||||
{
|
||||
idbassert(fType != NULLDATA);
|
||||
fConstval.assign(constval);
|
||||
fResult.strVal.assign(constval);
|
||||
}
|
||||
/**
|
||||
* accessor
|
||||
@ -202,8 +218,13 @@ class ConstantColumn : public ReturnedColumn
|
||||
fDerivedTable = std::string("*");
|
||||
}
|
||||
|
||||
bool isNull() const
|
||||
{
|
||||
return fType == NULLDATA || fConstval.isNull();
|
||||
}
|
||||
|
||||
private:
|
||||
std::string fConstval;
|
||||
utils::NullString fConstval;
|
||||
int fType;
|
||||
std::string fData;
|
||||
long fTimeZone;
|
||||
@ -254,7 +275,7 @@ class ConstantColumn : public ReturnedColumn
|
||||
/**
|
||||
* F&E
|
||||
*/
|
||||
virtual const std::string& getStrVal(rowgroup::Row& row, bool& isNull) override
|
||||
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
|
||||
{
|
||||
isNull = isNull || (fType == NULLDATA);
|
||||
return fResult.strVal;
|
||||
@ -308,7 +329,7 @@ class ConstantColumn : public ReturnedColumn
|
||||
|
||||
if (!fResult.valueConverted)
|
||||
{
|
||||
fResult.intVal = dataconvert::DataConvert::stringToDate(fResult.strVal);
|
||||
fResult.intVal = dataconvert::DataConvert::stringToDate(fResult.strVal.safeString());
|
||||
fResult.valueConverted = true;
|
||||
}
|
||||
|
||||
@ -323,7 +344,8 @@ class ConstantColumn : public ReturnedColumn
|
||||
|
||||
if (!fResult.valueConverted)
|
||||
{
|
||||
fResult.intVal = dataconvert::DataConvert::stringToDatetime(fResult.strVal);
|
||||
isNull = isNull || fResult.strVal.isNull();
|
||||
fResult.intVal = dataconvert::DataConvert::stringToDatetime(fResult.strVal.safeString(""));
|
||||
fResult.valueConverted = true;
|
||||
}
|
||||
|
||||
@ -338,7 +360,8 @@ class ConstantColumn : public ReturnedColumn
|
||||
|
||||
if (!fResult.valueConverted)
|
||||
{
|
||||
fResult.intVal = dataconvert::DataConvert::stringToTimestamp(fResult.strVal, fTimeZone);
|
||||
isNull = isNull || fResult.strVal.isNull();
|
||||
fResult.intVal = dataconvert::DataConvert::stringToTimestamp(fResult.strVal.safeString(""), fTimeZone);
|
||||
fResult.valueConverted = true;
|
||||
}
|
||||
|
||||
@ -353,7 +376,7 @@ class ConstantColumn : public ReturnedColumn
|
||||
|
||||
if (!fResult.valueConverted)
|
||||
{
|
||||
fResult.intVal = dataconvert::DataConvert::stringToTime(fResult.strVal);
|
||||
fResult.intVal = dataconvert::DataConvert::stringToTime(fResult.strVal.safeString(""));
|
||||
fResult.valueConverted = true;
|
||||
}
|
||||
|
||||
|
@ -217,10 +217,15 @@ class FunctionColumn : public ReturnedColumn
|
||||
* F&E framework *
|
||||
***********************************************************/
|
||||
public:
|
||||
virtual const std::string& getStrVal(rowgroup::Row& row, bool& isNull) override
|
||||
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
|
||||
{
|
||||
fOperationType.setTimeZone(fTimeZone);
|
||||
fResult.strVal = fFunctor->getStrVal(row, fFunctionParms, isNull, fOperationType);
|
||||
fResult.strVal.dropString();
|
||||
std::string val = fFunctor->getStrVal(row, fFunctionParms, isNull, fOperationType);
|
||||
if (!isNull)
|
||||
{
|
||||
fResult.strVal.assign(val);
|
||||
}
|
||||
return fResult.strVal;
|
||||
}
|
||||
virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
|
||||
|
@ -163,8 +163,9 @@ class Operator : public TreeNode
|
||||
|
||||
// The following methods should be pure virtual. Currently too many instanslization exists.
|
||||
using TreeNode::getStrVal;
|
||||
virtual const std::string& getStrVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop)
|
||||
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop)
|
||||
{
|
||||
isNull = isNull || fResult.strVal.isNull();
|
||||
return fResult.strVal;
|
||||
}
|
||||
using TreeNode::getIntVal;
|
||||
|
@ -238,7 +238,7 @@ class ParseTree
|
||||
**********************************************************************/
|
||||
|
||||
public:
|
||||
inline const std::string& getStrVal(rowgroup::Row& row, bool& isNull)
|
||||
inline const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
if (fLeft && fRight)
|
||||
return (reinterpret_cast<Operator*>(fData))->getStrVal(row, isNull, fLeft, fRight);
|
||||
|
@ -367,14 +367,14 @@ bool PredicateOperator::getBoolVal(rowgroup::Row& row, bool& isNull, ReturnedCol
|
||||
// like operator. both sides are string.
|
||||
if (fOp == OP_LIKE || fOp == OP_NOTLIKE)
|
||||
{
|
||||
const std::string& subject = lop->getStrVal(row, isNull);
|
||||
const auto& subject = lop->getStrVal(row, isNull);
|
||||
if (isNull)
|
||||
return false;
|
||||
const std::string& pattern = rop->getStrVal(row, isNull);
|
||||
const auto& pattern = rop->getStrVal(row, isNull);
|
||||
if (isNull)
|
||||
return false;
|
||||
return datatypes::Charset(cs).like(fOp == OP_NOTLIKE, utils::ConstString(subject),
|
||||
utils::ConstString(pattern));
|
||||
return datatypes::Charset(cs).like(fOp == OP_NOTLIKE, utils::ConstString(subject.str(), subject.length()),
|
||||
utils::ConstString(pattern.str(), pattern.length()));
|
||||
}
|
||||
|
||||
// fOpType should have already been set on the connector during parsing
|
||||
@ -709,11 +709,15 @@ bool PredicateOperator::getBoolVal(rowgroup::Row& row, bool& isNull, ReturnedCol
|
||||
if (isNull)
|
||||
return false;
|
||||
|
||||
const std::string& val1 = lop->getStrVal(row, isNull);
|
||||
const auto& val1 = lop->getStrVal(row, isNull);
|
||||
if (isNull)
|
||||
return false;
|
||||
|
||||
return strTrimCompare(val1, rop->getStrVal(row, isNull)) && !isNull;
|
||||
const auto& val2 = rop->getStrVal(row, isNull);
|
||||
if (isNull)
|
||||
return false;
|
||||
|
||||
return strTrimCompare(val1.safeString(""), val2.safeString(""));
|
||||
}
|
||||
|
||||
case execplan::CalpontSystemCatalog::VARBINARY:
|
||||
|
@ -680,7 +680,7 @@ void SimpleColumn::evaluate(Row& row, bool& isNull)
|
||||
case CalpontSystemCatalog::BLOB:
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
{
|
||||
fResult.strVal = row.getVarBinaryStringField(fInputIndex);
|
||||
fResult.strVal.assign(row.getVarBinaryField(fInputIndex), row.getVarBinaryLength(fInputIndex));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -287,9 +287,16 @@ class SimpleColumn : public ReturnedColumn
|
||||
evaluate(row, isNull);
|
||||
return TreeNode::getBoolVal();
|
||||
}
|
||||
virtual const std::string& getStrVal(rowgroup::Row& row, bool& isNull) override
|
||||
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
|
||||
{
|
||||
evaluate(row, isNull);
|
||||
bool localIsNull = false;
|
||||
evaluate(row, localIsNull);
|
||||
if (localIsNull)
|
||||
{
|
||||
isNull = isNull || localIsNull;
|
||||
fResult.strVal.dropString();
|
||||
return fResult.strVal;
|
||||
}
|
||||
return TreeNode::getStrVal(fTimeZone);
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ class SimpleColumn_Decimal : public SimpleColumn
|
||||
}
|
||||
|
||||
/** Evaluate methods */
|
||||
virtual inline const std::string& getStrVal(rowgroup::Row& row, bool& isNull) override;
|
||||
virtual inline const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override;
|
||||
virtual inline int64_t getIntVal(rowgroup::Row& row, bool& isNull) override;
|
||||
virtual inline float getFloatVal(rowgroup::Row& row, bool& isNull) override;
|
||||
virtual inline double getDoubleVal(rowgroup::Row& row, bool& isNull) override;
|
||||
@ -93,8 +93,8 @@ std::string SimpleColumn_Decimal<len>::toCppCode(IncludeSet& includes) const
|
||||
{
|
||||
includes.insert("simplecolumn_decimal.h");
|
||||
std::stringstream ss;
|
||||
ss << "SimpleColumn_Decimal<" << len << ">(" << std::quoted(fSchemaName) << ", " << std::quoted(fTableName) << ", " <<
|
||||
std::quoted(fColumnName) << ", " << fisColumnStore << ", " << sessionID() << ")";
|
||||
ss << "SimpleColumn_Decimal<" << len << ">(" << std::quoted(fSchemaName) << ", " << std::quoted(fTableName)
|
||||
<< ", " << std::quoted(fColumnName) << ", " << fisColumnStore << ", " << sessionID() << ")";
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
@ -148,11 +148,19 @@ void SimpleColumn_Decimal<len>::setNullVal()
|
||||
}
|
||||
|
||||
template <int len>
|
||||
inline const std::string& SimpleColumn_Decimal<len>::getStrVal(rowgroup::Row& row, bool& isNull)
|
||||
inline const utils::NullString& SimpleColumn_Decimal<len>::getStrVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
datatypes::Decimal dec((int64_t)row.getIntField<len>(fInputIndex), fResultType.scale,
|
||||
fResultType.precision);
|
||||
fResult.strVal = dec.toString();
|
||||
if (row.equals<len>(fNullVal, fInputIndex))
|
||||
{
|
||||
isNull = true;
|
||||
fResult.strVal.dropString();
|
||||
}
|
||||
else
|
||||
{
|
||||
datatypes::Decimal dec((int64_t)row.getIntField<len>(fInputIndex), fResultType.scale,
|
||||
fResultType.precision);
|
||||
fResult.strVal.assign(dec.toString());
|
||||
}
|
||||
return fResult.strVal;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ class SimpleColumn_INT : public SimpleColumn
|
||||
}
|
||||
|
||||
/** Evaluate methods */
|
||||
virtual inline const std::string& getStrVal(rowgroup::Row& row, bool& isNull) override;
|
||||
virtual inline const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override;
|
||||
virtual inline int64_t getIntVal(rowgroup::Row& row, bool& isNull) override;
|
||||
virtual inline uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override;
|
||||
virtual inline float getFloatVal(rowgroup::Row& row, bool& isNull) override;
|
||||
@ -146,10 +146,13 @@ void SimpleColumn_INT<len>::setNullVal()
|
||||
}
|
||||
|
||||
template <int len>
|
||||
inline const std::string& SimpleColumn_INT<len>::getStrVal(rowgroup::Row& row, bool& isNull)
|
||||
inline const utils::NullString & SimpleColumn_INT<len>::getStrVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
if (row.equals<len>(fNullVal, fInputIndex))
|
||||
{
|
||||
isNull = true;
|
||||
fResult.strVal.dropString();
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef __LP64__
|
||||
@ -157,9 +160,9 @@ inline const std::string& SimpleColumn_INT<len>::getStrVal(rowgroup::Row& row, b
|
||||
#else
|
||||
snprintf(tmp, 20, "%ld", (int64_t)row.getIntField<len>(fInputIndex));
|
||||
#endif
|
||||
fResult.strVal.assign(std::string(tmp));
|
||||
}
|
||||
|
||||
fResult.strVal = std::string(tmp);
|
||||
return fResult.strVal;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ class SimpleColumn_UINT : public SimpleColumn
|
||||
}
|
||||
|
||||
/** Evaluate methods */
|
||||
virtual inline const std::string& getStrVal(rowgroup::Row& row, bool& isNull) override;
|
||||
virtual inline const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override;
|
||||
virtual inline int64_t getIntVal(rowgroup::Row& row, bool& isNull) override;
|
||||
virtual inline uint64_t getUintVal(rowgroup::Row& row, bool& isNull) override;
|
||||
virtual inline float getFloatVal(rowgroup::Row& row, bool& isNull) override;
|
||||
@ -148,10 +148,13 @@ void SimpleColumn_UINT<len>::setNullVal()
|
||||
}
|
||||
|
||||
template <int len>
|
||||
inline const std::string& SimpleColumn_UINT<len>::getStrVal(rowgroup::Row& row, bool& isNull)
|
||||
inline const utils::NullString& SimpleColumn_UINT<len>::getStrVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
if (row.equals<len>(fNullVal, fInputIndex))
|
||||
{
|
||||
isNull = true;
|
||||
fResult.strVal.dropString();
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef __LP64__
|
||||
@ -159,9 +162,9 @@ inline const std::string& SimpleColumn_UINT<len>::getStrVal(rowgroup::Row& row,
|
||||
#else
|
||||
snprintf(tmp, 21, "%lu", row.getUintField<len>(fInputIndex));
|
||||
#endif
|
||||
fResult.strVal.assign(std::string(tmp));
|
||||
}
|
||||
|
||||
fResult.strVal = std::string(tmp);
|
||||
return fResult.strVal;
|
||||
}
|
||||
|
||||
|
@ -562,54 +562,50 @@ void SimpleFilter::convertConstant()
|
||||
|
||||
if (fRhs->resultType().colDataType == CalpontSystemCatalog::DATE)
|
||||
{
|
||||
if (lcc->constval().empty())
|
||||
if (lcc->isNull())
|
||||
{
|
||||
lcc->constval("0000-00-00");
|
||||
result.intVal = 0;
|
||||
result.strVal = lcc->constval();
|
||||
result.strVal.dropString();
|
||||
}
|
||||
else
|
||||
{
|
||||
result.intVal = dataconvert::DataConvert::dateToInt(result.strVal);
|
||||
result.intVal = dataconvert::DataConvert::dateToInt(result.strVal.safeString(""));
|
||||
}
|
||||
}
|
||||
else if (fRhs->resultType().colDataType == CalpontSystemCatalog::DATETIME)
|
||||
{
|
||||
if (lcc->constval().empty())
|
||||
if (lcc->isNull())
|
||||
{
|
||||
lcc->constval("0000-00-00 00:00:00");
|
||||
result.intVal = 0;
|
||||
result.strVal = lcc->constval();
|
||||
result.strVal.dropString();
|
||||
}
|
||||
else
|
||||
{
|
||||
result.intVal = dataconvert::DataConvert::datetimeToInt(result.strVal);
|
||||
result.intVal = dataconvert::DataConvert::datetimeToInt(result.strVal.safeString(""));
|
||||
}
|
||||
}
|
||||
else if (fRhs->resultType().colDataType == CalpontSystemCatalog::TIMESTAMP)
|
||||
{
|
||||
if (lcc->constval().empty())
|
||||
if (lcc->isNull())
|
||||
{
|
||||
lcc->constval("0000-00-00 00:00:00");
|
||||
result.intVal = 0;
|
||||
result.strVal = lcc->constval();
|
||||
result.strVal.dropString();
|
||||
}
|
||||
else
|
||||
{
|
||||
result.intVal = dataconvert::DataConvert::timestampToInt(result.strVal, fTimeZone);
|
||||
result.intVal = dataconvert::DataConvert::timestampToInt(result.strVal.safeString(""), fTimeZone);
|
||||
}
|
||||
}
|
||||
else if (fRhs->resultType().colDataType == CalpontSystemCatalog::TIME)
|
||||
{
|
||||
if (lcc->constval().empty())
|
||||
if (lcc->isNull())
|
||||
{
|
||||
lcc->constval("00:00:00");
|
||||
result.intVal = 0;
|
||||
result.strVal = lcc->constval();
|
||||
result.strVal.dropString();
|
||||
}
|
||||
else
|
||||
{
|
||||
result.intVal = dataconvert::DataConvert::timeToInt(result.strVal);
|
||||
result.intVal = dataconvert::DataConvert::timeToInt(result.strVal.safeString(""));
|
||||
}
|
||||
}
|
||||
|
||||
@ -622,54 +618,50 @@ void SimpleFilter::convertConstant()
|
||||
|
||||
if (fLhs->resultType().colDataType == CalpontSystemCatalog::DATE)
|
||||
{
|
||||
if (rcc->constval().empty())
|
||||
if (rcc->isNull())
|
||||
{
|
||||
rcc->constval("0000-00-00");
|
||||
result.intVal = 0;
|
||||
result.strVal = rcc->constval();
|
||||
result.strVal.dropString();
|
||||
}
|
||||
else
|
||||
{
|
||||
result.intVal = dataconvert::DataConvert::dateToInt(result.strVal);
|
||||
result.intVal = dataconvert::DataConvert::dateToInt(result.strVal.safeString(""));
|
||||
}
|
||||
}
|
||||
else if (fLhs->resultType().colDataType == CalpontSystemCatalog::DATETIME)
|
||||
{
|
||||
if (rcc->constval().empty())
|
||||
if (rcc->isNull())
|
||||
{
|
||||
rcc->constval("0000-00-00 00:00:00");
|
||||
result.intVal = 0;
|
||||
result.strVal = rcc->constval();
|
||||
result.strVal.dropString();
|
||||
}
|
||||
else
|
||||
{
|
||||
result.intVal = dataconvert::DataConvert::datetimeToInt(result.strVal);
|
||||
result.intVal = dataconvert::DataConvert::datetimeToInt(result.strVal.safeString(""));
|
||||
}
|
||||
}
|
||||
else if (fLhs->resultType().colDataType == CalpontSystemCatalog::TIMESTAMP)
|
||||
{
|
||||
if (rcc->constval().empty())
|
||||
if (rcc->isNull())
|
||||
{
|
||||
rcc->constval("0000-00-00 00:00:00");
|
||||
result.intVal = 0;
|
||||
result.strVal = rcc->constval();
|
||||
result.strVal.dropString();
|
||||
}
|
||||
else
|
||||
{
|
||||
result.intVal = dataconvert::DataConvert::timestampToInt(result.strVal, fTimeZone);
|
||||
result.intVal = dataconvert::DataConvert::timestampToInt(result.strVal.safeString(""), fTimeZone);
|
||||
}
|
||||
}
|
||||
else if (fLhs->resultType().colDataType == CalpontSystemCatalog::TIME)
|
||||
{
|
||||
if (rcc->constval().empty())
|
||||
if (rcc->isNull())
|
||||
{
|
||||
rcc->constval("00:00:00");
|
||||
result.intVal = 0;
|
||||
result.strVal = rcc->constval();
|
||||
result.strVal.dropString();
|
||||
}
|
||||
else
|
||||
{
|
||||
result.intVal = dataconvert::DataConvert::timeToInt(result.strVal);
|
||||
result.intVal = dataconvert::DataConvert::timeToInt(result.strVal.safeString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "mcs_decimal.h"
|
||||
#include "mcs_int64.h"
|
||||
#include "numericliteral.h"
|
||||
#include "nullstring.h"
|
||||
|
||||
namespace messageqcpp
|
||||
{
|
||||
@ -145,7 +146,7 @@ struct Result
|
||||
, longDoubleVal(0)
|
||||
, floatVal(0)
|
||||
, boolVal(false)
|
||||
, strVal("")
|
||||
, strVal()
|
||||
, decimalVal(IDB_Decimal())
|
||||
, valueConverted(false)
|
||||
{
|
||||
@ -160,7 +161,7 @@ struct Result
|
||||
long double longDoubleVal;
|
||||
float floatVal;
|
||||
bool boolVal;
|
||||
std::string strVal;
|
||||
utils::NullString strVal;
|
||||
IDB_Decimal decimalVal;
|
||||
bool valueConverted;
|
||||
};
|
||||
@ -266,8 +267,9 @@ class TreeNode
|
||||
/***********************************************************************
|
||||
* F&E framework *
|
||||
***********************************************************************/
|
||||
virtual const std::string& getStrVal(rowgroup::Row& row, bool& isNull)
|
||||
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
isNull = isNull || fResult.strVal.isNull(); // XXX: NullString returns isNull, we should remove that parameter altogether.
|
||||
return fResult.strVal;
|
||||
}
|
||||
virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull)
|
||||
@ -331,7 +333,7 @@ class TreeNode
|
||||
}
|
||||
|
||||
inline bool getBoolVal();
|
||||
inline const std::string& getStrVal(const long timeZone);
|
||||
inline const utils::NullString& getStrVal(const long timeZone);
|
||||
inline int64_t getIntVal();
|
||||
inline uint64_t getUintVal();
|
||||
inline float getFloatVal();
|
||||
@ -409,13 +411,15 @@ inline bool TreeNode::getBoolVal()
|
||||
if (fResultType.colWidth <= 8)
|
||||
return (atoi((char*)(&fResult.origIntVal)) != 0);
|
||||
|
||||
return (atoi(fResult.strVal.c_str()) != 0);
|
||||
idbassert(fResult.strVal.str());
|
||||
return (atoi(fResult.strVal.str()) != 0);
|
||||
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
if (fResultType.colWidth <= 7)
|
||||
return (atoi((char*)(&fResult.origIntVal)) != 0);
|
||||
|
||||
return (atoi(fResult.strVal.c_str()) != 0);
|
||||
idbassert(fResult.strVal.str());
|
||||
return (atoi(fResult.strVal.str()) != 0);
|
||||
|
||||
// FIXME: Huh???
|
||||
case CalpontSystemCatalog::VARBINARY:
|
||||
@ -424,7 +428,8 @@ inline bool TreeNode::getBoolVal()
|
||||
if (fResultType.colWidth <= 7)
|
||||
return (atoi((char*)(&fResult.origIntVal)) != 0);
|
||||
|
||||
return (atoi(fResult.strVal.c_str()) != 0);
|
||||
idbassert(fResult.strVal.str());
|
||||
return (atoi(fResult.strVal.str()) != 0);
|
||||
|
||||
case CalpontSystemCatalog::BIGINT:
|
||||
case CalpontSystemCatalog::SMALLINT:
|
||||
@ -463,28 +468,28 @@ inline bool TreeNode::getBoolVal()
|
||||
return fResult.boolVal;
|
||||
}
|
||||
|
||||
inline const std::string& TreeNode::getStrVal(const long timeZone)
|
||||
inline const utils::NullString& TreeNode::getStrVal(const long timeZone)
|
||||
{
|
||||
switch (fResultType.colDataType)
|
||||
{
|
||||
case CalpontSystemCatalog::CHAR:
|
||||
if (fResultType.colWidth <= 8)
|
||||
fResult.strVal = (char*)(&fResult.origIntVal);
|
||||
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
if (fResultType.colWidth <= 7)
|
||||
fResult.strVal = (char*)(&fResult.origIntVal);
|
||||
{
|
||||
const char *intAsChar = (const char*) (&fResult.origIntVal);
|
||||
fResult.strVal.assign((const uint8_t*)intAsChar, strlen(intAsChar));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
// FIXME: ???
|
||||
case CalpontSystemCatalog::VARBINARY:
|
||||
case CalpontSystemCatalog::CHAR:
|
||||
case CalpontSystemCatalog::VARBINARY: // XXX: TODO: we don't have varbinary support now, but it may be handled just like varchar.
|
||||
case CalpontSystemCatalog::BLOB:
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
if (fResultType.colWidth <= 7)
|
||||
fResult.strVal = (char*)(&fResult.origIntVal);
|
||||
if (fResultType.colWidth <= 8)
|
||||
{
|
||||
const char *intAsChar = (const char*) (&fResult.origIntVal);
|
||||
fResult.strVal.assign((const uint8_t*)intAsChar, strlen(intAsChar));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@ -499,7 +504,7 @@ inline const std::string& TreeNode::getStrVal(const long timeZone)
|
||||
#else
|
||||
snprintf(tmp, 20, "%ld", fResult.intVal);
|
||||
#endif
|
||||
fResult.strVal = std::string(tmp);
|
||||
fResult.strVal.assign(std::string(tmp));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -514,7 +519,7 @@ inline const std::string& TreeNode::getStrVal(const long timeZone)
|
||||
#else
|
||||
snprintf(tmp, 20, "%lu", fResult.uintVal);
|
||||
#endif
|
||||
fResult.strVal = std::string(tmp);
|
||||
fResult.strVal.assign(std::string(tmp));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -524,7 +529,7 @@ inline const std::string& TreeNode::getStrVal(const long timeZone)
|
||||
if ((fabs(fResult.floatVal) > (1.0 / IDB_pow[4])) && (fabs(fResult.floatVal) < (float)IDB_pow[6]))
|
||||
{
|
||||
snprintf(tmp, 312, "%f", fResult.floatVal);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
fResult.strVal.assign(removeTrailing0(tmp, 312));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -535,14 +540,15 @@ inline const std::string& TreeNode::getStrVal(const long timeZone)
|
||||
if (std::isnan(exponent) || std::isnan(base))
|
||||
{
|
||||
snprintf(tmp, 312, "%f", fResult.floatVal);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
fResult.strVal.assign(removeTrailing0(tmp, 312));
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(tmp, 312, "%.5f", base);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
std::string tmpCat(removeTrailing0(tmp, 312));
|
||||
snprintf(tmp, 312, "e%02d", exponent);
|
||||
fResult.strVal += tmp;
|
||||
tmpCat += tmp;
|
||||
fResult.strVal.assign(tmpCat);
|
||||
}
|
||||
|
||||
// snprintf(tmp, 312, "%e.5", fResult.floatVal);
|
||||
@ -558,7 +564,7 @@ inline const std::string& TreeNode::getStrVal(const long timeZone)
|
||||
if ((fabs(fResult.doubleVal) > (1.0 / IDB_pow[13])) && (fabs(fResult.doubleVal) < (float)IDB_pow[15]))
|
||||
{
|
||||
snprintf(tmp, 312, "%f", fResult.doubleVal);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
fResult.strVal.assign(removeTrailing0(tmp, 312));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -569,14 +575,15 @@ inline const std::string& TreeNode::getStrVal(const long timeZone)
|
||||
if (std::isnan(exponent) || std::isnan(base))
|
||||
{
|
||||
snprintf(tmp, 312, "%f", fResult.doubleVal);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
fResult.strVal.assign(removeTrailing0(tmp, 312));
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(tmp, 312, "%.9f", base);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
std::string tmpCat(removeTrailing0(tmp, 312));
|
||||
snprintf(tmp, 312, "e%02d", exponent);
|
||||
fResult.strVal += tmp;
|
||||
tmpCat += tmp;
|
||||
fResult.strVal.assign(tmpCat);
|
||||
}
|
||||
|
||||
// snprintf(tmp, 312, "%e", fResult.doubleVal);
|
||||
@ -592,7 +599,7 @@ inline const std::string& TreeNode::getStrVal(const long timeZone)
|
||||
(fabsl(fResult.longDoubleVal) < (float)IDB_pow[15]))
|
||||
{
|
||||
snprintf(tmp, 312, "%Lf", fResult.longDoubleVal);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
fResult.strVal.assign(removeTrailing0(tmp, 312));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -603,14 +610,15 @@ inline const std::string& TreeNode::getStrVal(const long timeZone)
|
||||
if (std::isnan(exponent) || std::isnan(base))
|
||||
{
|
||||
snprintf(tmp, 312, "%Lf", fResult.longDoubleVal);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
fResult.strVal.assign(removeTrailing0(tmp, 312));
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(tmp, 312, "%.14Lf", base);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
std::string tmpCat = removeTrailing0(tmp, 312);
|
||||
snprintf(tmp, 312, "e%02d", exponent);
|
||||
fResult.strVal += tmp;
|
||||
tmpCat += tmp;
|
||||
fResult.strVal.assign(tmpCat);
|
||||
}
|
||||
|
||||
// snprintf(tmp, 312, "%e", fResult.doubleVal);
|
||||
@ -624,38 +632,42 @@ inline const std::string& TreeNode::getStrVal(const long timeZone)
|
||||
case CalpontSystemCatalog::UDECIMAL:
|
||||
{
|
||||
if (fResultType.colWidth == datatypes::MAXDECIMALWIDTH)
|
||||
{
|
||||
// Explicit path for TSInt128 decimals with low precision
|
||||
fResult.strVal = fResult.decimalVal.toString(true);
|
||||
fResult.strVal = fResult.decimalVal.toNullString(true);
|
||||
}
|
||||
else
|
||||
fResult.strVal = fResult.decimalVal.toString();
|
||||
{
|
||||
fResult.strVal = fResult.decimalVal.toNullString(false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case CalpontSystemCatalog::DATE:
|
||||
{
|
||||
dataconvert::DataConvert::dateToString(fResult.intVal, tmp, 255);
|
||||
fResult.strVal = std::string(tmp);
|
||||
fResult.strVal.assign(std::string(tmp));
|
||||
break;
|
||||
}
|
||||
|
||||
case CalpontSystemCatalog::DATETIME:
|
||||
{
|
||||
dataconvert::DataConvert::datetimeToString(fResult.intVal, tmp, 255, fResultType.precision);
|
||||
fResult.strVal = std::string(tmp);
|
||||
fResult.strVal.assign(std::string(tmp));
|
||||
break;
|
||||
}
|
||||
|
||||
case CalpontSystemCatalog::TIMESTAMP:
|
||||
{
|
||||
dataconvert::DataConvert::timestampToString(fResult.intVal, tmp, 255, timeZone, fResultType.precision);
|
||||
fResult.strVal = std::string(tmp);
|
||||
fResult.strVal.assign(std::string(tmp));
|
||||
break;
|
||||
}
|
||||
|
||||
case CalpontSystemCatalog::TIME:
|
||||
{
|
||||
dataconvert::DataConvert::timeToString(fResult.intVal, tmp, 255, fResultType.precision);
|
||||
fResult.strVal = std::string(tmp);
|
||||
fResult.strVal.assign(std::string(tmp));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -676,7 +688,7 @@ inline int64_t TreeNode::getIntVal()
|
||||
return fResult.intVal;
|
||||
}
|
||||
datatypes::DataCondition cnverr;
|
||||
literal::Converter<literal::SignedInteger> cnv(fResult.strVal, cnverr);
|
||||
literal::Converter<literal::SignedInteger> cnv(fResult.strVal.safeString(""), cnverr);
|
||||
return cnv.toSInt<int64_t>(cnverr);
|
||||
}
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
@ -688,7 +700,7 @@ inline int64_t TreeNode::getIntVal()
|
||||
return fResult.intVal;
|
||||
|
||||
datatypes::DataCondition cnverr;
|
||||
literal::Converter<literal::SignedInteger> cnv(fResult.strVal, cnverr);
|
||||
literal::Converter<literal::SignedInteger> cnv(fResult.strVal.safeString(""), cnverr);
|
||||
return cnv.toSInt<int64_t>(cnverr);
|
||||
}
|
||||
|
||||
@ -736,10 +748,10 @@ inline uint64_t TreeNode::getUintVal()
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
{
|
||||
datatypes::DataCondition cnverr;
|
||||
literal::Converter<literal::UnsignedInteger> cnv(fResult.strVal, cnverr);
|
||||
literal::Converter<literal::UnsignedInteger> cnv(fResult.strVal.safeString(""), cnverr);
|
||||
if (datatypes::DataCondition::Code(cnverr) != 0)
|
||||
{
|
||||
cerr << "error in unsigned int conversion from '" << fResult.strVal << "'";
|
||||
cerr << "error in unsigned int conversion from '" << fResult.strVal.safeString() << "'";
|
||||
}
|
||||
return cnv.toXIntPositive<uint64_t>(cnverr);
|
||||
}
|
||||
@ -784,13 +796,15 @@ inline float TreeNode::getFloatVal()
|
||||
if (fResultType.colWidth <= 8)
|
||||
return atof((char*)(&fResult.origIntVal));
|
||||
|
||||
return atof(fResult.strVal.c_str());
|
||||
idbassert(fResult.strVal.str());
|
||||
return atof(fResult.strVal.str());
|
||||
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
if (fResultType.colWidth <= 7)
|
||||
return atof((char*)(&fResult.origIntVal));
|
||||
|
||||
return atof(fResult.strVal.c_str());
|
||||
idbassert(fResult.strVal.str());
|
||||
return atof(fResult.strVal.str());
|
||||
|
||||
// FIXME: ???
|
||||
case CalpontSystemCatalog::VARBINARY:
|
||||
@ -799,7 +813,8 @@ inline float TreeNode::getFloatVal()
|
||||
if (fResultType.colWidth <= 7)
|
||||
return atof((char*)(&fResult.origIntVal));
|
||||
|
||||
return atof(fResult.strVal.c_str());
|
||||
idbassert(fResult.strVal.str());
|
||||
return atof(fResult.strVal.str());
|
||||
|
||||
case CalpontSystemCatalog::BIGINT:
|
||||
case CalpontSystemCatalog::TINYINT:
|
||||
@ -852,13 +867,15 @@ inline double TreeNode::getDoubleVal()
|
||||
if (fResultType.colWidth <= 8)
|
||||
return strtod((char*)(&fResult.origIntVal), NULL);
|
||||
|
||||
return strtod(fResult.strVal.c_str(), NULL);
|
||||
idbassert(fResult.strVal.str());
|
||||
return strtod(fResult.strVal.str(), NULL);
|
||||
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
if (fResultType.colWidth <= 7)
|
||||
return strtod((char*)(&fResult.origIntVal), NULL);
|
||||
|
||||
return strtod(fResult.strVal.c_str(), NULL);
|
||||
idbassert(fResult.strVal.str());
|
||||
return strtod(fResult.strVal.str(), NULL);
|
||||
|
||||
// FIXME: ???
|
||||
case CalpontSystemCatalog::VARBINARY:
|
||||
@ -867,7 +884,8 @@ inline double TreeNode::getDoubleVal()
|
||||
if (fResultType.colWidth <= 7)
|
||||
return strtod((char*)(&fResult.origIntVal), NULL);
|
||||
|
||||
return strtod(fResult.strVal.c_str(), NULL);
|
||||
//idbassert(fResult.strVal.str());
|
||||
return strtod(fResult.strVal.safeString("").c_str(), NULL);
|
||||
|
||||
case CalpontSystemCatalog::BIGINT:
|
||||
case CalpontSystemCatalog::TINYINT:
|
||||
@ -920,13 +938,15 @@ inline long double TreeNode::getLongDoubleVal()
|
||||
if (fResultType.colWidth <= 8)
|
||||
return strtold((char*)(&fResult.origIntVal), NULL);
|
||||
|
||||
return strtold(fResult.strVal.c_str(), NULL);
|
||||
idbassert(fResult.strVal.str());
|
||||
return strtold(fResult.strVal.str(), NULL);
|
||||
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
if (fResultType.colWidth <= 7)
|
||||
return strtold((char*)(&fResult.origIntVal), NULL);
|
||||
|
||||
return strtold(fResult.strVal.c_str(), NULL);
|
||||
idbassert(fResult.strVal.str());
|
||||
return strtold(fResult.strVal.str(), NULL);
|
||||
|
||||
// FIXME: ???
|
||||
case CalpontSystemCatalog::VARBINARY:
|
||||
@ -935,7 +955,8 @@ inline long double TreeNode::getLongDoubleVal()
|
||||
if (fResultType.colWidth <= 7)
|
||||
return strtold((char*)(&fResult.origIntVal), NULL);
|
||||
|
||||
return strtold(fResult.strVal.c_str(), NULL);
|
||||
idbassert(fResult.strVal.str());
|
||||
return strtold(fResult.strVal.str(), NULL);
|
||||
|
||||
case CalpontSystemCatalog::BIGINT:
|
||||
case CalpontSystemCatalog::TINYINT:
|
||||
|
@ -522,15 +522,18 @@ void WindowFunctionColumn::evaluate(Row& row, bool& isNull)
|
||||
// fallthrough
|
||||
default:
|
||||
{
|
||||
const auto str = row.getConstString(fInputIndex);
|
||||
if (str.eq(utils::ConstString(CPNULLSTRMARK)))
|
||||
const auto str = row.getStringField(fInputIndex);
|
||||
if (str.isNull())
|
||||
{
|
||||
isNull = true;
|
||||
fResult.strVal.dropString();
|
||||
}
|
||||
else
|
||||
fResult.strVal = str.toString();
|
||||
fResult.strVal.assign(str.unsafeStringRef());
|
||||
|
||||
// stringColVal is padded with '\0' to colWidth so can't use str.length()
|
||||
if (strlen(fResult.strVal.c_str()) == 0)
|
||||
isNull = true;
|
||||
//if (strlen(fResult.strVal.str()) == 0)
|
||||
// isNull = true;
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -189,10 +189,13 @@ class WindowFunctionColumn : public ReturnedColumn
|
||||
* F&E framework *
|
||||
***********************************************************/
|
||||
public:
|
||||
virtual const std::string& getStrVal(rowgroup::Row& row, bool& isNull) override
|
||||
using TreeNode::getStrVal;
|
||||
virtual const utils::NullString& getStrVal(rowgroup::Row& row, bool& isNull) override
|
||||
{
|
||||
evaluate(row, isNull);
|
||||
return TreeNode::getStrVal(fTimeZone);
|
||||
bool localIsNull = false;
|
||||
evaluate(row, localIsNull);
|
||||
isNull = isNull || localIsNull;
|
||||
return localIsNull ? fResult.strVal.dropString() : TreeNode::getStrVal(fTimeZone);
|
||||
}
|
||||
|
||||
virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull) override
|
||||
|
@ -161,9 +161,9 @@ void CrossEngineStep::setField(int i, const char* value, unsigned long length, M
|
||||
row.getColumnWidth(i) > 8)
|
||||
{
|
||||
if (value != NULL)
|
||||
row.setStringField(value, i);
|
||||
row.setStringField((const uint8_t*)value, length, i);
|
||||
else
|
||||
row.setStringField("", i);
|
||||
row.setStringField(nullptr, 0, i);
|
||||
}
|
||||
else if ((colType == CalpontSystemCatalog::BLOB) || (colType == CalpontSystemCatalog::TEXT) ||
|
||||
(colType == CalpontSystemCatalog::VARBINARY))
|
||||
@ -196,7 +196,8 @@ void CrossEngineStep::setField(int i, const char* value, unsigned long length, M
|
||||
ct.precision = row.getPrecision(i);
|
||||
}
|
||||
|
||||
row.setIntField(convertValueNum<int64_t>(value, ct), i);
|
||||
int64_t v = convertValueNum<int64_t>(value, ct);
|
||||
row.setIntField(v, i);
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,9 +224,8 @@ T CrossEngineStep::convertValueNum(const char* str, const CalpontSystemCatalog::
|
||||
T rv = 0;
|
||||
bool pushWarning = false;
|
||||
bool nullFlag = (str == NULL);
|
||||
boost::any anyVal =
|
||||
ct.convertColumnData((nullFlag ? "" : str), pushWarning, fTimeZone, nullFlag, true, false);
|
||||
|
||||
boost::any anyVal;
|
||||
anyVal = ct.convertColumnData((nullFlag ? "" : str), pushWarning, fTimeZone, nullFlag, true, false);
|
||||
// Out of range values are treated as NULL as discussed during design review.
|
||||
if (pushWarning)
|
||||
{
|
||||
@ -302,10 +302,17 @@ T CrossEngineStep::convertValueNum(const char* str, const CalpontSystemCatalog::
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
case CalpontSystemCatalog::CLOB:
|
||||
{
|
||||
std::string i = boost::any_cast<std::string>(anyVal);
|
||||
// bug 1932, pad nulls up to the size of v
|
||||
i.resize(sizeof(rv), 0);
|
||||
rv = *((uint64_t*)i.data());
|
||||
if (nullFlag)
|
||||
{
|
||||
rv = joblist::CHAR8NULL; // SZ: I hate that.
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string i = boost::any_cast<std::string>(anyVal);
|
||||
// bug 1932, pad nulls up to the size of v
|
||||
i.resize(sizeof(rv), 0);
|
||||
rv = *((uint64_t*)i.data());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -351,11 +351,17 @@ template <typename SrcType>
|
||||
/* static */ inline void ElementCompression::writeWith32Rid(const StringElementType& e, std::fstream& fFile)
|
||||
{
|
||||
uint32_t rid = e.first;
|
||||
uint16_t dlen = e.second.length();
|
||||
|
||||
fFile.write((char*)&rid, sizeof(rid));
|
||||
fFile.write((char*)&dlen, sizeof(dlen));
|
||||
fFile.write(e.second.c_str(), dlen);
|
||||
uint8_t isNull = e.second.isNull();
|
||||
fFile.write((char*)(&isNull), sizeof(isNull));
|
||||
if (!isNull)
|
||||
{
|
||||
idbassert(e.second.length() < 32768);
|
||||
uint16_t dlen = e.second.length();
|
||||
fFile.write((char*)&dlen, sizeof(dlen));
|
||||
fFile.write(e.second.str(), dlen);
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ inline void ElementCompression::writeWith32Rid(const RIDElementType& e, std::fstream& fFile)
|
||||
@ -380,15 +386,25 @@ template <typename SrcType>
|
||||
/* static */ inline void ElementCompression::readWith32Rid(StringElementType& e, std::fstream& fFile)
|
||||
{
|
||||
uint32_t rid = 0;
|
||||
uint16_t dlen = 0;
|
||||
char d[32768];
|
||||
|
||||
fFile.read((char*)&rid, sizeof(rid));
|
||||
fFile.read((char*)&dlen, sizeof(dlen));
|
||||
fFile.read(d, dlen);
|
||||
|
||||
e.first = rid;
|
||||
e.second.assign(d, dlen);
|
||||
|
||||
uint8_t isNull;
|
||||
fFile.read((char*)(&isNull), sizeof(isNull));
|
||||
if (isNull)
|
||||
{
|
||||
e.second.dropString();
|
||||
}
|
||||
else
|
||||
{
|
||||
uint16_t dlen = 0;
|
||||
char d[32768];
|
||||
fFile.read((char*)&dlen, sizeof(dlen));
|
||||
fFile.read(d, dlen);
|
||||
e.second.assign((const uint8_t*)d, dlen);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* static */ inline void ElementCompression::readWith32Rid(RIDElementType& e, std::fstream& fFile)
|
||||
|
@ -64,20 +64,73 @@ ostream& operator<<(ostream& out, const ElementType& rhs)
|
||||
return out;
|
||||
}
|
||||
|
||||
static ostream& writeRid(std::ostream& out, const uint64_t& rhs)
|
||||
{
|
||||
out.write((const char*) (&rhs), sizeof(rhs));
|
||||
return out;
|
||||
}
|
||||
|
||||
std::istream& operator >>(std::istream& in, utils::NullString& ns)
|
||||
{
|
||||
uint8_t isNull;
|
||||
in.read((char*)(&isNull), sizeof(isNull));
|
||||
if (!isNull)
|
||||
{
|
||||
uint16_t len;
|
||||
char t[32768];
|
||||
in.read((char*)(&len), sizeof(len));
|
||||
in.read(t, len);
|
||||
ns.assign((const uint8_t*)t, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
ns.dropString();
|
||||
}
|
||||
return in;
|
||||
}
|
||||
|
||||
std::ostream& operator <<(std::ostream& out, const utils::NullString& ns)
|
||||
{
|
||||
uint8_t isNull = ns.isNull();
|
||||
out.write((char*)(&isNull), sizeof(isNull));
|
||||
if (!isNull)
|
||||
{
|
||||
idbassert(ns.length() < 32768);
|
||||
uint16_t len = ns.length();
|
||||
out.write((char*)(&len), sizeof(len));
|
||||
out.write(ns.str(), ns.length());
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
// XXX: somewhat hacky. there's an operator with unknown/unneccessarily complex semantics, so I invented mine's, with
|
||||
// slightly different types.
|
||||
static istream& readRid(std::istream& in, uint64_t& rhs)
|
||||
{
|
||||
in.read((char*)(&rhs), sizeof(rhs));
|
||||
return in;
|
||||
}
|
||||
|
||||
ostream& operator<<(std::ostream& out, const StringElementType& rhs)
|
||||
{
|
||||
#if 0
|
||||
uint64_t r = rhs.first;
|
||||
int16_t dlen = rhs.second.length();
|
||||
|
||||
out.write((char*)&r, sizeof(r));
|
||||
out.write((char*)&dlen, sizeof(dlen));
|
||||
out.write(rhs.second.c_str(), dlen);
|
||||
#else
|
||||
writeRid(out, rhs.first);
|
||||
out << rhs.second;
|
||||
#endif
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
istream& operator>>(std::istream& out, StringElementType& rhs)
|
||||
{
|
||||
#if 0
|
||||
uint64_t r;
|
||||
int16_t dlen;
|
||||
char d[32768]; // atm 32k is the largest possible val for the length of strings stored
|
||||
@ -88,6 +141,10 @@ istream& operator>>(std::istream& out, StringElementType& rhs)
|
||||
|
||||
rhs.first = r;
|
||||
rhs.second = string(d, dlen);
|
||||
#else
|
||||
readRid(out, rhs.first);
|
||||
out >> rhs.second;
|
||||
#endif
|
||||
|
||||
return out;
|
||||
}
|
||||
|
@ -76,10 +76,10 @@ struct ElementType
|
||||
struct StringElementType
|
||||
{
|
||||
typedef uint64_t first_type;
|
||||
typedef std::string second_type;
|
||||
typedef utils::NullString second_type;
|
||||
|
||||
uint64_t first;
|
||||
std::string second;
|
||||
utils::NullString second;
|
||||
|
||||
StringElementType();
|
||||
StringElementType(uint64_t f, const std::string& s);
|
||||
@ -90,7 +90,7 @@ struct StringElementType
|
||||
{
|
||||
case 0: *len = sizeof(first); return (char*)&first;
|
||||
|
||||
case 1: *len = second.size(); return (char*)second.data();
|
||||
case 1: *len = second.length(); return (char*)second.str();
|
||||
|
||||
default: throw std::logic_error("StringElementType: invalid mode in getHashString().");
|
||||
}
|
||||
|
@ -339,11 +339,6 @@ void GroupConcatAgUM::merge(const rowgroup::Row& inRow, int64_t i)
|
||||
fConcator->merge(gccAg->concator().get());
|
||||
}
|
||||
|
||||
void GroupConcatAgUM::getResult(uint8_t* buff)
|
||||
{
|
||||
fConcator->getResultImpl(fGroupConcat->fSeparator);
|
||||
}
|
||||
|
||||
uint8_t* GroupConcatAgUM::getResult()
|
||||
{
|
||||
return fConcator->getResult(fGroupConcat->fSeparator);
|
||||
@ -400,21 +395,22 @@ void GroupConcator::initialize(const rowgroup::SP_GroupConcat& gcc)
|
||||
// MCOL-901 This value comes from the Server and it is
|
||||
// too high(3MB) to allocate it for every instance.
|
||||
fGroupConcatLen = gcc->fSize;
|
||||
fCurrentLength -= strlen(gcc->fSeparator.c_str());
|
||||
size_t sepSize = gcc->fSeparator.size();
|
||||
fCurrentLength -= sepSize; // XXX Yet I have to find out why spearator has c_str() as nullptr here.
|
||||
fTimeZone = gcc->fTimeZone;
|
||||
|
||||
fConstCols = gcc->fConstCols;
|
||||
fConstantLen = strlen(gcc->fSeparator.c_str());
|
||||
fConstantLen = sepSize;
|
||||
|
||||
for (uint64_t i = 0; i < fConstCols.size(); i++)
|
||||
fConstantLen += strlen(fConstCols[i].first.c_str());
|
||||
fConstantLen += strlen(fConstCols[i].first.str());
|
||||
}
|
||||
|
||||
void GroupConcator::outputRow(std::ostringstream& oss, const rowgroup::Row& row)
|
||||
{
|
||||
const CalpontSystemCatalog::ColDataType* types = row.getColTypes();
|
||||
vector<uint32_t>::iterator i = fConcatColumns.begin();
|
||||
vector<pair<string, uint32_t> >::iterator j = fConstCols.begin();
|
||||
auto j = fConstCols.begin();
|
||||
|
||||
uint64_t groupColCount = fConcatColumns.size() + fConstCols.size();
|
||||
|
||||
@ -422,7 +418,7 @@ void GroupConcator::outputRow(std::ostringstream& oss, const rowgroup::Row& row)
|
||||
{
|
||||
if (j != fConstCols.end() && k == j->second)
|
||||
{
|
||||
oss << j->first;
|
||||
oss << j->first.safeString();
|
||||
j++;
|
||||
continue;
|
||||
}
|
||||
@ -476,7 +472,7 @@ void GroupConcator::outputRow(std::ostringstream& oss, const rowgroup::Row& row)
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
{
|
||||
oss << row.getStringField(*i).c_str();
|
||||
oss << row.getStringField(*i).str();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -677,7 +673,7 @@ const string GroupConcator::toString() const
|
||||
oss << "GroupConcat size-" << fGroupConcatLen;
|
||||
oss << "Concat cols: ";
|
||||
vector<uint32_t>::const_iterator i = fConcatColumns.begin();
|
||||
vector<pair<string, uint32_t> >::const_iterator j = fConstCols.begin();
|
||||
auto j = fConstCols.begin();
|
||||
uint64_t groupColCount = fConcatColumns.size() + fConstCols.size();
|
||||
|
||||
for (uint64_t k = 0; k < groupColCount; k++)
|
||||
@ -725,9 +721,12 @@ void GroupConcatOrderBy::initialize(const rowgroup::SP_GroupConcat& gcc)
|
||||
fSessionMemLimit = gcc->fSessionMemLimit;
|
||||
|
||||
vector<std::pair<uint32_t, uint32_t> >::iterator i = gcc->fGroupCols.begin();
|
||||
|
||||
while (i != gcc->fGroupCols.end())
|
||||
fConcatColumns.push_back((*(i++)).second);
|
||||
{
|
||||
auto x = (*i).second;
|
||||
fConcatColumns.push_back(x);
|
||||
i++;
|
||||
}
|
||||
|
||||
IdbOrderBy::initialize(gcc->fRowGroup);
|
||||
}
|
||||
@ -878,6 +877,7 @@ uint8_t* GroupConcatOrderBy::getResultImpl(const string& sep)
|
||||
|
||||
size_t prevResultSize = 0;
|
||||
size_t rowsProcessed = 0;
|
||||
bool isNull = true;
|
||||
while (rowStack.size() > 0)
|
||||
{
|
||||
if (addSep)
|
||||
@ -888,6 +888,7 @@ uint8_t* GroupConcatOrderBy::getResultImpl(const string& sep)
|
||||
const OrderByRow& topRow = rowStack.top();
|
||||
fRow0.setData(topRow.fData);
|
||||
outputRow(oss, fRow0);
|
||||
isNull = false;
|
||||
rowStack.pop();
|
||||
if (rowsProcessed >= fRowsPerRG)
|
||||
{
|
||||
@ -903,11 +904,15 @@ uint8_t* GroupConcatOrderBy::getResultImpl(const string& sep)
|
||||
}
|
||||
}
|
||||
|
||||
return swapStreamWithStringAndReturnBuf(oss);
|
||||
return swapStreamWithStringAndReturnBuf(oss, isNull);
|
||||
}
|
||||
|
||||
uint8_t* GroupConcator::swapStreamWithStringAndReturnBuf(ostringstream& oss)
|
||||
uint8_t* GroupConcator::swapStreamWithStringAndReturnBuf(ostringstream& oss, bool isNull)
|
||||
{
|
||||
if (isNull) {
|
||||
outputBuf_.reset();
|
||||
return nullptr;
|
||||
}
|
||||
int64_t resultSize = oss.str().size();
|
||||
oss << '\0' << '\0';
|
||||
outputBuf_.reset(new std::string(std::move(*oss.rdbuf()).str()));
|
||||
@ -983,6 +988,7 @@ void GroupConcatNoOrder::initialize(const rowgroup::SP_GroupConcat& gcc)
|
||||
cerr << IDBErrorInfo::instance()->errorMsg(fErrorCode) << " @" << __FILE__ << ":" << __LINE__;
|
||||
throw IDBExcept(fErrorCode);
|
||||
}
|
||||
|
||||
fMemSize += newSize;
|
||||
|
||||
fData.reinit(fRowGroup, fRowsPerRG);
|
||||
@ -1046,9 +1052,11 @@ uint8_t* GroupConcatNoOrder::getResultImpl(const string& sep)
|
||||
{
|
||||
ostringstream oss;
|
||||
bool addSep = false;
|
||||
|
||||
fDataQueue.push(fData);
|
||||
size_t prevResultSize = 0;
|
||||
|
||||
bool isNull = true;
|
||||
while (fDataQueue.size() > 0)
|
||||
{
|
||||
fRowGroup.setData(&fDataQueue.front());
|
||||
@ -1062,6 +1070,7 @@ uint8_t* GroupConcatNoOrder::getResultImpl(const string& sep)
|
||||
addSep = true;
|
||||
|
||||
outputRow(oss, fRow);
|
||||
isNull = false;
|
||||
fRow.nextRow();
|
||||
}
|
||||
size_t sizeDiff = oss.str().size() - prevResultSize;
|
||||
@ -1075,7 +1084,7 @@ uint8_t* GroupConcatNoOrder::getResultImpl(const string& sep)
|
||||
fDataQueue.pop();
|
||||
}
|
||||
|
||||
return swapStreamWithStringAndReturnBuf(oss);
|
||||
return swapStreamWithStringAndReturnBuf(oss, isNull);
|
||||
}
|
||||
|
||||
const string GroupConcatNoOrder::toString() const
|
||||
|
@ -84,7 +84,6 @@ class GroupConcatAgUM : public rowgroup::GroupConcatAg
|
||||
return fConcator;
|
||||
}
|
||||
|
||||
EXPORT void getResult(uint8_t*);
|
||||
EXPORT uint8_t* getResult();
|
||||
|
||||
protected:
|
||||
@ -109,7 +108,7 @@ class GroupConcator
|
||||
virtual void merge(GroupConcator*) = 0;
|
||||
virtual uint8_t* getResultImpl(const std::string& sep) = 0;
|
||||
virtual uint8_t* getResult(const std::string& sep);
|
||||
virtual uint8_t* swapStreamWithStringAndReturnBuf(ostringstream& oss);
|
||||
uint8_t* swapStreamWithStringAndReturnBuf(ostringstream& oss, bool isNull);
|
||||
|
||||
virtual const std::string toString() const;
|
||||
|
||||
@ -119,7 +118,7 @@ class GroupConcator
|
||||
virtual int64_t lengthEstimate(const rowgroup::Row&);
|
||||
|
||||
std::vector<uint32_t> fConcatColumns;
|
||||
std::vector<std::pair<std::string, uint32_t> > fConstCols;
|
||||
std::vector<std::pair<utils::NullString, uint32_t> > fConstCols;
|
||||
int64_t fCurrentLength;
|
||||
int64_t fGroupConcatLen;
|
||||
int64_t fConstantLen;
|
||||
@ -140,6 +139,7 @@ class GroupConcatNoOrder : public GroupConcator
|
||||
void merge(GroupConcator*);
|
||||
using GroupConcator::getResult;
|
||||
uint8_t* getResultImpl(const std::string& sep);
|
||||
//uint8_t* getResult(const std::string& sep);
|
||||
|
||||
const std::string toString() const;
|
||||
|
||||
@ -171,6 +171,7 @@ class GroupConcatOrderBy : public GroupConcator, public ordering::IdbOrderBy
|
||||
void merge(GroupConcator*);
|
||||
using GroupConcator::getResult;
|
||||
uint8_t* getResultImpl(const std::string& sep);
|
||||
//uint8_t* getResult(const std::string& sep);
|
||||
|
||||
const std::string toString() const;
|
||||
|
||||
|
@ -276,7 +276,7 @@ template <typename T>
|
||||
void convertValueNum(const string& str, const CalpontSystemCatalog::ColType& ct, bool isNull, uint8_t& rf,
|
||||
const long timeZone, T& v)
|
||||
{
|
||||
if (str.size() == 0 || isNull)
|
||||
if (isNull)
|
||||
{
|
||||
valueNullNum(ct, timeZone, v);
|
||||
return;
|
||||
@ -1486,7 +1486,8 @@ bool optimizeIdbPatitionSimpleFilter(SimpleFilter* sf, JobStepVector& jsv, JobIn
|
||||
|
||||
// make sure the cc has 3 tokens
|
||||
vector<string> cv;
|
||||
boost::split(cv, cc->constval(), boost::is_any_of("."));
|
||||
auto str = cc->constval().safeString("");
|
||||
boost::split(cv, str, boost::is_any_of("."));
|
||||
|
||||
if (cv.size() != 3)
|
||||
return false;
|
||||
@ -1555,13 +1556,13 @@ const JobStepVector doSimpleFilter(SimpleFilter* sf, JobInfo& jobInfo)
|
||||
else if (sc->schemaName().empty())
|
||||
{
|
||||
// bug 3749, mark outer join table with isNull filter
|
||||
if (ConstantColumn::NULLDATA == cc->type() && (opis == *sop || opisnull == *sop))
|
||||
if (cc->isNull() && (opis == *sop || opisnull == *sop))
|
||||
jobInfo.tableHasIsNull.insert(getTableKey(jobInfo, tbl_oid, alias, "", view));
|
||||
|
||||
return doExpressionFilter(sf, jobInfo);
|
||||
}
|
||||
|
||||
string constval(cc->constval());
|
||||
utils::NullString constval(cc->constval());
|
||||
|
||||
CalpontSystemCatalog::OID dictOid = 0;
|
||||
CalpontSystemCatalog::ColType ct = sc->colType();
|
||||
@ -1577,7 +1578,7 @@ const JobStepVector doSimpleFilter(SimpleFilter* sf, JobInfo& jobInfo)
|
||||
// X
|
||||
|
||||
//@bug 339 nulls are not stored in dictionary
|
||||
if ((dictOid = isDictCol(ct)) > 0 && ConstantColumn::NULLDATA != cc->type())
|
||||
if ((dictOid = isDictCol(ct)) > 0 && !cc->isNull())
|
||||
{
|
||||
if (jobInfo.trace)
|
||||
cout << "Emit pTokenByScan/pCol for SimpleColumn op ConstantColumn" << endl;
|
||||
@ -1603,7 +1604,7 @@ const JobStepVector doSimpleFilter(SimpleFilter* sf, JobInfo& jobInfo)
|
||||
pds->cardinality(sc->cardinality());
|
||||
|
||||
// Add the filter
|
||||
pds->addFilter(cop, constval);
|
||||
pds->addFilter(cop, constval.safeString(""));
|
||||
|
||||
// data list for pcolstep output
|
||||
AnyDataListSPtr spdl1(new AnyDataList());
|
||||
@ -1666,7 +1667,7 @@ const JobStepVector doSimpleFilter(SimpleFilter* sf, JobInfo& jobInfo)
|
||||
pds->cardinality(sc->cardinality());
|
||||
|
||||
// Add the filter
|
||||
pds->addFilter(cop, constval);
|
||||
pds->addFilter(cop, constval.safeString(""));
|
||||
|
||||
// save for expression transformation
|
||||
pds->addFilter(sf);
|
||||
@ -1736,7 +1737,7 @@ const JobStepVector doSimpleFilter(SimpleFilter* sf, JobInfo& jobInfo)
|
||||
jsv.push_back(sjstep);
|
||||
}
|
||||
}
|
||||
else if (ConstantColumn::NULLDATA != cc->type() && (cop & COMPARE_LIKE)) // both like and not like
|
||||
else if (!cc->isNull() && (cop & COMPARE_LIKE)) // both like and not like
|
||||
{
|
||||
return doExpressionFilter(sf, jobInfo);
|
||||
}
|
||||
@ -1752,8 +1753,8 @@ const JobStepVector doSimpleFilter(SimpleFilter* sf, JobInfo& jobInfo)
|
||||
// throwing
|
||||
try
|
||||
{
|
||||
bool isNull = ConstantColumn::NULLDATA == cc->type();
|
||||
convertValueNum(constval, ct, isNull, rf, jobInfo.timeZone, value);
|
||||
bool isNull = cc->isNull();
|
||||
convertValueNum(constval.safeString(""), ct, isNull, rf, jobInfo.timeZone, value);
|
||||
|
||||
if (ct.colDataType == CalpontSystemCatalog::FLOAT && !isNull)
|
||||
{
|
||||
@ -1789,12 +1790,12 @@ const JobStepVector doSimpleFilter(SimpleFilter* sf, JobInfo& jobInfo)
|
||||
}
|
||||
|
||||
#else
|
||||
bool isNull = ConstantColumn::NULLDATA == cc->type();
|
||||
bool isNull = cc->isNull();
|
||||
|
||||
if (ct.isWideDecimalType())
|
||||
convertValueNum(constval, ct, isNull, rf, jobInfo.timeZone, value128);
|
||||
convertValueNum(constval.safeString(""), ct, isNull, rf, jobInfo.timeZone, value128);
|
||||
else
|
||||
convertValueNum(constval, ct, isNull, rf, jobInfo.timeZone, value);
|
||||
convertValueNum(constval.safeString(""), ct, isNull, rf, jobInfo.timeZone, value);
|
||||
|
||||
if (ct.colDataType == CalpontSystemCatalog::FLOAT && !isNull)
|
||||
{
|
||||
@ -1810,12 +1811,12 @@ const JobStepVector doSimpleFilter(SimpleFilter* sf, JobInfo& jobInfo)
|
||||
#endif
|
||||
|
||||
// @bug 2584, make "= null" to COMPARE_NIL.
|
||||
if (ConstantColumn::NULLDATA == cc->type() && (opeq == *sop || opne == *sop))
|
||||
if (cc->isNull() && (opeq == *sop || opne == *sop))
|
||||
cop = COMPARE_NIL;
|
||||
|
||||
if (jobInfo.trace)
|
||||
cout << "doSimpleFilter Emit pCol for SimpleColumn op ConstantColumn = " << value << " ("
|
||||
<< cc->constval() << ')' << endl;
|
||||
<< cc->constval().safeString() << ')' << endl;
|
||||
|
||||
if (sf->indexFlag() == 0)
|
||||
{
|
||||
@ -1855,7 +1856,7 @@ const JobStepVector doSimpleFilter(SimpleFilter* sf, JobInfo& jobInfo)
|
||||
jobInfo.tokenOnly[ti.key] = true;
|
||||
}
|
||||
|
||||
if (ConstantColumn::NULLDATA == cc->type() && (opis == *sop || opisnull == *sop))
|
||||
if (cc->isNull() && (opis == *sop || opisnull == *sop))
|
||||
jobInfo.tableHasIsNull.insert(getTableKey(jobInfo, tbl_oid, alias, sc->schemaName(), view));
|
||||
}
|
||||
else
|
||||
@ -2699,10 +2700,10 @@ const JobStepVector doConstantFilter(const ConstantFilter* cf, JobInfo& jobInfo)
|
||||
int8_t cop = op2num(sop);
|
||||
|
||||
// @bug 2584, make "= null" to COMPARE_NIL.
|
||||
if (ConstantColumn::NULLDATA == cc->type() && (opeq == *sop || opne == *sop))
|
||||
if (cc->isNull() && (opeq == *sop || opne == *sop))
|
||||
cop = COMPARE_NIL;
|
||||
|
||||
string value = cc->constval();
|
||||
string value = cc->constval().safeString("");
|
||||
// Because, on a filter, we want to compare ignoring trailing spaces
|
||||
boost::algorithm::trim_right_if(value, boost::is_any_of(" "));
|
||||
|
||||
@ -2783,10 +2784,10 @@ const JobStepVector doConstantFilter(const ConstantFilter* cf, JobInfo& jobInfo)
|
||||
int8_t cop = op2num(sop);
|
||||
|
||||
// @bug 2584, make "= null" to COMPARE_NIL.
|
||||
if (ConstantColumn::NULLDATA == cc->type() && (opeq == *sop || opne == *sop))
|
||||
if (cc->isNull() && (opeq == *sop || opne == *sop))
|
||||
cop = COMPARE_NIL;
|
||||
|
||||
string value = cc->constval();
|
||||
string value = cc->constval().safeString("");
|
||||
// Because, on a filter, we want to compare ignoring trailing spaces
|
||||
boost::algorithm::trim_right_if(value, boost::is_any_of(" "));
|
||||
|
||||
@ -2894,11 +2895,11 @@ const JobStepVector doConstantFilter(const ConstantFilter* cf, JobInfo& jobInfo)
|
||||
int8_t cop = op2num(sop);
|
||||
int64_t value = 0;
|
||||
int128_t value128 = 0;
|
||||
string constval = cc->constval();
|
||||
string constval = cc->constval().safeString("");
|
||||
|
||||
// @bug 1151 string longer than colwidth of char/varchar.
|
||||
uint8_t rf = 0;
|
||||
bool isNull = ConstantColumn::NULLDATA == cc->type();
|
||||
bool isNull = cc->isNull();
|
||||
|
||||
if (ct.isWideDecimalType())
|
||||
convertValueNum(constval, ct, isNull, rf, jobInfo.timeZone, value128);
|
||||
@ -2917,7 +2918,7 @@ const JobStepVector doConstantFilter(const ConstantFilter* cf, JobInfo& jobInfo)
|
||||
}
|
||||
|
||||
// @bug 2584, make "= null" to COMPARE_NIL.
|
||||
if (ConstantColumn::NULLDATA == cc->type() && (opeq == *sop || opne == *sop))
|
||||
if (cc->isNull() && (opeq == *sop || opne == *sop))
|
||||
cop = COMPARE_NIL;
|
||||
|
||||
if (ct.isWideDecimalType())
|
||||
@ -2982,7 +2983,8 @@ const JobStepVector doFunctionFilter(const ParseTree* n, JobInfo& jobInfo)
|
||||
if (cc)
|
||||
{
|
||||
vector<string> cv;
|
||||
boost::split(cv, cc->constval(), boost::is_any_of("."));
|
||||
auto str = cc->constval().safeString("");
|
||||
boost::split(cv, str, boost::is_any_of("."));
|
||||
|
||||
if (cv.size() == 3)
|
||||
{
|
||||
@ -3034,7 +3036,7 @@ const JobStepVector doFunctionFilter(const ParseTree* n, JobInfo& jobInfo)
|
||||
|
||||
if (cc)
|
||||
{
|
||||
constParms[0].push_back(cc->constval());
|
||||
constParms[0].push_back(cc->constval().safeString(""));
|
||||
constParmsCount++;
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ void getColumnValue(ConstantColumn** cc, uint64_t i, const Row& row, const long
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
case CalpontSystemCatalog::BLOB:
|
||||
oss << (char*)(row.getStringField(i).c_str());
|
||||
oss << (char*)(row.getStringField(i).str());
|
||||
*cc = new ConstantColumn(oss.str());
|
||||
break;
|
||||
|
||||
@ -508,8 +508,7 @@ const SRCP doSelectSubquery(CalpontExecutionPlan* ep, SRCP& sc, JobInfo& jobInfo
|
||||
// Empty set or null value
|
||||
if (cc == NULL)
|
||||
{
|
||||
cc = new ConstantColumn("");
|
||||
cc->type(ConstantColumn::NULLDATA);
|
||||
cc = new ConstantColumn("", ConstantColumn::NULLDATA);
|
||||
}
|
||||
|
||||
rc.reset(cc);
|
||||
|
@ -332,11 +332,6 @@ void JsonArrayAggregatAgUM::merge(const rowgroup::Row& inRow, int64_t i)
|
||||
fConcator->merge(gccAg->concator().get());
|
||||
}
|
||||
|
||||
void JsonArrayAggregatAgUM::getResult(uint8_t* buff)
|
||||
{
|
||||
fConcator->getResultImpl(fGroupConcat->fSeparator);
|
||||
}
|
||||
|
||||
uint8_t* JsonArrayAggregatAgUM::getResult()
|
||||
{
|
||||
return fConcator->getResult(fGroupConcat->fSeparator);
|
||||
@ -397,14 +392,14 @@ void JsonArrayAggregator::initialize(const rowgroup::SP_GroupConcat& gcc)
|
||||
fConstantLen = strlen(gcc->fSeparator.c_str());
|
||||
|
||||
for (uint64_t i = 0; i < fConstCols.size(); i++)
|
||||
fConstantLen += strlen(fConstCols[i].first.c_str());
|
||||
fConstantLen += fConstCols[i].first.length();
|
||||
}
|
||||
|
||||
void JsonArrayAggregator::outputRow(std::ostringstream& oss, const rowgroup::Row& row)
|
||||
{
|
||||
const CalpontSystemCatalog::ColDataType* types = row.getColTypes();
|
||||
vector<uint32_t>::iterator i = fConcatColumns.begin();
|
||||
vector<pair<string, uint32_t> >::iterator j = fConstCols.begin();
|
||||
vector<pair<utils::NullString, uint32_t> >::iterator j = fConstCols.begin();
|
||||
|
||||
uint64_t groupColCount = fConcatColumns.size() + fConstCols.size();
|
||||
|
||||
@ -412,7 +407,7 @@ void JsonArrayAggregator::outputRow(std::ostringstream& oss, const rowgroup::Row
|
||||
{
|
||||
if (j != fConstCols.end() && k == j->second)
|
||||
{
|
||||
oss << j->first;
|
||||
oss << j->first.safeString(""); // XXX: NULLs???
|
||||
j++;
|
||||
continue;
|
||||
}
|
||||
@ -466,7 +461,7 @@ void JsonArrayAggregator::outputRow(std::ostringstream& oss, const rowgroup::Row
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
{
|
||||
std::string maybeJson = row.getStringField(*i);
|
||||
std::string maybeJson = row.getStringField(*i).safeString(""); // XXX: NULL??? it is not checked anywhere.
|
||||
[[maybe_unused]] const auto j = json::parse(maybeJson, nullptr, false);
|
||||
if (j.is_discarded())
|
||||
{
|
||||
@ -676,7 +671,7 @@ const string JsonArrayAggregator::toString() const
|
||||
oss << "JsonArray size-" << fGroupConcatLen;
|
||||
oss << "Concat cols: ";
|
||||
vector<uint32_t>::const_iterator i = fConcatColumns.begin();
|
||||
vector<pair<string, uint32_t> >::const_iterator j = fConstCols.begin();
|
||||
auto j = fConstCols.begin();
|
||||
uint64_t groupColCount = fConcatColumns.size() + fConstCols.size();
|
||||
|
||||
for (uint64_t k = 0; k < groupColCount; k++)
|
||||
@ -892,7 +887,7 @@ uint8_t* JsonArrayAggOrderBy::getResultImpl(const string&)
|
||||
oss << ']';
|
||||
}
|
||||
|
||||
return swapStreamWithStringAndReturnBuf(oss);
|
||||
return swapStreamWithStringAndReturnBuf(oss, false);
|
||||
}
|
||||
|
||||
const string JsonArrayAggOrderBy::toString() const
|
||||
@ -1035,7 +1030,7 @@ uint8_t* JsonArrayAggNoOrder::getResultImpl(const string&)
|
||||
}
|
||||
oss << ']';
|
||||
}
|
||||
return swapStreamWithStringAndReturnBuf(oss);
|
||||
return swapStreamWithStringAndReturnBuf(oss, false);
|
||||
}
|
||||
|
||||
const string JsonArrayAggNoOrder::toString() const
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -72,6 +72,9 @@ class StringComparator : public datatypes::Charset
|
||||
if (COP & COMPARE_LIKE)
|
||||
return like(COP & COMPARE_NOT, str1, str2);
|
||||
|
||||
if (COP == COMPARE_NULLEQ)
|
||||
return str1.isNull() == str2.isNull(); // XXX: TODO: I do not know the logic here, so it is temporary solution.
|
||||
|
||||
int cmp = strnncollsp(str1, str2);
|
||||
|
||||
switch (COP)
|
||||
@ -575,6 +578,13 @@ struct DictTokenByIndexRequestHeader
|
||||
// DICT_TOKEN_BY_SCAN_COMPARE
|
||||
|
||||
struct DataValue
|
||||
{
|
||||
uint8_t isnull;
|
||||
uint16_t len;
|
||||
char data[];
|
||||
};
|
||||
|
||||
struct NonNullDataValue
|
||||
{
|
||||
uint16_t len;
|
||||
char data[];
|
||||
|
@ -219,12 +219,12 @@ void TableColumn::unserialize(messageqcpp::ByteStream& b)
|
||||
}
|
||||
else if (columnType == STRING)
|
||||
{
|
||||
fStrValues.reset(new std::vector<std::string>());
|
||||
fStrValues.reset(new std::vector<utils::NullString>());
|
||||
fStrValues->reserve(rowCount);
|
||||
std::string value;
|
||||
|
||||
for (uint32_t i = 0; i < rowCount; i++)
|
||||
{
|
||||
NullString value;
|
||||
b >> value;
|
||||
// cout << "UN: " << value << endl;
|
||||
fStrValues->push_back(value);
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "bytestream.h"
|
||||
#include "datalist.h"
|
||||
#include "elementtype.h"
|
||||
#include "nullstring.h"
|
||||
|
||||
//#define TC_CHECK_RIDS 1
|
||||
|
||||
@ -78,7 +79,7 @@ class TableColumn
|
||||
return fIntValues;
|
||||
}
|
||||
|
||||
inline const boost::shared_ptr<std::vector<std::string> > getStrValues()
|
||||
inline const boost::shared_ptr<std::vector<utils::NullString> > getStrValues()
|
||||
{
|
||||
return fStrValues;
|
||||
}
|
||||
@ -114,7 +115,7 @@ class TableColumn
|
||||
fIsNullColumn = fIntValues->empty();
|
||||
}
|
||||
|
||||
inline void setStrValues(boost::shared_ptr<std::vector<std::string> > sv)
|
||||
inline void setStrValues(boost::shared_ptr<std::vector<utils::NullString> > sv)
|
||||
{
|
||||
fStrValues = sv;
|
||||
fIsNullColumn = fStrValues->empty();
|
||||
@ -135,7 +136,7 @@ class TableColumn
|
||||
private:
|
||||
execplan::CalpontSystemCatalog::OID fColumnOID;
|
||||
boost::shared_ptr<std::vector<uint64_t> > fIntValues;
|
||||
boost::shared_ptr<std::vector<std::string> > fStrValues;
|
||||
boost::shared_ptr<std::vector<utils::NullString> > fStrValues;
|
||||
bool fIsNullColumn;
|
||||
supportedType fColumnType;
|
||||
boost::shared_ptr<messageqcpp::ByteStream> preserialized;
|
||||
|
@ -49,7 +49,6 @@
|
||||
#include "aggregatecolumn.h"
|
||||
#include "simplecolumn.h"
|
||||
#include "dataconvert.h"
|
||||
#include "largehashjoin.h"
|
||||
|
||||
using namespace dataconvert;
|
||||
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include "wsdl.h"
|
||||
#include "bucketdl.h"
|
||||
#include "bdlwrapper.h"
|
||||
#include "largehashjoin.h"
|
||||
#include <limits.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
@ -853,7 +853,7 @@ SJSTEP TupleAggregateStep::prepAggregate(SJSTEP& step, JobInfo& jobInfo)
|
||||
|
||||
ConstantColumn* cc = dynamic_cast<ConstantColumn*>(ac->constCol().get());
|
||||
idbassert(cc != NULL); // @bug5261
|
||||
bool isNull = (ConstantColumn::NULLDATA == cc->type());
|
||||
bool isNull = cc->isNull();
|
||||
|
||||
if (ac->aggOp() == AggregateColumn::UDAF)
|
||||
{
|
||||
@ -5883,6 +5883,10 @@ void TupleAggregateStep::pruneAuxColumns()
|
||||
|
||||
for (uint64_t i = 1; i < rowCount; i++)
|
||||
{
|
||||
for (uint32_t j = 0; j < row2.getColumnCount(); j++)
|
||||
{
|
||||
row2.setNullMark(j, row1.getNullMark(j));
|
||||
}
|
||||
// skip the first row
|
||||
row1.nextRow();
|
||||
row2.nextRow();
|
||||
@ -5890,6 +5894,10 @@ void TupleAggregateStep::pruneAuxColumns()
|
||||
// bug4463, memmove for src, dest overlap
|
||||
memmove(row2.getData(), row1.getData(), row2.getSize());
|
||||
}
|
||||
for (uint32_t j = 0; j < row2.getColumnCount(); j++)
|
||||
{
|
||||
row2.setNullMark(j, row1.getNullMark(j));
|
||||
}
|
||||
}
|
||||
|
||||
void TupleAggregateStep::printCalTrace()
|
||||
|
@ -189,12 +189,12 @@ void TupleConstantStep::constructContanstRow(const JobInfo& jobInfo)
|
||||
const ConstantColumn* cc = dynamic_cast<const ConstantColumn*>(jobInfo.deliveredCols[*i].get());
|
||||
const execplan::Result c = cc->result();
|
||||
|
||||
if (cc->type() == ConstantColumn::NULLDATA)
|
||||
if (cc->isNull())
|
||||
{
|
||||
if (types[*i] == CalpontSystemCatalog::CHAR || types[*i] == CalpontSystemCatalog::VARCHAR ||
|
||||
types[*i] == CalpontSystemCatalog::TEXT)
|
||||
{
|
||||
fRowConst.setStringField("", *i);
|
||||
fRowConst.setStringField(nullptr, 0, *i);
|
||||
}
|
||||
else if (isUnsigned(types[*i]))
|
||||
{
|
||||
|
@ -129,14 +129,16 @@ namespace
|
||||
d /= exp10(in.getScale(i));
|
||||
os.precision(15);
|
||||
os << d;
|
||||
out->setStringField(os.str(), i);
|
||||
utils::NullString ns(os.str());
|
||||
out->setStringField(ns, i);
|
||||
}
|
||||
|
||||
void normalizeIntToStringNoScale(const Row& in, Row* out, uint32_t i)
|
||||
{
|
||||
ostringstream os;
|
||||
os << in.getIntField(i);
|
||||
out->setStringField(os.str(), i);
|
||||
utils::NullString ns(os.str());
|
||||
out->setStringField(ns, i);
|
||||
}
|
||||
|
||||
void normalizeIntToXFloat(const Row& in, Row* out, uint32_t i)
|
||||
@ -206,14 +208,16 @@ namespace
|
||||
d /= exp10(in.getScale(i));
|
||||
os.precision(15);
|
||||
os << d;
|
||||
out->setStringField(os.str(), i);
|
||||
utils::NullString ns(os.str());
|
||||
out->setStringField(ns, i);
|
||||
}
|
||||
|
||||
void normalizeUintToStringNoScale(const Row& in, Row* out, uint32_t i)
|
||||
{
|
||||
ostringstream os;
|
||||
os << in.getUintField(i);
|
||||
out->setStringField(os.str(), i);
|
||||
utils::NullString ns(os.str());
|
||||
out->setStringField(ns, i);
|
||||
}
|
||||
|
||||
void normalizUintToXFloat(const Row& in, Row* out, uint32_t i)
|
||||
@ -301,7 +305,8 @@ namespace
|
||||
void normalizeDateToString(const Row& in, Row* out, uint32_t i)
|
||||
{
|
||||
string d = DataConvert::dateToString(in.getUintField(i));
|
||||
out->setStringField(d, i);
|
||||
utils::NullString ns(d);
|
||||
out->setStringField(ns, i);
|
||||
}
|
||||
|
||||
void normalizeDatetimeToDatetime(const Row& in, Row* out, uint32_t i)
|
||||
@ -351,7 +356,8 @@ namespace
|
||||
void normalizeDatetimeToString(const Row& in, Row* out, uint32_t i)
|
||||
{
|
||||
string d = DataConvert::datetimeToString(in.getUintField(i));
|
||||
out->setStringField(d, i);
|
||||
utils::NullString ns(d);
|
||||
out->setStringField(ns, i);
|
||||
}
|
||||
|
||||
void normalizeTimestampToTimestamp(const Row& in, Row* out, uint32_t i)
|
||||
@ -405,7 +411,8 @@ namespace
|
||||
void normalizeTimestampToString(const Row& in, Row* out, uint32_t i, long fTimeZone)
|
||||
{
|
||||
string d = DataConvert::timestampToString(in.getUintField(i), fTimeZone);
|
||||
out->setStringField(d, i);
|
||||
utils::NullString ns(d);
|
||||
out->setStringField(ns, i);
|
||||
}
|
||||
|
||||
void normalizeTimeToTime(const Row& in, Row* out, uint32_t i)
|
||||
@ -416,7 +423,8 @@ namespace
|
||||
void normalizeTimeToString(const Row& in, Row* out, uint32_t i)
|
||||
{
|
||||
string d = DataConvert::timeToString(in.getIntField(i));
|
||||
out->setStringField(d, i);
|
||||
utils::NullString ns(d);
|
||||
out->setStringField(ns, i);
|
||||
}
|
||||
|
||||
void normalizeXFloatToIntWithScaleInt128(const Row& in, Row* out, uint32_t i)
|
||||
@ -509,7 +517,8 @@ namespace
|
||||
ostringstream os;
|
||||
os.precision(15); // to match mysql's output
|
||||
os << val;
|
||||
out->setStringField(os.str(), i);
|
||||
utils::NullString ns(os.str());
|
||||
out->setStringField(ns, i);
|
||||
}
|
||||
|
||||
void normalizeXDoubleToString(const Row& in, Row* out, uint32_t i)
|
||||
@ -518,7 +527,8 @@ namespace
|
||||
ostringstream os;
|
||||
os.precision(15); // to match mysql's output
|
||||
os << val;
|
||||
out->setStringField(os.str(), i);
|
||||
utils::NullString ns(os.str());
|
||||
out->setStringField(ns, i);
|
||||
}
|
||||
|
||||
void normalizeXFloatToWideXDecimal(const Row& in, Row* out, uint32_t i)
|
||||
@ -593,7 +603,8 @@ namespace
|
||||
ostringstream os;
|
||||
os.precision(15); // to match mysql's output
|
||||
os << val;
|
||||
out->setStringField(os.str(), i);
|
||||
utils::NullString ns(os.str());
|
||||
out->setStringField(ns, i);
|
||||
}
|
||||
|
||||
void normalizeLongDoubleToXDecimalInt128(const Row& in, Row* out, uint32_t i)
|
||||
@ -675,14 +686,14 @@ namespace
|
||||
int128_t val128 = 0;
|
||||
in.getInt128Field(i, val128);
|
||||
datatypes::Decimal dec(0, in.getScale(i), in.getPrecision(i), val128);
|
||||
out->setStringField(dec.toString(), i);
|
||||
out->setStringField(dec.toNullString(), i);
|
||||
}
|
||||
|
||||
void normalizeXDecimalToString(const Row& in, Row* out, uint32_t i)
|
||||
{
|
||||
int64_t val = in.getIntField(i);
|
||||
datatypes::Decimal dec(val, in.getScale(i), in.getPrecision(i));
|
||||
out->setStringField(dec.toString(), i);
|
||||
out->setStringField(dec.toNullString(), i);
|
||||
}
|
||||
|
||||
void normalizeBlobVarbinary(const Row& in, Row* out, uint32_t i)
|
||||
@ -1826,7 +1837,7 @@ void TupleUnion::writeNull(Row* out, uint32_t col)
|
||||
case 7:
|
||||
case 8: out->setUintField<8>(joblist::CHAR8NULL, col); break;
|
||||
|
||||
default: out->setStringField(joblist::CPNULLSTRMARK, col); break;
|
||||
default: out->setStringField(nullptr, 0, col); break;
|
||||
}
|
||||
|
||||
break;
|
||||
@ -1836,7 +1847,7 @@ void TupleUnion::writeNull(Row* out, uint32_t col)
|
||||
case CalpontSystemCatalog::VARBINARY:
|
||||
// could use below if zero length and NULL are treated the same
|
||||
// out->setVarBinaryField("", col); break;
|
||||
out->setVarBinaryField(joblist::CPNULLSTRMARK, col);
|
||||
out->setVarBinaryField(nullptr, 0, col);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -84,6 +84,11 @@ class StoreFieldMariaDB : public StoreField
|
||||
|
||||
int store_string(const char* str, size_t length) override
|
||||
{
|
||||
if (!str)
|
||||
{
|
||||
m_field->set_null();
|
||||
return 1;
|
||||
}
|
||||
return m_field->store(str, length, m_field->charset());
|
||||
}
|
||||
int store_varbinary(const char* str, size_t length) override
|
||||
|
@ -73,6 +73,8 @@ using namespace joblist;
|
||||
|
||||
#include "ha_mcs_datatype.h"
|
||||
|
||||
#include "nullstring.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
#define BATCH_INSERT_GROUP_ROWS_FOR_CACHE 100000
|
||||
@ -95,12 +97,14 @@ uint32_t buildValueList(TABLE* table, cal_connection_info& ci)
|
||||
int columnPos = 0;
|
||||
double dbval;
|
||||
ci.nullValuesBitset.reset();
|
||||
NullString null;
|
||||
|
||||
|
||||
for (Field** field = table->field; *field; field++)
|
||||
{
|
||||
if ((*field)->is_null())
|
||||
{
|
||||
ci.tableValuesMap[columnPos].push_back(""); // currently, empty string is treated as null.
|
||||
ci.tableValuesMap[columnPos].push_back(null);
|
||||
ci.nullValuesBitset[columnPos] = true;
|
||||
}
|
||||
else
|
||||
@ -117,21 +121,23 @@ uint32_t buildValueList(TABLE* table, cal_connection_info& ci)
|
||||
char buf[maxlen];
|
||||
memset(buf, 0, maxlen);
|
||||
snprintf(buf, maxlen, "%.1024f", dbval);
|
||||
ci.tableValuesMap[columnPos].push_back(buf);
|
||||
NullString value(buf, strlen(buf));
|
||||
ci.tableValuesMap[columnPos].push_back(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
// fetch different data type
|
||||
(*field)->val_str(&attribute, &attribute);
|
||||
|
||||
if (attribute.length() == 0)
|
||||
{
|
||||
ci.tableValuesMap[columnPos].push_back(""); // currently, empty string is treated as null.
|
||||
}
|
||||
else
|
||||
// if (attribute.length() == 0)
|
||||
// {
|
||||
// ci.tableValuesMap[columnPos].push_back(null); // currently, empty string is treated as null.
|
||||
// }
|
||||
// else
|
||||
{
|
||||
string val(attribute.ptr(), attribute.length());
|
||||
ci.tableValuesMap[columnPos].push_back(val);
|
||||
NullString nonNull(val);
|
||||
ci.tableValuesMap[columnPos].push_back(nonNull);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2078,7 +2078,7 @@ bool buildPredicateItem(Item_func* ifp, gp_walk_info* gwip)
|
||||
}
|
||||
|
||||
if (udf->result_type() == STRING_RESULT)
|
||||
gwip->rcWorkStack.push(new ConstantColumn(buf.ptr()));
|
||||
gwip->rcWorkStack.push(new ConstantColumn(buf.ptr())); // XXX: constantcolumn from string = can it be NULL?
|
||||
else
|
||||
{
|
||||
gwip->rcWorkStack.push(new ConstantColumn(buf.ptr(), ConstantColumn::NUM));
|
||||
@ -2916,7 +2916,6 @@ uint32_t setAggOp(AggregateColumn* ac, Item_sum* isp)
|
||||
case Item_sum::SUM_BIT_FUNC:
|
||||
{
|
||||
string funcName = isp->func_name();
|
||||
|
||||
if (funcName.compare("bit_and(") == 0)
|
||||
ac->aggOp(AggregateColumn::BIT_AND);
|
||||
else if (funcName.compare("bit_or(") == 0)
|
||||
@ -4865,7 +4864,7 @@ static void processAggregateColumnConstArg(gp_walk_info& gwi, SRCP& parm, Aggreg
|
||||
return;
|
||||
}
|
||||
ConstantColumn* cc;
|
||||
if ((cc = dynamic_cast<ConstantColumn*>(rt)) && cc->type() == ConstantColumn::NULLDATA)
|
||||
if ((cc = dynamic_cast<ConstantColumn*>(rt)) && cc->isNull())
|
||||
{
|
||||
// Explicit NULL or a const function that evaluated to NULL
|
||||
cc = new ConstantColumnNull();
|
||||
@ -5739,16 +5738,25 @@ void gp_walk(const Item* item, void* arg)
|
||||
if (isp->result_type() == STRING_RESULT)
|
||||
{
|
||||
String val, *str = isp->val_str(&val);
|
||||
string cval;
|
||||
|
||||
if (str->ptr())
|
||||
if (str)
|
||||
{
|
||||
cval.assign(str->ptr(), str->length());
|
||||
}
|
||||
string cval;
|
||||
|
||||
gwip->rcWorkStack.push(new ConstantColumn(cval));
|
||||
(dynamic_cast<ConstantColumn*>(gwip->rcWorkStack.top()))->timeZone(gwip->timeZone);
|
||||
break;
|
||||
if (str->ptr())
|
||||
{
|
||||
cval.assign(str->ptr(), str->length());
|
||||
}
|
||||
|
||||
gwip->rcWorkStack.push(new ConstantColumn(cval));
|
||||
(dynamic_cast<ConstantColumn*>(gwip->rcWorkStack.top()))->timeZone(gwip->timeZone);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
gwip->rcWorkStack.push(new ConstantColumn("", ConstantColumn::NULLDATA));
|
||||
(dynamic_cast<ConstantColumn*>(gwip->rcWorkStack.top()))->timeZone(gwip->timeZone);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
gwip->rcWorkStack.push(buildReturnedColumn(isp, *gwip, gwip->fatalParseError));
|
||||
@ -7477,7 +7485,6 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
|
||||
collectAllCols(gwi, ifp);
|
||||
break;
|
||||
}
|
||||
|
||||
sc = buildSimpleColumn(ifp, gwi);
|
||||
|
||||
if (sc)
|
||||
|
@ -403,7 +403,8 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, long t
|
||||
colType.colDataType == CalpontSystemCatalog::VARCHAR ||
|
||||
colType.colDataType == CalpontSystemCatalog::VARBINARY)
|
||||
{
|
||||
(*f)->store("", 0, (*f)->charset());
|
||||
(*f)->reset();
|
||||
(*f)->set_null();
|
||||
}
|
||||
|
||||
continue;
|
||||
@ -418,7 +419,6 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, long t
|
||||
}
|
||||
else
|
||||
{
|
||||
// fetch and store data
|
||||
(*f)->set_notnull();
|
||||
datatypes::StoreFieldMariaDB mf(*f, colType, timeZone);
|
||||
h->storeValueToField(row, s, &mf);
|
||||
@ -739,7 +739,7 @@ vector<string> getOnUpdateTimestampColumns(string& schema, string& tableName, in
|
||||
{
|
||||
rowGroup->getRow(i, &row);
|
||||
// we are only fetching a single column
|
||||
returnVal.push_back(row.getStringField(0));
|
||||
returnVal.push_back(row.getStringField(0).safeString(""));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1009,7 +1009,7 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi, const std::vector<COND*>& c
|
||||
|
||||
if (constCol)
|
||||
{
|
||||
columnAssignmentPtr->fScalarExpression = constCol->constval();
|
||||
columnAssignmentPtr->fScalarExpression = constCol->constval().safeString("");
|
||||
isFromCol = false;
|
||||
columnAssignmentPtr->fFromCol = false;
|
||||
}
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "idb_mysql.h"
|
||||
#include "ha_mcs_sysvars.h"
|
||||
|
||||
#include "dmlpkg.h"
|
||||
|
||||
struct st_ha_create_information;
|
||||
class ha_columnstore_select_handler;
|
||||
class ha_columnstore_derived_handler;
|
||||
@ -92,6 +94,8 @@ enum ClauseType
|
||||
};
|
||||
|
||||
typedef std::vector<JoinInfo> JoinInfoVec;
|
||||
typedef dmlpackage::ColValuesList ColValuesList;
|
||||
typedef dmlpackage::TableValuesMap TableValuesMap;
|
||||
typedef std::map<execplan::CalpontSystemCatalog::TableAliasName, std::pair<int, TABLE_LIST*>> TableMap;
|
||||
typedef std::tr1::unordered_map<TABLE_LIST*, std::vector<COND*>> TableOnExprList;
|
||||
typedef std::tr1::unordered_map<TABLE_LIST*, uint> TableOuterJoinMap;
|
||||
@ -257,9 +261,7 @@ struct cal_group_info
|
||||
};
|
||||
|
||||
typedef std::tr1::unordered_map<TABLE*, cal_table_info> CalTableMap;
|
||||
typedef std::vector<std::string> ColValuesList;
|
||||
typedef std::vector<std::string> ColNameList;
|
||||
typedef std::map<uint32_t, ColValuesList> TableValuesMap;
|
||||
typedef std::bitset<4096> NullValuesBitset;
|
||||
struct cal_connection_info
|
||||
{
|
||||
|
@ -145,14 +145,14 @@ static int is_columnstore_columns_fill(THD* thd, TABLE_LIST* tables, COND* cond)
|
||||
table->field[8]->store(ct.colWidth);
|
||||
table->field[9]->store(ct.colPosition);
|
||||
|
||||
if (ct.defaultValue.empty())
|
||||
if (ct.defaultValue.isNull())
|
||||
{
|
||||
table->field[10]->set_null();
|
||||
}
|
||||
else
|
||||
{
|
||||
table->field[10]->set_notnull();
|
||||
table->field[10]->store(ct.defaultValue.c_str(), ct.defaultValue.length(), cs);
|
||||
table->field[10]->store(ct.defaultValue.str(), ct.defaultValue.length(), cs);
|
||||
}
|
||||
|
||||
table->field[11]->store(ct.autoincrement);
|
||||
|
@ -1,52 +1,52 @@
|
||||
USE autopilot;
|
||||
select cidx, CCHAR1, MID(CCHAR1,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 MID(CCHAR1,5,2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, MID(CCHAR1,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 MID(CCHAR1,9,3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR2, MID(CCHAR2,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 MID(CCHAR2,5,2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, MID(CCHAR2,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 MID(CCHAR2,9,3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR3, MID(CCHAR3,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 MID(CCHAR3,5,2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, MID(CCHAR3,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 MID(CCHAR3,9,3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR4, MID(CCHAR4,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 MID(CCHAR4,5,2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, MID(CCHAR4,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 MID(CCHAR4,9,3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR5, MID(CCHAR5,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 MID(CCHAR5,5,2)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, MID(CCHAR5,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 MID(CCHAR5,9,3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR6, MID(CCHAR6,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 MID(CCHAR6,5,2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, MID(CCHAR6,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 MID(CCHAR6,9,3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR7, MID(CCHAR7,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 MID(CCHAR7,5,2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CCHAR7, MID(CCHAR7,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 MID(CCHAR7,9,3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR8, MID(CCHAR8,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 MID(CCHAR8,5,2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CCHAR8, MID(CCHAR8,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 MID(CCHAR8,9,3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR9, MID(CCHAR9,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR9 MID(CCHAR9,5,2)
|
||||
1 aaaaaaaaa aa
|
||||
@ -61,52 +61,52 @@ cidx CCHAR255 MID(CCHAR255,9,3)
|
||||
1 aaaaaaaaaa aa
|
||||
select cidx, CVCHAR1, MID(CVCHAR1,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 MID(CVCHAR1,5,2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, MID(CVCHAR1,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 MID(CVCHAR1,9,3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR2, MID(CVCHAR2,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 MID(CVCHAR2,5,2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, MID(CVCHAR2,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 MID(CVCHAR2,9,3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR3, MID(CVCHAR3,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 MID(CVCHAR3,5,2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, MID(CVCHAR3,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 MID(CVCHAR3,9,3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR4, MID(CVCHAR4,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 MID(CVCHAR4,5,2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, MID(CVCHAR4,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 MID(CVCHAR4,9,3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR5, MID(CVCHAR5,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 MID(CVCHAR5,5,2)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, MID(CVCHAR5,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 MID(CVCHAR5,9,3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR6, MID(CVCHAR6,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 MID(CVCHAR6,5,2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, MID(CVCHAR6,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 MID(CVCHAR6,9,3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR7, MID(CVCHAR7,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 MID(CVCHAR7,5,2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CVCHAR7, MID(CVCHAR7,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 MID(CVCHAR7,9,3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR8, MID(CVCHAR8,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 MID(CVCHAR8,5,2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CVCHAR8, MID(CVCHAR8,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 MID(CVCHAR8,9,3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR255, MID(CVCHAR255,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR255 MID(CVCHAR255,5,2)
|
||||
1 aaaaaaaaaa aa
|
||||
|
@ -4,133 +4,133 @@ cidx CCHAR1 SUBSTRING(CCHAR1,1)
|
||||
1 a a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1,5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1,7)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1,8)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1,9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1 FROM 5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1 FROM 9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1,5,2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1,9,3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1 FROM 5 FOR 2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1 FROM 9 FOR 3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2,1)
|
||||
1 aa aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2,5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2,7)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2,8)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2,9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2 FROM 5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2 FROM 9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2,5,2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2,9,3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2 FROM 5 FOR 2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2 FROM 9 FOR 3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3,1)
|
||||
1 aaa aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3,5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3,7)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3,8)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3,9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3 FROM 5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3 FROM 9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3,5,2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3,9,3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3 FROM 5 FOR 2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3 FROM 9 FOR 3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4,1)
|
||||
1 aaaa aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4,5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4,7)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4,8)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4,9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4 FROM 5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4 FROM 9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4,5,2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4,9,3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4 FROM 5 FOR 2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4 FROM 9 FOR 3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5,1)
|
||||
1 aaaaa aaaaa
|
||||
@ -139,31 +139,31 @@ cidx CCHAR5 SUBSTRING(CCHAR5,5)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5,7)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5,8)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5,9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5 FROM 5)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5 FROM 9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5,5,2)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5,9,3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5 FROM 5 FOR 2)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5 FROM 9 FOR 3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6,1)
|
||||
1 aaaaaa aaaaaa
|
||||
@ -172,31 +172,31 @@ cidx CCHAR6 SUBSTRING(CCHAR6,5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6,7)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6,8)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6,9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6 FROM 5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6 FROM 9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6,5,2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6,9,3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6 FROM 5 FOR 2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6 FROM 9 FOR 3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7,1)
|
||||
1 aaaaaaa aaaaaaa
|
||||
@ -208,28 +208,28 @@ cidx CCHAR7 SUBSTRING(CCHAR7,7)
|
||||
1 aaaaaaa a
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7,8)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7,9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7 FROM 5)
|
||||
1 aaaaaaa aaa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7 FROM 9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7,5,2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7,9,3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7 FROM 5 FOR 2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7 FROM 9 FOR 3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8,1)
|
||||
1 aaaaaaaa aaaaaaaa
|
||||
@ -244,25 +244,25 @@ cidx CCHAR8 SUBSTRING(CCHAR8,8)
|
||||
1 aaaaaaaa a
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8,9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8 FROM 5)
|
||||
1 aaaaaaaa aaaa
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8 FROM 9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8,5,2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8,9,3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8 FROM 5 FOR 2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8 FROM 9 FOR 3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR9, SUBSTRING(CCHAR9,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR9 SUBSTRING(CCHAR9,1)
|
||||
1 aaaaaaaaa aaaaaaaaa
|
||||
@ -334,133 +334,133 @@ cidx CVCHAR1 SUBSTRING(CVCHAR1,1)
|
||||
1 a a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1,5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1,7)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1,8)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1,9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1 FROM 5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1 FROM 9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1,5,2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1,9,3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1 FROM 5 FOR 2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1 FROM 9 FOR 3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2,1)
|
||||
1 aa aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2,5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2,7)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2,8)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2,9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2 FROM 5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2 FROM 9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2,5,2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2,9,3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2 FROM 5 FOR 2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2 FROM 9 FOR 3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3,1)
|
||||
1 aaa aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3,5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3,7)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3,8)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3,9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3 FROM 5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3 FROM 9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3,5,2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3,9,3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3 FROM 5 FOR 2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3 FROM 9 FOR 3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4,1)
|
||||
1 aaaa aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4,5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4,7)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4,8)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4,9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4 FROM 5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4 FROM 9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4,5,2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4,9,3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4 FROM 5 FOR 2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4 FROM 9 FOR 3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5,1)
|
||||
1 aaaaa aaaaa
|
||||
@ -469,31 +469,31 @@ cidx CVCHAR5 SUBSTRING(CVCHAR5,5)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5,7)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5,8)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5,9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5 FROM 5)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5 FROM 9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5,5,2)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5,9,3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5 FROM 5 FOR 2)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5 FROM 9 FOR 3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6,1)
|
||||
1 aaaaaa aaaaaa
|
||||
@ -502,31 +502,31 @@ cidx CVCHAR6 SUBSTRING(CVCHAR6,5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6,7)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6,8)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6,9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6 FROM 5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6 FROM 9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6,5,2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6,9,3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6 FROM 5 FOR 2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6 FROM 9 FOR 3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7,1)
|
||||
1 aaaaaaa aaaaaaa
|
||||
@ -538,28 +538,28 @@ cidx CVCHAR7 SUBSTRING(CVCHAR7,7)
|
||||
1 aaaaaaa a
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7,8)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7,9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7 FROM 5)
|
||||
1 aaaaaaa aaa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7 FROM 9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7,5,2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7,9,3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7 FROM 5 FOR 2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7 FROM 9 FOR 3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8,1)
|
||||
1 aaaaaaaa aaaaaaaa
|
||||
@ -574,25 +574,25 @@ cidx CVCHAR8 SUBSTRING(CVCHAR8,8)
|
||||
1 aaaaaaaa a
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8,9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8 FROM 5)
|
||||
1 aaaaaaaa aaaa
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8 FROM 9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8,5,2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8,9,3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8 FROM 5 FOR 2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8 FROM 9 FOR 3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR255, SUBSTRING(CVCHAR255,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR255 SUBSTRING(CVCHAR255,1)
|
||||
1 aaaaaaaaaa aaaaaaaaaa
|
||||
|
@ -4,133 +4,133 @@ cidx CCHAR1 SUBSTR(CCHAR1,1)
|
||||
1 a a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1,5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1,7)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1,8)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1,9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1 FROM 5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1 FROM 9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1,5,2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1,9,3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1 FROM 5 FOR 2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1 FROM 9 FOR 3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2,1)
|
||||
1 aa aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2,5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2,7)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2,8)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2,9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2 FROM 5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2 FROM 9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2,5,2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2,9,3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2 FROM 5 FOR 2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2 FROM 9 FOR 3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3,1)
|
||||
1 aaa aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3,5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3,7)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3,8)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3,9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3 FROM 5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3 FROM 9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3,5,2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3,9,3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3 FROM 5 FOR 2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3 FROM 9 FOR 3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4,1)
|
||||
1 aaaa aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4,5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4,7)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4,8)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4,9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4 FROM 5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4 FROM 9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4,5,2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4,9,3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4 FROM 5 FOR 2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4 FROM 9 FOR 3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5,1)
|
||||
1 aaaaa aaaaa
|
||||
@ -139,31 +139,31 @@ cidx CCHAR5 SUBSTR(CCHAR5,5)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5,7)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5,8)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5,9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5 FROM 5)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5 FROM 9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5,5,2)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5,9,3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5 FROM 5 FOR 2)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5 FROM 9 FOR 3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6,1)
|
||||
1 aaaaaa aaaaaa
|
||||
@ -172,31 +172,31 @@ cidx CCHAR6 SUBSTR(CCHAR6,5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6,7)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6,8)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6,9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6 FROM 5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6 FROM 9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6,5,2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6,9,3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6 FROM 5 FOR 2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6 FROM 9 FOR 3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7,1)
|
||||
1 aaaaaaa aaaaaaa
|
||||
@ -208,28 +208,28 @@ cidx CCHAR7 SUBSTR(CCHAR7,7)
|
||||
1 aaaaaaa a
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7,8)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7,9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7 FROM 5)
|
||||
1 aaaaaaa aaa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7 FROM 9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7,5,2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7,9,3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7 FROM 5 FOR 2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7 FROM 9 FOR 3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8,1)
|
||||
1 aaaaaaaa aaaaaaaa
|
||||
@ -244,25 +244,25 @@ cidx CCHAR8 SUBSTR(CCHAR8,8)
|
||||
1 aaaaaaaa a
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8,9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8 FROM 5)
|
||||
1 aaaaaaaa aaaa
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8 FROM 9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8,5,2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8,9,3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8 FROM 5 FOR 2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8 FROM 9 FOR 3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR9, SUBSTR(CCHAR9,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR9 SUBSTR(CCHAR9,1)
|
||||
1 aaaaaaaaa aaaaaaaaa
|
||||
@ -334,133 +334,133 @@ cidx CVCHAR1 SUBSTR(CVCHAR1,1)
|
||||
1 a a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1,5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1,7)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1,8)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1,9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1 FROM 5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1 FROM 9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1,5,2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1,9,3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1 FROM 5 FOR 2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1 FROM 9 FOR 3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2,1)
|
||||
1 aa aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2,5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2,7)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2,8)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2,9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2 FROM 5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2 FROM 9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2,5,2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2,9,3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2 FROM 5 FOR 2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2 FROM 9 FOR 3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3,1)
|
||||
1 aaa aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3,5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3,7)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3,8)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3,9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3 FROM 5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3 FROM 9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3,5,2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3,9,3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3 FROM 5 FOR 2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3 FROM 9 FOR 3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4,1)
|
||||
1 aaaa aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4,5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4,7)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4,8)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4,9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4 FROM 5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4 FROM 9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4,5,2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4,9,3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4 FROM 5 FOR 2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4 FROM 9 FOR 3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5,1)
|
||||
1 aaaaa aaaaa
|
||||
@ -469,31 +469,31 @@ cidx CVCHAR5 SUBSTR(CVCHAR5,5)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5,7)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5,8)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5,9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5 FROM 5)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5 FROM 9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5,5,2)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5,9,3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5 FROM 5 FOR 2)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5 FROM 9 FOR 3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6,1)
|
||||
1 aaaaaa aaaaaa
|
||||
@ -502,31 +502,31 @@ cidx CVCHAR6 SUBSTR(CVCHAR6,5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6,7)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6,8)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6,9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6 FROM 5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6 FROM 9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6,5,2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6,9,3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6 FROM 5 FOR 2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6 FROM 9 FOR 3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7,1)
|
||||
1 aaaaaaa aaaaaaa
|
||||
@ -538,28 +538,28 @@ cidx CVCHAR7 SUBSTR(CVCHAR7,7)
|
||||
1 aaaaaaa a
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7,8)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7,9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7 FROM 5)
|
||||
1 aaaaaaa aaa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7 FROM 9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7,5,2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7,9,3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7 FROM 5 FOR 2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7 FROM 9 FOR 3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8,1)
|
||||
1 aaaaaaaa aaaaaaaa
|
||||
@ -574,25 +574,25 @@ cidx CVCHAR8 SUBSTR(CVCHAR8,8)
|
||||
1 aaaaaaaa a
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8,9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8 FROM 5)
|
||||
1 aaaaaaaa aaaa
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8 FROM 9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8,5,2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8,9,3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8 FROM 5 FOR 2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8 FROM 9 FOR 3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR255, SUBSTR(CVCHAR255,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR255 SUBSTR(CVCHAR255,1)
|
||||
1 aaaaaaaaaa aaaaaaaaaa
|
||||
|
@ -1,52 +1,52 @@
|
||||
USE autopilot;
|
||||
select cidx, CCHAR1, MID(CCHAR1,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 MID(CCHAR1,5,2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, MID(CCHAR1,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 MID(CCHAR1,9,3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR2, MID(CCHAR2,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 MID(CCHAR2,5,2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, MID(CCHAR2,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 MID(CCHAR2,9,3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR3, MID(CCHAR3,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 MID(CCHAR3,5,2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, MID(CCHAR3,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 MID(CCHAR3,9,3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR4, MID(CCHAR4,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 MID(CCHAR4,5,2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, MID(CCHAR4,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 MID(CCHAR4,9,3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR5, MID(CCHAR5,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 MID(CCHAR5,5,2)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, MID(CCHAR5,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 MID(CCHAR5,9,3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR6, MID(CCHAR6,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 MID(CCHAR6,5,2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, MID(CCHAR6,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 MID(CCHAR6,9,3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR7, MID(CCHAR7,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 MID(CCHAR7,5,2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CCHAR7, MID(CCHAR7,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 MID(CCHAR7,9,3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR8, MID(CCHAR8,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 MID(CCHAR8,5,2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CCHAR8, MID(CCHAR8,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 MID(CCHAR8,9,3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR9, MID(CCHAR9,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR9 MID(CCHAR9,5,2)
|
||||
1 aaaaaaaaa aa
|
||||
@ -61,52 +61,52 @@ cidx CCHAR255 MID(CCHAR255,9,3)
|
||||
1 aaaaaaaaaa aa
|
||||
select cidx, CVCHAR1, MID(CVCHAR1,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 MID(CVCHAR1,5,2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, MID(CVCHAR1,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 MID(CVCHAR1,9,3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR2, MID(CVCHAR2,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 MID(CVCHAR2,5,2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, MID(CVCHAR2,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 MID(CVCHAR2,9,3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR3, MID(CVCHAR3,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 MID(CVCHAR3,5,2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, MID(CVCHAR3,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 MID(CVCHAR3,9,3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR4, MID(CVCHAR4,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 MID(CVCHAR4,5,2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, MID(CVCHAR4,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 MID(CVCHAR4,9,3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR5, MID(CVCHAR5,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 MID(CVCHAR5,5,2)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, MID(CVCHAR5,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 MID(CVCHAR5,9,3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR6, MID(CVCHAR6,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 MID(CVCHAR6,5,2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, MID(CVCHAR6,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 MID(CVCHAR6,9,3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR7, MID(CVCHAR7,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 MID(CVCHAR7,5,2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CVCHAR7, MID(CVCHAR7,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 MID(CVCHAR7,9,3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR8, MID(CVCHAR8,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 MID(CVCHAR8,5,2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CVCHAR8, MID(CVCHAR8,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 MID(CVCHAR8,9,3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR255, MID(CVCHAR255,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR255 MID(CVCHAR255,5,2)
|
||||
1 aaaaaaaaaa aa
|
||||
|
@ -4,133 +4,133 @@ cidx CCHAR1 SUBSTRING(CCHAR1,1)
|
||||
1 a a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1,5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1,7)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1,8)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1,9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1 FROM 5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1 FROM 9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1,5,2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1,9,3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1 FROM 5 FOR 2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTRING(CCHAR1 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTRING(CCHAR1 FROM 9 FOR 3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2,1)
|
||||
1 aa aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2,5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2,7)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2,8)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2,9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2 FROM 5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2 FROM 9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2,5,2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2,9,3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2 FROM 5 FOR 2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTRING(CCHAR2 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTRING(CCHAR2 FROM 9 FOR 3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3,1)
|
||||
1 aaa aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3,5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3,7)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3,8)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3,9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3 FROM 5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3 FROM 9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3,5,2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3,9,3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3 FROM 5 FOR 2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTRING(CCHAR3 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTRING(CCHAR3 FROM 9 FOR 3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4,1)
|
||||
1 aaaa aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4,5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4,7)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4,8)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4,9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4 FROM 5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4 FROM 9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4,5,2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4,9,3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4 FROM 5 FOR 2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTRING(CCHAR4 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTRING(CCHAR4 FROM 9 FOR 3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5,1)
|
||||
1 aaaaa aaaaa
|
||||
@ -139,31 +139,31 @@ cidx CCHAR5 SUBSTRING(CCHAR5,5)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5,7)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5,8)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5,9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5 FROM 5)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5 FROM 9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5,5,2)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5,9,3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5 FROM 5 FOR 2)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTRING(CCHAR5 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTRING(CCHAR5 FROM 9 FOR 3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6,1)
|
||||
1 aaaaaa aaaaaa
|
||||
@ -172,31 +172,31 @@ cidx CCHAR6 SUBSTRING(CCHAR6,5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6,7)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6,8)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6,9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6 FROM 5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6 FROM 9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6,5,2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6,9,3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6 FROM 5 FOR 2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTRING(CCHAR6 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTRING(CCHAR6 FROM 9 FOR 3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7,1)
|
||||
1 aaaaaaa aaaaaaa
|
||||
@ -208,28 +208,28 @@ cidx CCHAR7 SUBSTRING(CCHAR7,7)
|
||||
1 aaaaaaa a
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7,8)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7,9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7 FROM 5)
|
||||
1 aaaaaaa aaa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7 FROM 9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7,5,2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7,9,3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7 FROM 5 FOR 2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CCHAR7, SUBSTRING(CCHAR7 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTRING(CCHAR7 FROM 9 FOR 3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8,1)
|
||||
1 aaaaaaaa aaaaaaaa
|
||||
@ -244,25 +244,25 @@ cidx CCHAR8 SUBSTRING(CCHAR8,8)
|
||||
1 aaaaaaaa a
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8,9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8 FROM 5)
|
||||
1 aaaaaaaa aaaa
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8 FROM 9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8,5,2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8,9,3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8 FROM 5 FOR 2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CCHAR8, SUBSTRING(CCHAR8 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTRING(CCHAR8 FROM 9 FOR 3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR9, SUBSTRING(CCHAR9,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR9 SUBSTRING(CCHAR9,1)
|
||||
1 aaaaaaaaa aaaaaaaaa
|
||||
@ -334,133 +334,133 @@ cidx CVCHAR1 SUBSTRING(CVCHAR1,1)
|
||||
1 a a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1,5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1,7)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1,8)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1,9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1 FROM 5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1 FROM 9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1,5,2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1,9,3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1 FROM 5 FOR 2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTRING(CVCHAR1 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTRING(CVCHAR1 FROM 9 FOR 3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2,1)
|
||||
1 aa aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2,5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2,7)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2,8)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2,9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2 FROM 5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2 FROM 9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2,5,2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2,9,3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2 FROM 5 FOR 2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTRING(CVCHAR2 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTRING(CVCHAR2 FROM 9 FOR 3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3,1)
|
||||
1 aaa aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3,5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3,7)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3,8)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3,9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3 FROM 5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3 FROM 9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3,5,2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3,9,3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3 FROM 5 FOR 2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTRING(CVCHAR3 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTRING(CVCHAR3 FROM 9 FOR 3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4,1)
|
||||
1 aaaa aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4,5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4,7)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4,8)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4,9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4 FROM 5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4 FROM 9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4,5,2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4,9,3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4 FROM 5 FOR 2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTRING(CVCHAR4 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTRING(CVCHAR4 FROM 9 FOR 3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5,1)
|
||||
1 aaaaa aaaaa
|
||||
@ -469,31 +469,31 @@ cidx CVCHAR5 SUBSTRING(CVCHAR5,5)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5,7)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5,8)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5,9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5 FROM 5)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5 FROM 9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5,5,2)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5,9,3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5 FROM 5 FOR 2)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTRING(CVCHAR5 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTRING(CVCHAR5 FROM 9 FOR 3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6,1)
|
||||
1 aaaaaa aaaaaa
|
||||
@ -502,31 +502,31 @@ cidx CVCHAR6 SUBSTRING(CVCHAR6,5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6,7)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6,8)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6,9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6 FROM 5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6 FROM 9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6,5,2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6,9,3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6 FROM 5 FOR 2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTRING(CVCHAR6 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTRING(CVCHAR6 FROM 9 FOR 3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7,1)
|
||||
1 aaaaaaa aaaaaaa
|
||||
@ -538,28 +538,28 @@ cidx CVCHAR7 SUBSTRING(CVCHAR7,7)
|
||||
1 aaaaaaa a
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7,8)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7,9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7 FROM 5)
|
||||
1 aaaaaaa aaa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7 FROM 9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7,5,2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7,9,3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7 FROM 5 FOR 2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CVCHAR7, SUBSTRING(CVCHAR7 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTRING(CVCHAR7 FROM 9 FOR 3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8,1)
|
||||
1 aaaaaaaa aaaaaaaa
|
||||
@ -574,25 +574,25 @@ cidx CVCHAR8 SUBSTRING(CVCHAR8,8)
|
||||
1 aaaaaaaa a
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8,9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8 FROM 5)
|
||||
1 aaaaaaaa aaaa
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8 FROM 9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8,5,2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8,9,3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8 FROM 5 FOR 2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CVCHAR8, SUBSTRING(CVCHAR8 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTRING(CVCHAR8 FROM 9 FOR 3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR255, SUBSTRING(CVCHAR255,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR255 SUBSTRING(CVCHAR255,1)
|
||||
1 aaaaaaaaaa aaaaaaaaaa
|
||||
|
@ -4,133 +4,133 @@ cidx CCHAR1 SUBSTR(CCHAR1,1)
|
||||
1 a a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1,5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1,7)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1,8)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1,9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1 FROM 5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1 FROM 9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1,5,2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1,9,3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1 FROM 5 FOR 2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR1, SUBSTR(CCHAR1 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR1 SUBSTR(CCHAR1 FROM 9 FOR 3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2,1)
|
||||
1 aa aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2,5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2,7)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2,8)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2,9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2 FROM 5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2 FROM 9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2,5,2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2,9,3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2 FROM 5 FOR 2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR2, SUBSTR(CCHAR2 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR2 SUBSTR(CCHAR2 FROM 9 FOR 3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3,1)
|
||||
1 aaa aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3,5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3,7)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3,8)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3,9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3 FROM 5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3 FROM 9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3,5,2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3,9,3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3 FROM 5 FOR 2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR3, SUBSTR(CCHAR3 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR3 SUBSTR(CCHAR3 FROM 9 FOR 3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4,1)
|
||||
1 aaaa aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4,5) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4,5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4,7)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4,8)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4,9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4 FROM 5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4 FROM 9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4,5,2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4,9,3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4 FROM 5 FOR 2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR4, SUBSTR(CCHAR4 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR4 SUBSTR(CCHAR4 FROM 9 FOR 3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5,1)
|
||||
1 aaaaa aaaaa
|
||||
@ -139,31 +139,31 @@ cidx CCHAR5 SUBSTR(CCHAR5,5)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5,7)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5,8)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5,9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5 FROM 5)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5 FROM 9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5,5,2)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5,9,3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5 FROM 5 FOR 2)
|
||||
1 aaaaa a
|
||||
select cidx, CCHAR5, SUBSTR(CCHAR5 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR5 SUBSTR(CCHAR5 FROM 9 FOR 3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6,1)
|
||||
1 aaaaaa aaaaaa
|
||||
@ -172,31 +172,31 @@ cidx CCHAR6 SUBSTR(CCHAR6,5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6,7) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6,7)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6,8)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6,9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6 FROM 5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6 FROM 9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6,5,2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6,9,3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6 FROM 5 FOR 2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CCHAR6, SUBSTR(CCHAR6 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR6 SUBSTR(CCHAR6 FROM 9 FOR 3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7,1)
|
||||
1 aaaaaaa aaaaaaa
|
||||
@ -208,28 +208,28 @@ cidx CCHAR7 SUBSTR(CCHAR7,7)
|
||||
1 aaaaaaa a
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7,8) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7,8)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7,9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7 FROM 5)
|
||||
1 aaaaaaa aaa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7 FROM 9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7,5,2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7,9,3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7 FROM 5 FOR 2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CCHAR7, SUBSTR(CCHAR7 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR7 SUBSTR(CCHAR7 FROM 9 FOR 3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8,1)
|
||||
1 aaaaaaaa aaaaaaaa
|
||||
@ -244,25 +244,25 @@ cidx CCHAR8 SUBSTR(CCHAR8,8)
|
||||
1 aaaaaaaa a
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8,9) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8,9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8 FROM 5)
|
||||
1 aaaaaaaa aaaa
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8 FROM 9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8,5,2) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8,5,2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8,9,3) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8,9,3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8 FROM 5 FOR 2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CCHAR8, SUBSTR(CCHAR8 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CCHAR8 SUBSTR(CCHAR8 FROM 9 FOR 3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CCHAR9, SUBSTR(CCHAR9,1) from datatypetestm order by cidx;
|
||||
cidx CCHAR9 SUBSTR(CCHAR9,1)
|
||||
1 aaaaaaaaa aaaaaaaaa
|
||||
@ -334,133 +334,133 @@ cidx CVCHAR1 SUBSTR(CVCHAR1,1)
|
||||
1 a a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1,5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1,7)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1,8)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1,9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1 FROM 5)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1 FROM 9)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1,5,2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1,9,3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1 FROM 5 FOR 2)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR1, SUBSTR(CVCHAR1 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR1 SUBSTR(CVCHAR1 FROM 9 FOR 3)
|
||||
1 a NULL
|
||||
1 a
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2,1)
|
||||
1 aa aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2,5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2,7)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2,8)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2,9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2 FROM 5)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2 FROM 9)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2,5,2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2,9,3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2 FROM 5 FOR 2)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR2, SUBSTR(CVCHAR2 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR2 SUBSTR(CVCHAR2 FROM 9 FOR 3)
|
||||
1 aa NULL
|
||||
1 aa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3,1)
|
||||
1 aaa aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3,5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3,7)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3,8)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3,9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3 FROM 5)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3 FROM 9)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3,5,2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3,9,3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3 FROM 5 FOR 2)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR3, SUBSTR(CVCHAR3 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR3 SUBSTR(CVCHAR3 FROM 9 FOR 3)
|
||||
1 aaa NULL
|
||||
1 aaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4,1)
|
||||
1 aaaa aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4,5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4,5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4,7)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4,8)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4,9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4 FROM 5)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4 FROM 9)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4,5,2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4,9,3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4 FROM 5 FOR 2)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR4, SUBSTR(CVCHAR4 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR4 SUBSTR(CVCHAR4 FROM 9 FOR 3)
|
||||
1 aaaa NULL
|
||||
1 aaaa
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5,1)
|
||||
1 aaaaa aaaaa
|
||||
@ -469,31 +469,31 @@ cidx CVCHAR5 SUBSTR(CVCHAR5,5)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5,7)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5,8)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5,9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5 FROM 5)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5 FROM 9)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5,5,2)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5,9,3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5 FROM 5 FOR 2)
|
||||
1 aaaaa a
|
||||
select cidx, CVCHAR5, SUBSTR(CVCHAR5 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR5 SUBSTR(CVCHAR5 FROM 9 FOR 3)
|
||||
1 aaaaa NULL
|
||||
1 aaaaa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6,1)
|
||||
1 aaaaaa aaaaaa
|
||||
@ -502,31 +502,31 @@ cidx CVCHAR6 SUBSTR(CVCHAR6,5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6,7) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6,7)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6,8)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6,9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6 FROM 5)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6 FROM 9)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6,5,2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6,9,3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6 FROM 5 FOR 2)
|
||||
1 aaaaaa aa
|
||||
select cidx, CVCHAR6, SUBSTR(CVCHAR6 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR6 SUBSTR(CVCHAR6 FROM 9 FOR 3)
|
||||
1 aaaaaa NULL
|
||||
1 aaaaaa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7,1)
|
||||
1 aaaaaaa aaaaaaa
|
||||
@ -538,28 +538,28 @@ cidx CVCHAR7 SUBSTR(CVCHAR7,7)
|
||||
1 aaaaaaa a
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7,8) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7,8)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7,9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7 FROM 5)
|
||||
1 aaaaaaa aaa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7 FROM 9)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7,5,2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7,9,3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7 FROM 5 FOR 2)
|
||||
1 aaaaaaa aa
|
||||
select cidx, CVCHAR7, SUBSTR(CVCHAR7 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR7 SUBSTR(CVCHAR7 FROM 9 FOR 3)
|
||||
1 aaaaaaa NULL
|
||||
1 aaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8,1)
|
||||
1 aaaaaaaa aaaaaaaa
|
||||
@ -574,25 +574,25 @@ cidx CVCHAR8 SUBSTR(CVCHAR8,8)
|
||||
1 aaaaaaaa a
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8,9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8,9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8 FROM 5) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8 FROM 5)
|
||||
1 aaaaaaaa aaaa
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8 FROM 9) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8 FROM 9)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8,5,2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8,5,2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8,9,3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8,9,3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8 FROM 5 FOR 2) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8 FROM 5 FOR 2)
|
||||
1 aaaaaaaa aa
|
||||
select cidx, CVCHAR8, SUBSTR(CVCHAR8 FROM 9 FOR 3) from datatypetestm order by cidx;
|
||||
cidx CVCHAR8 SUBSTR(CVCHAR8 FROM 9 FOR 3)
|
||||
1 aaaaaaaa NULL
|
||||
1 aaaaaaaa
|
||||
select cidx, CVCHAR255, SUBSTR(CVCHAR255,1) from datatypetestm order by cidx;
|
||||
cidx CVCHAR255 SUBSTR(CVCHAR255,1)
|
||||
1 aaaaaaaaaa aaaaaaaaaa
|
||||
|
@ -11,7 +11,7 @@ cidx CTINYTEXT MID(CTINYTEXT,5,2)
|
||||
1 tinytext te
|
||||
select cidx, CTINYTEXT, MID(CTINYTEXT,9,3) from datatypetestm ;
|
||||
cidx CTINYTEXT MID(CTINYTEXT,9,3)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CMEDIUMTEXT, MID(CMEDIUMTEXT,5,2) from datatypetestm ;
|
||||
cidx CMEDIUMTEXT MID(CMEDIUMTEXT,5,2)
|
||||
1 mediumtestmediumtest um
|
||||
|
@ -47,25 +47,25 @@ cidx CTINYTEXT SUBSTRING(CTINYTEXT,8)
|
||||
1 tinytext t
|
||||
select cidx, CTINYTEXT, SUBSTRING(CTINYTEXT,9) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTRING(CTINYTEXT,9)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CTINYTEXT, SUBSTRING(CTINYTEXT FROM 5) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTRING(CTINYTEXT FROM 5)
|
||||
1 tinytext text
|
||||
select cidx, CTINYTEXT, SUBSTRING(CTINYTEXT FROM 9) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTRING(CTINYTEXT FROM 9)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CTINYTEXT, SUBSTRING(CTINYTEXT,5,2) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTRING(CTINYTEXT,5,2)
|
||||
1 tinytext te
|
||||
select cidx, CTINYTEXT, SUBSTRING(CTINYTEXT,9,3) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTRING(CTINYTEXT,9,3)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CTINYTEXT, SUBSTRING(CTINYTEXT FROM 5 FOR 2) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTRING(CTINYTEXT FROM 5 FOR 2)
|
||||
1 tinytext te
|
||||
select cidx, CTINYTEXT, SUBSTRING(CTINYTEXT FROM 9 FOR 3) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTRING(CTINYTEXT FROM 9 FOR 3)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CMEDIUMTEXT, SUBSTRING(CMEDIUMTEXT,1) from datatypetestm ;
|
||||
cidx CMEDIUMTEXT SUBSTRING(CMEDIUMTEXT,1)
|
||||
1 mediumtestmediumtest mediumtestmediumtest
|
||||
|
@ -47,25 +47,25 @@ cidx CTINYTEXT SUBSTR(CTINYTEXT,8)
|
||||
1 tinytext t
|
||||
select cidx, CTINYTEXT, SUBSTR(CTINYTEXT,9) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTR(CTINYTEXT,9)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CTINYTEXT, SUBSTR(CTINYTEXT FROM 5) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTR(CTINYTEXT FROM 5)
|
||||
1 tinytext text
|
||||
select cidx, CTINYTEXT, SUBSTR(CTINYTEXT FROM 9) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTR(CTINYTEXT FROM 9)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CTINYTEXT, SUBSTR(CTINYTEXT,5,2) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTR(CTINYTEXT,5,2)
|
||||
1 tinytext te
|
||||
select cidx, CTINYTEXT, SUBSTR(CTINYTEXT,9,3) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTR(CTINYTEXT,9,3)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CTINYTEXT, SUBSTR(CTINYTEXT FROM 5 FOR 2) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTR(CTINYTEXT FROM 5 FOR 2)
|
||||
1 tinytext te
|
||||
select cidx, CTINYTEXT, SUBSTR(CTINYTEXT FROM 9 FOR 3) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTR(CTINYTEXT FROM 9 FOR 3)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CMEDIUMTEXT, SUBSTR(CMEDIUMTEXT,1) from datatypetestm ;
|
||||
cidx CMEDIUMTEXT SUBSTR(CMEDIUMTEXT,1)
|
||||
1 mediumtestmediumtest mediumtestmediumtest
|
||||
|
@ -11,7 +11,7 @@ cidx CTINYTEXT MID(CTINYTEXT,5,2)
|
||||
1 tinytext te
|
||||
select cidx, CTINYTEXT, MID(CTINYTEXT,9,3) from datatypetestm ;
|
||||
cidx CTINYTEXT MID(CTINYTEXT,9,3)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CMEDIUMTEXT, MID(CMEDIUMTEXT,5,2) from datatypetestm ;
|
||||
cidx CMEDIUMTEXT MID(CMEDIUMTEXT,5,2)
|
||||
1 mediumtestmediumtest um
|
||||
|
@ -47,25 +47,25 @@ cidx CTINYTEXT SUBSTRING(CTINYTEXT,8)
|
||||
1 tinytext t
|
||||
select cidx, CTINYTEXT, SUBSTRING(CTINYTEXT,9) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTRING(CTINYTEXT,9)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CTINYTEXT, SUBSTRING(CTINYTEXT FROM 5) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTRING(CTINYTEXT FROM 5)
|
||||
1 tinytext text
|
||||
select cidx, CTINYTEXT, SUBSTRING(CTINYTEXT FROM 9) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTRING(CTINYTEXT FROM 9)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CTINYTEXT, SUBSTRING(CTINYTEXT,5,2) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTRING(CTINYTEXT,5,2)
|
||||
1 tinytext te
|
||||
select cidx, CTINYTEXT, SUBSTRING(CTINYTEXT,9,3) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTRING(CTINYTEXT,9,3)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CTINYTEXT, SUBSTRING(CTINYTEXT FROM 5 FOR 2) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTRING(CTINYTEXT FROM 5 FOR 2)
|
||||
1 tinytext te
|
||||
select cidx, CTINYTEXT, SUBSTRING(CTINYTEXT FROM 9 FOR 3) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTRING(CTINYTEXT FROM 9 FOR 3)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CMEDIUMTEXT, SUBSTRING(CMEDIUMTEXT,1) from datatypetestm ;
|
||||
cidx CMEDIUMTEXT SUBSTRING(CMEDIUMTEXT,1)
|
||||
1 mediumtestmediumtest mediumtestmediumtest
|
||||
|
@ -47,25 +47,25 @@ cidx CTINYTEXT SUBSTR(CTINYTEXT,8)
|
||||
1 tinytext t
|
||||
select cidx, CTINYTEXT, SUBSTR(CTINYTEXT,9) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTR(CTINYTEXT,9)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CTINYTEXT, SUBSTR(CTINYTEXT FROM 5) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTR(CTINYTEXT FROM 5)
|
||||
1 tinytext text
|
||||
select cidx, CTINYTEXT, SUBSTR(CTINYTEXT FROM 9) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTR(CTINYTEXT FROM 9)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CTINYTEXT, SUBSTR(CTINYTEXT,5,2) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTR(CTINYTEXT,5,2)
|
||||
1 tinytext te
|
||||
select cidx, CTINYTEXT, SUBSTR(CTINYTEXT,9,3) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTR(CTINYTEXT,9,3)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CTINYTEXT, SUBSTR(CTINYTEXT FROM 5 FOR 2) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTR(CTINYTEXT FROM 5 FOR 2)
|
||||
1 tinytext te
|
||||
select cidx, CTINYTEXT, SUBSTR(CTINYTEXT FROM 9 FOR 3) from datatypetestm ;
|
||||
cidx CTINYTEXT SUBSTR(CTINYTEXT FROM 9 FOR 3)
|
||||
1 tinytext NULL
|
||||
1 tinytext
|
||||
select cidx, CMEDIUMTEXT, SUBSTR(CMEDIUMTEXT,1) from datatypetestm ;
|
||||
cidx CMEDIUMTEXT SUBSTR(CMEDIUMTEXT,1)
|
||||
1 mediumtestmediumtest mediumtestmediumtest
|
||||
|
@ -24,7 +24,7 @@ FROM
|
||||
t1;
|
||||
json value path result
|
||||
{"k1":123, "k2":345} 123 $.k1 1
|
||||
NULL NULL $ NULL
|
||||
$ NULL
|
||||
null null $ 1
|
||||
"10" "10" $ 1
|
||||
"10" 10 $ 0
|
||||
|
@ -106,7 +106,7 @@ CHAR_LENGTH(JSON_UNQUOTE(l))
|
||||
FROM
|
||||
t1;
|
||||
JSON_UNQUOTE(l) CHAR_LENGTH(JSON_UNQUOTE(l))
|
||||
NULL 0
|
||||
0
|
||||
TRUNCATE t1;
|
||||
INSERT INTO
|
||||
t1
|
||||
@ -117,7 +117,7 @@ JSON_UNQUOTE(l)
|
||||
FROM
|
||||
t1;
|
||||
JSON_UNQUOTE(l)
|
||||
NULL
|
||||
|
||||
# Inconrrect type e.g. Integer
|
||||
CREATE TABLE t3(i INT) ENGINE = columnstore;
|
||||
INSERT INTO
|
||||
|
@ -78,7 +78,7 @@ SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1 GROUP BY a;
|
||||
JSON_ARRAYAGG(a) JSON_ARRAYAGG(b)
|
||||
[1,1,1,1] ["Hello","World","Hello","World"]
|
||||
[2,2,2,2,2,2,2,2] ["This","Will","Work","!","This","Will","Work","!"]
|
||||
[3,3] NULL
|
||||
[3,3]
|
||||
#
|
||||
# DISTINCT and LIMIT
|
||||
#
|
||||
@ -90,7 +90,7 @@ JSON_ARRAYAGG(b LIMIT 2)
|
||||
["Hello","World","This","Will","Work","!","Hello","World","This","Will","Work","!"]
|
||||
SELECT JSON_ARRAYAGG(b LIMIT 1) FROM t1 GROUP BY b;
|
||||
JSON_ARRAYAGG(b LIMIT 1)
|
||||
NULL
|
||||
|
||||
["!","!"]
|
||||
["Hello","Hello"]
|
||||
["This","This"]
|
||||
@ -99,7 +99,7 @@ NULL
|
||||
["World","World"]
|
||||
SELECT JSON_ARRAYAGG(b LIMIT 2) FROM t1 GROUP BY a;
|
||||
JSON_ARRAYAGG(b LIMIT 2)
|
||||
NULL
|
||||
|
||||
["Hello","World","Hello","World"]
|
||||
["This","Will","Work","!","This","Will","Work","!"]
|
||||
SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1;
|
||||
@ -156,7 +156,7 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT)ENGINE=COLUMNSTORE;
|
||||
SELECT JSON_ARRAYAGG(a) FROM t1;
|
||||
JSON_ARRAYAGG(a)
|
||||
NULL
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
#
|
||||
|
@ -0,0 +1,77 @@
|
||||
DROP DATABASE IF EXISTS test_empty_strings;
|
||||
CREATE DATABASE test_empty_strings;
|
||||
USE test_empty_strings;
|
||||
CREATE TABLE t(s text) ENGINE=COLUMNSTORE;
|
||||
INSERT INTO t(s) VALUES (''), (NULL);
|
||||
SELECT COUNT(*) FROM t WHERE s IS NULL;
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT COUNT(*) FROM t WHERE s IS NOT NULL;
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT * FROM t;
|
||||
s
|
||||
|
||||
NULL
|
||||
DROP TABLE t;
|
||||
CREATE TABLE t(s text) ENGINE=COLUMNSTORE;
|
||||
INSERT INTO t(s) VALUES ('');
|
||||
INSERT INTO t(s) VALUES (NULL);
|
||||
SELECT * FROM t;
|
||||
s
|
||||
|
||||
NULL
|
||||
SELECT COUNT(*) FROM t WHERE s IS NULL;
|
||||
COUNT(*)
|
||||
1
|
||||
DROP TABLE t;
|
||||
CREATE TABLE t(s text) ENGINE=COLUMNSTORE;
|
||||
INSERT INTO t(s) VALUES ('_CpNuLl_'),(''), (NULL);
|
||||
SELECT * FROM t;
|
||||
s
|
||||
_CpNuLl_
|
||||
|
||||
NULL
|
||||
SELECT COUNT(*) FROM t WHERE s IS NULL;
|
||||
COUNT(*)
|
||||
1
|
||||
DROP TABLE t;
|
||||
CREATE TABLE t(c6 CHAR(6)) ENGINE=COLUMNSTORE;
|
||||
INSERT INTO t(c6) VALUES ('a'), ('b'), ('c');
|
||||
SELECT 2, COUNT(*) FROM t WHERE (c6 <= 'b' OR c6 <= '');
|
||||
2 COUNT(*)
|
||||
2 2
|
||||
SELECT 2, COUNT(*) FROM t WHERE (c6 <= 'b');
|
||||
2 COUNT(*)
|
||||
2 2
|
||||
SELECT 0, COUNT(*) FROM t WHERE (c6 <= '');
|
||||
0 COUNT(*)
|
||||
0 0
|
||||
SELECT 0, COUNT(*) FROM t WHERE (c6 <= ' ');
|
||||
0 COUNT(*)
|
||||
0 0
|
||||
SELECT 2, COUNT(*) FROM t WHERE (c6 <= 'b' OR c6 <= ' ');
|
||||
2 COUNT(*)
|
||||
2 2
|
||||
SELECT 0, COUNT(*) FROM t WHERE (c6 < '');
|
||||
0 COUNT(*)
|
||||
0 0
|
||||
SELECT 0, COUNT(*) FROM t WHERE (c6 < ' ');
|
||||
0 COUNT(*)
|
||||
0 0
|
||||
DROP TABLE IF EXISTS t;
|
||||
CREATE TABLE t(a CHAR(10)) ENGINE=COLUMNSTORE;
|
||||
INSERT INTO t(a) VALUES (''), (NULL), (' '), (' a ');
|
||||
SELECT LTRIM_ORACLE(a) FROM t;
|
||||
LTRIM_ORACLE(a)
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
a
|
||||
SELECT RTRIM_ORACLE(a) FROM t;
|
||||
RTRIM_ORACLE(a)
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
a
|
||||
DROP DATABASE test_empty_strings;
|
@ -11,5 +11,5 @@ COUNT(DISTINCT a)
|
||||
3
|
||||
SELECT COUNT(DISTINCT b) FROM t1;
|
||||
COUNT(DISTINCT b)
|
||||
2
|
||||
3
|
||||
DROP DATABASE mcs115_db;
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs123_db;
|
||||
CREATE DATABASE mcs123_db;
|
||||
USE mcs123_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 12),('c', 1861),('c', 1991),('d', 10701),('d', 1071);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 12),('c', 1861),('c', 1991),('d', 10701),('d', 1071);
|
||||
SELECT a, b, CUME_DIST() OVER(ORDER BY a) cume_dist_val FROM t1;
|
||||
a b cume_dist_val
|
||||
NULL NULL 0.1250000000
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs124_db;
|
||||
CREATE DATABASE mcs124_db;
|
||||
USE mcs124_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, DENSE_RANK() OVER(ORDER BY a) rank FROM t1;
|
||||
a b rank
|
||||
NULL NULL 1
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs125_db;
|
||||
CREATE DATABASE mcs125_db;
|
||||
USE mcs125_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, FIRST_VALUE(b) OVER(ORDER BY a DESC) fv FROM t1;
|
||||
a b fv
|
||||
d 10701 10701
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs126_db;
|
||||
CREATE DATABASE mcs126_db;
|
||||
USE mcs126_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, LAG(a) OVER(ORDER BY a) pc FROM t1;
|
||||
a b pc
|
||||
NULL NULL NULL
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs127_db;
|
||||
CREATE DATABASE mcs127_db;
|
||||
USE mcs127_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, LAST_VALUE(b) OVER(ORDER BY a) last_value FROM t1;
|
||||
a b last_value
|
||||
NULL NULL NULL
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs128_db;
|
||||
CREATE DATABASE mcs128_db;
|
||||
USE mcs128_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, LEAD(a) OVER(ORDER BY a) lead_value FROM t1;
|
||||
a b lead_value
|
||||
NULL NULL a
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs129_db;
|
||||
CREATE DATABASE mcs129_db;
|
||||
USE mcs129_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, NTH_VALUE(a, 2) OVER(ORDER BY b DESC) second_value FROM t1;
|
||||
a b second_value
|
||||
d 10701 NULL
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs130_db;
|
||||
CREATE DATABASE mcs130_db;
|
||||
USE mcs130_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, NTILE(3) OVER(ORDER BY b DESC) ntile FROM t1;
|
||||
a b ntile
|
||||
d 10701 1
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs131_db;
|
||||
CREATE DATABASE mcs131_db;
|
||||
USE mcs131_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, PERCENT_RANK() OVER(ORDER BY a) percent_rank FROM t1;
|
||||
a b percent_rank
|
||||
NULL NULL 0.0000000000
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs132_db;
|
||||
CREATE DATABASE mcs132_db;
|
||||
USE mcs132_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
|
||||
SELECT a, b, PERCENTILE_CONT(1) WITHIN GROUP(ORDER BY b) OVER(PARTITION BY a DESC) pc FROM t1;
|
||||
a b pc
|
||||
NULL NULL NULL
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs133_db;
|
||||
CREATE DATABASE mcs133_db;
|
||||
USE mcs133_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
|
||||
SELECT a, b, PERCENTILE_DISC(1) WITHIN GROUP(ORDER BY b) OVER(PARTITION BY a DESC) pd FROM t1;
|
||||
a b pd
|
||||
NULL NULL 2147483647
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs134_db;
|
||||
CREATE DATABASE mcs134_db;
|
||||
USE mcs134_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, RANK() OVER(ORDER BY a) rank FROM t1;
|
||||
a b rank
|
||||
NULL NULL 1
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs135_db;
|
||||
CREATE DATABASE mcs135_db;
|
||||
USE mcs135_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 12),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 12),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, ROW_NUMBER() OVER(ORDER BY a) row_num FROM t1;
|
||||
a b row_num
|
||||
NULL NULL 1
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs136_db;
|
||||
CREATE DATABASE mcs136_db;
|
||||
USE mcs136_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, SUM(b) OVER(ORDER BY a) sum FROM t1;
|
||||
a b sum
|
||||
NULL NULL NULL
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs137_db;
|
||||
CREATE DATABASE mcs137_db;
|
||||
USE mcs137_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, COUNT(b) OVER(ORDER BY a) count FROM t1;
|
||||
a b count
|
||||
NULL NULL 0
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs138_db;
|
||||
CREATE DATABASE mcs138_db;
|
||||
USE mcs138_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, MAX(b) OVER(ORDER BY a) max FROM t1;
|
||||
a b max
|
||||
NULL NULL NULL
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs139_db;
|
||||
CREATE DATABASE mcs139_db;
|
||||
USE mcs139_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, MIN(b) OVER(ORDER BY a) min FROM t1;
|
||||
a b min
|
||||
NULL NULL NULL
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs140_db;
|
||||
CREATE DATABASE mcs140_db;
|
||||
USE mcs140_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 123),('a', 1),('b', 123),('c', 1861),('c', 1991),('d', 10701),('d', 1071),('a', 92);
|
||||
SELECT a, b, MEDIAN(b) OVER(PARTITION BY b) median FROM t1;
|
||||
a b median
|
||||
NULL NULL NULL
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs141_db;
|
||||
CREATE DATABASE mcs141_db;
|
||||
USE mcs141_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
|
||||
SELECT a, b, STD(b) OVER(PARTITION BY a) pd FROM t1;
|
||||
a b pd
|
||||
NULL NULL NULL
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs142_db;
|
||||
CREATE DATABASE mcs142_db;
|
||||
USE mcs142_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
|
||||
SELECT a, b, STDDEV(b) OVER(PARTITION BY a) pd FROM t1;
|
||||
a b pd
|
||||
NULL NULL NULL
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs143_db;
|
||||
CREATE DATABASE mcs143_db;
|
||||
USE mcs143_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
|
||||
SELECT a, b, STDDEV_POP(b) OVER(PARTITION BY a) pd FROM t1;
|
||||
a b pd
|
||||
NULL NULL NULL
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs144_db;
|
||||
CREATE DATABASE mcs144_db;
|
||||
USE mcs144_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
|
||||
SELECT a, b, STDDEV_SAMP(b) OVER(PARTITION BY a) pd FROM t1;
|
||||
a b pd
|
||||
NULL NULL NULL
|
||||
|
@ -2,7 +2,7 @@ DROP DATABASE IF EXISTS mcs145_db;
|
||||
CREATE DATABASE mcs145_db;
|
||||
USE mcs145_db;
|
||||
CREATE TABLE t1 (a CHAR(1), b INT)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES ('', NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
|
||||
INSERT INTO t1 VALUES (NULL, NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
|
||||
SELECT a, b, VARIANCE(b) OVER(PARTITION BY a) variance FROM t1;
|
||||
a b variance
|
||||
NULL NULL NULL
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user