1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00
Commit Graph

1101 Commits

Author SHA1 Message Date
Gagan Goel
ccb36e9794 Merge pull request #890 from drrtuy/separate_pushdown
MCOL-2178 Separate ha_mcs_pushdown.cpp compilation.
2019-10-07 18:50:01 -04:00
David Hall
07aaef7933 MCOL-3503 return type for moda should 4 (DECIMAL_RESULT) 2019-10-07 15:00:03 -05:00
Roman Nozdrin
12cb5201ac MCOL-2178 Separate ha_mcs_pushdown.cpp compilation.
Set a proper type for string literals on ConstantColumn ctor
to fix the regression produced by MCOL-174.

Removed OPTIMIZER_SWITCH_EXISTS_TO_IN b/c MDB produces
unsupported optimization with it and CS couldn't create
ExistsFilter.
2019-10-07 03:12:37 -05:00
Andrew Hutchings
a2abe72a89 Merge pull request #879 from dhall-MariaDB/MCOL-3503
MCOL-3503 add MODA aggregate function
2019-10-07 08:04:10 +01:00
Roman Nozdrin
00539eda34 Merge pull request #885 from tntnatbry/fix-windowfunc-orderby
Allow a window function in the ORDER BY clause.
2019-10-07 09:53:06 +03:00
Roman Nozdrin
d68b152e50 Merge pull request #880 from tntnatbry/fix-update-decimal-constant
Set constant value of type DECIMAL_RESULT/REAL_RESULT in an update statement.
2019-10-07 09:25:16 +03:00
Gagan Goel
a9eec783e6 Disable SH for a SELECT INTO query that uses interceptor classes. 2019-10-04 10:27:19 -04:00
Gagan Goel
5d585837d8 Allow a window function in the ORDER BY clause. 2019-10-03 16:12:06 -04:00
David Hall
baf31b64fc MCOL-3505 Add moda to build and mysql.func 2019-09-30 14:16:08 -05:00
Gagan Goel
6aea9e68a5 Set constant value of type DECIMAL_RESULT/REAL_RESULT in an update statement. 2019-09-27 15:09:30 -04:00
David Hall
cbef44a0be MCOL-3503 add MODA aggregate function 2019-09-27 12:22:44 -05:00
Andrew Hutchings
1f475340dc Merge pull request #876 from tntnatbry/revert-pr-859
Revert commit 98e90ed as the proper fix is applied as part of MCOL-1559.
2019-09-26 08:48:22 +01:00
Andrew Hutchings
3710d6e331 Merge pull request #875 from tntnatbry/fix-gbh-aggregate
Build an aggregate column from the extended select list in the group by handler.
2019-09-26 08:47:56 +01:00
Andrew Hutchings
b0e0d7b8b1 Merge pull request #867 from tntnatbry/fix-double-negative-zero
Preserve the sign when a double is -0 in fetchNextRow()
2019-09-26 08:47:32 +01:00
Gagan Goel
07e3262906 Revert commit 98e90ed as the proper fix is applied as part of MCOL-1559. 2019-09-25 11:52:28 -04:00
Gagan Goel
32108e69e8 Merge pull request #870 from drrtuy/fix-literals
MCOL-2178 CS now can have string literals and functions with literals
2019-09-25 11:26:09 -04:00
Gagan Goel
dac290b755 Build an aggregate column from the extended select list in
the group by handler.
2019-09-25 10:42:39 -04:00
Andrew Hutchings
70b3aa3159 Merge branch 'develop-1.2' into develop-merge-up-20190924-2 2019-09-24 14:17:57 +01:00
Roman Nozdrin
a710dff9e1 MCOL-2178 CS now can have string literals and functions with literals
in projection list of the queries with GROUP BY and ORDER BY.

Removed support for Item_equal b/c it is an internal format MDB uses
and shouldn't be used outside of MDB's optimizer.
2019-09-20 13:35:49 +03:00
Gagan Goel
abea9481b7 Preserve the sign when a double is -0 in fetchNextRow() 2019-09-19 15:48:14 -04:00
Roman Nozdrin
69c1a613fa MCOL-2178 Fix distinctAggregationAndGroupBy by allowing to traverse into
any function in projection looking for either aggregation function or
GROUP BY key column.

