1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-26 05:02:32 +03:00
Files
mariadb-columnstore-engine/utils/udfsdk
David.Hall 2020f35e88 Mcol 5092 MODA uses wrong column width for some types (#2450)
* MCOL-5092 Ensure column width is correct for datatype
                       Change MODA return type to STRING
                       Modify MODA to handle every numeric type
* MCOL-5162 MODA to support char and varchar with collation support

Fixes to the aggregate bit functions
When we fixed the storage sign issue for MCOL-5092, it uncovered a problem in the bit aggregates (bit_and, bit_or and bit_xor). These aggregates should always return UBIGINT, but they relied on the type of the argument column, which gave bad results.
2022-08-11 15:16:11 -05:00
..
2019-03-06 12:22:35 -06:00
2022-01-21 16:43:49 +00:00
2022-01-21 16:43:49 +00:00
2022-01-21 16:43:49 +00:00
2022-01-21 16:43:49 +00:00
2022-01-21 16:43:49 +00:00
2022-01-21 16:43:49 +00:00
2022-01-21 16:43:49 +00:00
2022-01-21 16:43:49 +00:00
2016-01-06 14:08:59 -06:00
2016-01-06 14:08:59 -06:00
2022-01-21 16:43:49 +00:00
2022-01-21 16:43:49 +00:00
2022-01-21 16:43:49 +00:00
2019-12-03 21:21:28 +00:00
2022-01-21 16:43:49 +00:00
2022-01-21 16:43:49 +00:00
2022-01-21 16:43:49 +00:00
2022-02-17 13:08:58 +03:00
2022-02-17 13:08:58 +03:00
2022-02-17 13:08:58 +03:00

How to use the ColumnStore UDF SDK

Obtain the MariaDB columnstore source code from https://github.com/mariadb-corporation/mariadb-columnstore-server
and follow the pre-requisite and build instructions.

Go into the utils/udfsdk directory.

At this point you can use the MCS_add() function template in udfsdk.cpp and udfmysql.cpp
files to create your own function or just try that function as is.
- Make the library
    $ make
- Copy the libudf_mysql.so.1.0.0 and libudfsdk.so.1.0.0 file to /usr/local/mariadb/columnstore/lib on
  every columnstore node.
    $ cp libudf_mysql.so.1.0.0 libudfsdk.so.1.0.0 /usr/local/mariadb/columnstore/lib/
- Restart ColumnStore
    $ mcsadmin restartsystem y
- Using the mariadb client add the user defined function, e.g,
    $ mariadb
    > create function mcs_add returns integer soname 'libudf_mysql.so';
    > create function mcs_isnull returns string soname 'libudf_mysql.so';

You should now be able to use the mcs_add(arg1, arg2) and mcs_isnull(arg) functions in the select and/or where clauses
of SQL statements.