Skip to content

Commit d3c3a03

Browse files
author
Jinzhi Chen
committed
update release130.22
1 parent 7b63972 commit d3c3a03

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+17380
-4179
lines changed

include/ConstantFactory.h

100755100644
Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,11 @@ class ConstantFactory{
271271
Constant* createIPAddr(int extraParam){return new IPAddr();}
272272
Constant* createDecima32(int extraParam) { return new Decimal32(extraParam); }
273273
Constant* createDecima64(int extraParam) { return new Decimal64(extraParam); }
274+
Constant* createDecima128(int extraParam) { return new Decimal128(extraParam); }
274275

275276
Vector* createVoidVector(INDEX size, INDEX capacity, bool fastMode, int extraParam, void* data, void** dataSegment, int segmentSizeInBit, bool containNull){
276-
throw RuntimeException("Not allowed to create void vector");
277+
// throw RuntimeException("Not allowed to create void vector");
278+
return new FastVoidVector(size, capacity, (char*)data, containNull);
277279
}
278280

279281
Vector* createBoolVector(INDEX size, INDEX capacity, bool fastMode, int extraParam, void* data, void** dataSegment, int segmentSizeInBit, bool containNull){
@@ -497,6 +499,16 @@ class ConstantFactory{
497499
return NULL;
498500
}
499501

502+
Vector* createDecimal128Vector(INDEX size, INDEX capacity, bool fastMode, int extraParam, void* data, void** dataSegment, int segmentSizeInBit, bool containNull) {
503+
if (data == NULL && dataSegment == NULL) {
504+
allocate<wide_integer::int128>(size, capacity, fastMode, segmentSizeInBit, data, dataSegment);
505+
}
506+
if (data != NULL)
507+
return new FastDecimalVector<wide_integer::int128>(extraParam, size, capacity, (wide_integer::int128*)data, containNull);
508+
else
509+
return NULL;
510+
}
511+
500512
Vector* createBoolArrayVector(INDEX size, INDEX capacity, bool fastMode, int extraParam, void *data, void *pindex, void** dataSegment, int segmentSizeInBit, bool containNull) {
501513
//if(data == NULL && dataSegment == NULL){
502514
// allocate<char>(size, capacity, fastMode, segmentSizeInBit, data, dataSegment);
@@ -628,6 +640,10 @@ class ConstantFactory{
628640
return new FastArrayVector(size, capacity, (char*)data, containNull, DATA_TYPE(DT_DECIMAL64 + ARRAY_TYPE_BASE), (INDEX *)pindex, extraParam);
629641
}
630642

643+
Vector* createDecimal128ArrayVector(INDEX size, INDEX capacity, bool fastMode, int extraParam, void* data, void *pindex, void** dataSegment, int segmentSizeInBit, bool containNull) {
644+
return new FastArrayVector(size, capacity, (char*)data, containNull, DATA_TYPE(DT_DECIMAL128 + ARRAY_TYPE_BASE), (INDEX *)pindex, extraParam);
645+
}
646+
631647
Vector* createVoidMatrix(int cols, int rows, int colCapacity, int extraParam, void* data, void** dataSegment, int segmentSizeInBit, bool containNull){
632648
throw RuntimeException("Not allowed to create a void matrix");
633649
}
@@ -808,6 +824,8 @@ class ConstantFactory{
808824
arrConstFactory[DT_IP]=&ConstantFactory::createIPAddr;
809825
arrConstFactory[DT_DECIMAL32] = &ConstantFactory::createDecima32;
810826
arrConstFactory[DT_DECIMAL64] = &ConstantFactory::createDecima64;
827+
arrConstFactory[DT_DECIMAL128] = &ConstantFactory::createDecima128;
828+
811829
arrConstFactory[DT_DICTIONARY]=NULL;
812830

813831
arrConstVectorFactory[DT_VOID]=&ConstantFactory::createVoidVector;
@@ -836,6 +854,8 @@ class ConstantFactory{
836854
arrConstVectorFactory[DT_IP]=&ConstantFactory::createIPAddrVector;
837855
arrConstVectorFactory[DT_DECIMAL32] = &ConstantFactory::createDecimal32Vector;
838856
arrConstVectorFactory[DT_DECIMAL64] = &ConstantFactory::createDecimal64Vector;
857+
arrConstVectorFactory[DT_DECIMAL128] = &ConstantFactory::createDecimal128Vector;
858+
839859
arrConstVectorFactory[DT_FUNCTIONDEF]=&ConstantFactory::createAnyVector;
840860
arrConstVectorFactory[DT_HANDLE]=&ConstantFactory::createAnyVector;
841861
arrConstVectorFactory[DT_ANY]=&ConstantFactory::createAnyVector;
@@ -867,6 +887,7 @@ class ConstantFactory{
867887
arrConstArrayVectorFactory[DT_IP] = &ConstantFactory::createIpArrayVector;
868888
arrConstArrayVectorFactory[DT_DECIMAL32] = &ConstantFactory::createDecimal32ArrayVector;
869889
arrConstArrayVectorFactory[DT_DECIMAL64] = &ConstantFactory::createDecimal64ArrayVector;
890+
arrConstArrayVectorFactory[DT_DECIMAL128] = &ConstantFactory::createDecimal128ArrayVector;
870891

871892
arrConstMatrixFactory[DT_VOID]=&ConstantFactory::createVoidMatrix;
872893
arrConstMatrixFactory[DT_BOOL]=&ConstantFactory::createBoolMatrix;
@@ -968,30 +989,35 @@ class ConstantFactory{
968989
arrTypeStr[DT_SHORT]="SHORT";
969990
arrTypeStr[DT_INT]="INT";
970991
arrTypeStr[DT_LONG]="LONG";
971-
arrTypeStr[DT_FLOAT]="FLOAT";
972-
arrTypeStr[DT_DOUBLE]="DOUBLE";
973992
arrTypeStr[DT_DATE]="DATE";
974993
arrTypeStr[DT_MONTH]="MONTH";
975-
arrTypeStr[DT_DATETIME]="DATETIME";
976-
arrTypeStr[DT_DATEHOUR]="DATEHOUR";
977994
arrTypeStr[DT_TIME]="TIME";
995+
arrTypeStr[DT_MINUTE]="MINUTE";
996+
arrTypeStr[DT_SECOND]="SECOND";
997+
arrTypeStr[DT_DATETIME]="DATETIME";
978998
arrTypeStr[DT_TIMESTAMP]="TIMESTAMP";
979999
arrTypeStr[DT_NANOTIME]="NANOTIME";
9801000
arrTypeStr[DT_NANOTIMESTAMP]="NANOTIMESTAMP";
981-
arrTypeStr[DT_MINUTE]="MINUTE";
982-
arrTypeStr[DT_SECOND]="SECOND";
1001+
arrTypeStr[DT_FLOAT]="FLOAT";
1002+
arrTypeStr[DT_DOUBLE]="DOUBLE";
9831003
arrTypeStr[DT_SYMBOL]="SYMBOL";
9841004
arrTypeStr[DT_STRING]="STRING";
1005+
arrTypeStr[DT_UUID]="UUID";
9851006
arrTypeStr[DT_FUNCTIONDEF]="FUNCTIONDEF";
9861007
arrTypeStr[DT_HANDLE]="HANDLE";
1008+
arrTypeStr[DT_CODE]="CODE";
9871009
arrTypeStr[DT_DATASOURCE]="DATASOURCE";
9881010
arrTypeStr[DT_RESOURCE]="RESOURCE";
9891011
arrTypeStr[DT_ANY]="ANY";
990-
arrTypeStr[DT_INT128]="INT128";
991-
arrTypeStr[DT_UUID]="UUID";
992-
arrTypeStr[DT_IP]="IPADDR";
1012+
arrTypeStr[DT_COMPRESS] = "COMPRESS";
9931013
arrTypeStr[DT_DICTIONARY]="DICTIONARY";
994-
arrTypeStr[DT_CODE]="CODE";
1014+
arrTypeStr[DT_DATEHOUR]="DATEHOUR";
1015+
arrTypeStr[DT_IP]="IPADDR";
1016+
arrTypeStr[DT_INT128]="INT128";
1017+
arrTypeStr[DT_BLOB] = "BLOB";
1018+
arrTypeStr[DT_COMPLEX] = "COMPLEX";
1019+
arrTypeStr[DT_POINT] = "POINT";
1020+
arrTypeStr[DT_DURATION] = "DURATION";
9951021
arrTypeStr[DT_DECIMAL32] = "DECIMAL32";
9961022
arrTypeStr[DT_DECIMAL64] = "DECIMAL64";
9971023
arrTypeStr[DT_DECIMAL128] = "DECIMAL128";

0 commit comments

Comments
 (0)