support add column compress
This commit is contained in:
parent
c253ac73a9
commit
fd385d7c52
|
@ -12898,9 +12898,9 @@ static int32_t buildAddColReq(STranslateContext* pCxt, SAlterTableStmt* pStmt, S
|
||||||
pReq->flags = COL_SMA_ON;
|
pReq->flags = COL_SMA_ON;
|
||||||
pReq->bytes = calcTypeBytes(pStmt->dataType);
|
pReq->bytes = calcTypeBytes(pStmt->dataType);
|
||||||
if (pStmt->pColOptions != NULL) {
|
if (pStmt->pColOptions != NULL) {
|
||||||
if (!checkColumnEncode(pStmt->pColOptions->encode)) return TSDB_CODE_TSC_ENCODE_PARAM_ERROR;
|
if (!checkColumnEncodeOrSetDefault(pReq->type, pStmt->pColOptions->encode)) return TSDB_CODE_TSC_ENCODE_PARAM_ERROR;
|
||||||
if (!checkColumnCompress(pStmt->pColOptions->compress)) return TSDB_CODE_TSC_COMPRESS_PARAM_ERROR;
|
if (!checkColumnCompressOrSetDefault(pReq->type, pStmt->pColOptions->compress)) return TSDB_CODE_TSC_COMPRESS_PARAM_ERROR;
|
||||||
if (!checkColumnLevel(pStmt->pColOptions->compressLevel)) return TSDB_CODE_TSC_COMPRESS_LEVEL_ERROR;
|
if (!checkColumnLevelOrSetDefault(pReq->type, pStmt->pColOptions->compressLevel)) return TSDB_CODE_TSC_COMPRESS_LEVEL_ERROR;
|
||||||
int8_t code = setColCompressByOption(pReq->type, columnEncodeVal(pStmt->pColOptions->encode),
|
int8_t code = setColCompressByOption(pReq->type, columnEncodeVal(pStmt->pColOptions->encode),
|
||||||
columnCompressVal(pStmt->pColOptions->compress),
|
columnCompressVal(pStmt->pColOptions->compress),
|
||||||
columnLevelVal(pStmt->pColOptions->compressLevel), true, &pReq->compress);
|
columnLevelVal(pStmt->pColOptions->compressLevel), true, &pReq->compress);
|
||||||
|
|
Loading…
Reference in New Issue