1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-11-03 17:13:17 +03:00

feat(JSON,data_type): MCOL-6197 - support for JSON type

This patch does exactly this, it implements support for JSON in DDL.

Right now we use server's check for JSON validity on INSERT. We do not implement
JSON validity check during updates, it is postponed for later work.
This commit is contained in:
Serguey Zefirov
2025-10-02 10:39:58 +00:00
committed by Sergey Zefirov
parent 5c834ac7cd
commit bb631dcffb
14 changed files with 95 additions and 24 deletions

View File

@@ -195,9 +195,10 @@ execplan::CalpontSystemCatalog::ColDataType DDLPackageProcessor::convertDataType
case ddlpackage::DDL_BLOB: colDataType = CalpontSystemCatalog::BLOB; break;
case ddlpackage::DDL_TEXT: colDataType = CalpontSystemCatalog::TEXT; break;
case ddlpackage::DDL_TEXT:
case ddlpackage::DDL_JSON: colDataType = CalpontSystemCatalog::TEXT; break;
default: throw runtime_error("Unsupported datatype!");
default: throw runtime_error("Unsupported DDL datatype!");
}
return colDataType;
@@ -228,6 +229,8 @@ std::string DDLPackageProcessor::buildTableConstraintName(const int oid, ddlpack
case ddlpackage::DDL_NOT_NULL: prefix = "nk_"; break;
case ddlpackage::DDL_VALIDATE_JSON: prefix = "jk_"; break;
default: throw runtime_error("Unsupported constraint type!"); break;
}
@@ -261,6 +264,8 @@ std::string DDLPackageProcessor::buildColumnConstraintName(const std::string& sc
case ddlpackage::DDL_NOT_NULL: prefix = "nk_"; break;
case ddlpackage::DDL_VALIDATE_JSON: prefix = "jk_"; break;
default: throw runtime_error("Unsupported constraint type!"); break;
}
@@ -288,6 +293,8 @@ char DDLPackageProcessor::getConstraintCode(ddlpackage::DDL_CONSTRAINTS type)
case ddlpackage::DDL_NOT_NULL: constraint_type = 'n'; break;
case ddlpackage::DDL_VALIDATE_JSON: constraint_type = 'j'; break;
default: constraint_type = '0'; break;
}