MDB doesn't convert Item_equal into corresponding Item_func_eq w/o
OPTIMIZER_SWITCH_COND_PUSHDOWN_FROM_HAVING optimizer flag.
Activation of the flag fixes queries from having test scenario w
equal operator in HAVING, e.g. HAVING c1 = 50.
2019-09-19 08:06:39 +03:00
Gagan Goel
7599a9379e Save and restore the group by list columns as the server
optimizer can optimize out the constant columns in this list
2019-09-17 10:36:49 -04:00
Gagan Goel
5fe8388760 Undo commit e60fbf260f 2019-09-17 00:45:04 -04:00
Gagan Goel
21a98de22a Merge pull request #864 from drrtuy/set-optimizer-flags
MCOL-2178 CS now sets optimizer flags like it did in the fork-era.
2019-09-17 00:10:39 -04:00
Gagan Goel
df1f5aa545 1. Allow IF function with an aggregate function as an argument in the order by clause.
2. Handle hexadecimal literals of the form 0xHHHH... in gp_walk().
2019-09-15 20:05:57 -04:00
Roman Nozdrin
0c58f10d12 MCOL-2178 CS now sets optimizer flags like it did in the fork-era.
This happens in external_lock() whilst locking the table.

Fixes LIMIT=1 optimization for EXISTS_SUBS subqueries.

external_lock() contains if condition that gives false positive
for SH + pushed conditions.

external_lock() now resets in_subquery_conversion_threshold
variable that governs IN_INTO_SUBQUERY optimization for
queries run in table mode.

external_lock() now purges dynamicall allocated condInfo for
SH and DH execution path.

Commented out UNION check b/c if condition gives false positives
and silently enables table mode execution for queries w/o
UNION.
2019-09-15 07:12:50 -05:00
Gagan Goel
98e90ed9a8 Follow up to commit 8513bc0646
Only trim whitespaces, not tabs
2019-09-10 13:27:05 -04:00
Gagan Goel
8513bc0646 Right trim whitespaces for a string ConstantColumn in a where clause 2019-09-09 23:33:46 -04:00
benthompson15
b658080f06 Merge pull request #854 from mariadb-corporation/remove-vpj
Remove vpj files
2019-09-06 10:01:52 -05:00
benthompson15
016523ef47 Merge pull request #851 from mariadb-corporation/fix-packaging
Fix my.cnf clash
2019-09-05 18:27:45 -05:00
Andrew Hutchings
7da5b21fe2 Add required variable back 2019-09-05 19:03:32 +01:00
Andrew Hutchings
3fef0f21d3 Remove vpj files
They shouldn't be here
2019-09-05 17:38:03 +01:00
Gagan Goel
67738303ba 1. Enable Item::SUBSELECT_ITEM in the order by clause.
2. Do not set the limit to 1 for "exists" in a subquery.
2019-09-04 16:25:11 -04:00
Andrew Hutchings
74d68b4db3 Fix my.cnf clash
This patch:

* Moves ColumnStore my.cnf to /etc/my.cnf.d/columnstore.cnf
* Removes unneeded entries from columnstore.cnf
* Removes some things that used my.cnf and are now dead
* Also removes utils/scenarios
* Modifies things that use extra defaults file to use the standard one
* Makes sure that C++11 standard is used for older CMake versions

