You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-267 Add basic engine support
This patch adds enough support so that cross engines joins with blob columns in the foreign engines will work. The modifications are as follows: * Add CrossEngine support for non-NULL-terminated (binary) data * Add row data support for blobs (similar to varbinary) * Add engine support for writing out blob data correctly to the storage engine API * Re-enable blob support in the engine plugin
This commit is contained in:
@ -2233,10 +2233,10 @@ CalpontSystemCatalog::ColType colType_MysqlToIDB (const Item* item)
|
||||
ct.colDataType = CalpontSystemCatalog::DATETIME;
|
||||
ct.colWidth = 8;
|
||||
}
|
||||
if (item->field_type() == MYSQL_TYPE_BLOB)
|
||||
{
|
||||
throw runtime_error ("BLOB/TEXT data types are not supported by ColumnStore.");
|
||||
}
|
||||
if (item->field_type() == MYSQL_TYPE_BLOB)
|
||||
{
|
||||
ct.colDataType = CalpontSystemCatalog::BLOB;
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* FIXME:
|
||||
|
@ -467,6 +467,7 @@ int fetchNextRow(uchar *buf, cal_table_info& ti, cal_connection_info* ci)
|
||||
case CalpontSystemCatalog::CHAR:
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
{
|
||||
// TODO: use getStringPointer instead of getStringField to stop the string copies
|
||||
Field_varstring* f2 = (Field_varstring*)*f;
|
||||
switch (colType.colWidth)
|
||||
{
|
||||
@ -622,6 +623,14 @@ int fetchNextRow(uchar *buf, cal_table_info& ti, cal_connection_info* ci)
|
||||
storeNumericField(f, intColVal, colType);
|
||||
break;
|
||||
}
|
||||
case CalpontSystemCatalog::BLOB:
|
||||
{
|
||||
Field_blob *f2 = (Field_blob*)*f;
|
||||
f2->set_ptr(row.getVarBinaryLength(s), (unsigned char*)row.getVarBinaryField(s));
|
||||
if ((*f)->null_ptr)
|
||||
*(*f)->null_ptr &= ~(*f)->null_bit;
|
||||
break;
|
||||
}
|
||||
default: // treat as int64
|
||||
{
|
||||
intColVal = row.getUintField<8>(s);
|
||||
|
Reference in New Issue
Block a user