With this patch we no longer need to set -DINSTALL_SYSCONF2DIR and
-DINSTALL_SYSCONFDIR when building MariaDB server.
2019-09-04 18:51:02 +01:00
Andrew Hutchings
4d2a1594aa Merge pull request #835 from tntnatbry/union-subquery
Disable processing of a union in a subquery by the select_handler
2019-09-02 06:58:06 +01:00
Andrew Hutchings
658d50eecd Merge pull request #847 from tntnatbry/disable-uservar-funcs
Disable handlers for set_user_var and get_user_var functions in the SELECT clause
2019-09-02 06:57:33 +01:00
Gagan Goel
af988635d4 1. Execution plan now sets limitNum and limitOffset for all cases if an explicit limit is supplied in the query.
2. Fallback to using sql_select_limit system variable value if an explicit limit is not supplied.
3. Remove checks that did not allow (2^64 - 1) as a valid limit value.
2019-09-01 23:22:10 -04:00
Gagan Goel
e2084493f3 Disable handlers for set_user_var and get_user_var functions in the SELECT clause 2019-08-30 23:59:37 -04:00
Andrew Hutchings
40a0c30940 Add missing UDF functions
Some UDF functions were missed when I fixed the install permissions
issue. This adds them back and fixes test010
2019-08-30 17:16:45 +01:00
Roman Nozdrin
734518bb41 MCOL-2178 Fix for handlers fallback mechanism patch.
I returned if predicate that guards FE-BE initial connection
block. This predicated had been removed by accident in cb36041

Since we switched to internal ORDER BY FE now reduces the
default limit value to uint64-2 this broke a predicate check
for correlated subqueries. I replaced a predicate with more
reasonable to avoid false positives.
2019-08-30 02:00:03 +03:00
Andrew Hutchings
4f86b0f909 Fix develop build breakages 2019-08-29 09:44:14 +01:00
Gagan Goel
92ee66f5fd Remove a curly brace and add a check in a for loop in create_columnstore_select_handler() 2019-08-28 19:29:12 -04:00
Roman Nozdrin
cb36041587 MCOL-2178 CS now explicitly calls MDB's optimizer using JOIN::optimizer_inner
call.

CS doesn't use SH for SELECT..INTO OUTFILE queries.

Clean up gwi::physTableList when processing Storage API request.

SH now explicitly set an execution error in THD::stmt_da.

SH now set queryState in select_next() to mark a begging of the execution.
2019-08-28 12:22:11 -05:00
Roman Nozdrin
2c63258537 MCOL-2178 SH now allows to fallback to other pushdown handlers.
SH query execution migrated from SH::init() into create_SH().
There is a session variable columnstore_processing_handlers_fallback
that allows to fallback to DH, GBH if SH fails. DH now uses semantic
tree check for unsupported features to allow to fallback to GBH or
storage API.

Fixes GBH related bug when create_GBH() returns a handler for
queries with impossible WHERE/HAVING.

Fixed bug in FromSubquery::transform() where isUnion is set to true.

Enabled RTTI b/c server team enabled it for MDB.

Removed unused code supposed to be used with vtable.
2019-08-25 04:05:59 +03:00
Gagan Goel
e60fbf260f Disable processing of a union in a subquery by the select_handler 2019-08-21 21:59:27 -04:00
Roman Nozdrin
630f926dc6 Fix MDB crash bug with failed assertion on Item_func::fixed. 2019-08-20 21:12:09 +03:00
Gagan Goel
f5af10a0c4 1. For BETWEEN/IN functions in the SELECT clause, build a function column
2. CASE function should return false when it evaluates to NULL (e.g. due to absense of ELSE clause)

3. Set the operation type of IN function to varchar if all parameters are char/varchar/text
2019-08-18 21:23:41 -04:00
Roman Nozdrin
489c09c4dc Merge pull request #827 from drrtuy/MCOL-3317
MCOL-3317 Moved fill-next-block from writeRow() into allocRowId.
2019-08-16 22:42:26 +03:00
Roman Nozdrin
e2f1b07e70 MCOL-3317 Moved fill-next-block from writeRow() into allocRowId.
Intro* INSERT statements could face a non-existant block when MCOL-498 feature
    is enabled. writeRow() guard blocks was supposed to proactively create empty
    blocks. The pre-patch logic failed when first value in the block has been
    removed by DELETE and this overwrites the whole valid block with empty magics.
    This patch moves proactive creation logic into allocRowId().
2019-08-16 21:28:07 +03:00
Andrew Hutchings
b4c02e41c7 MCOL-3432 Fix plugin install for non-root
MariaDB 10.4 only allows the system root user to log in as the root DB
user. This means the SQL commands to install the plugins won't run on a
non-root install. This patch skips the grant tables for plugin install
and does some workarounds to get the plugins in.
2019-08-15 17:33:31 +01:00