1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-05 15:41:14 +03:00
Commit Graph

209 Commits

Author SHA1 Message Date
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
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
a2abe72a89 Merge pull request #879 from dhall-MariaDB/MCOL-3503
MCOL-3503 add MODA aggregate function
2019-10-07 08:04:10 +01:00
5d585837d8 Allow a window function in the ORDER BY clause. 2019-10-03 16:12:06 -04:00
cbef44a0be MCOL-3503 add MODA aggregate function 2019-09-27 12:22:44 -05:00
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
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
07e3262906 Revert commit 98e90ed as the proper fix is applied as part of MCOL-1559. 2019-09-25 11:52:28 -04:00
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
dac290b755 Build an aggregate column from the extended select list in
the group by handler.
2019-09-25 10:42:39 -04:00
70b3aa3159 Merge branch 'develop-1.2' into develop-merge-up-20190924-2 2019-09-24 14:17:57 +01:00
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
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
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
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
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
98e90ed9a8 Follow up to commit 8513bc0646
Only trim whitespaces, not tabs
2019-09-10 13:27:05 -04:00
8513bc0646 Right trim whitespaces for a string ConstantColumn in a where clause 2019-09-09 23:33:46 -04:00
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
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
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
e2084493f3 Disable handlers for set_user_var and get_user_var functions in the SELECT clause 2019-08-30 23:59:37 -04:00
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
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
630f926dc6 Fix MDB crash bug with failed assertion on Item_func::fixed. 2019-08-20 21:12:09 +03:00
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
08b1c69905 MCOL-3416 Revived MULT_EQUAL_FUNC support in conditions.
Removed unused symbol from DML code of the plugin.
2019-08-14 17:01:59 +03:00
b1bc995420 Merge branch 'develop' into remove-infinidb 2019-08-13 12:32:01 +03:00
6cdca1330b Merge pull request #808 from mariadb-corporation/develop-merge-up-20190729
Merge develop-1.2 into develop
2019-08-13 11:55:22 +03:00
196a50ef11 Merge pull request #815 from pleblanc1976/corporaton
Mass substitution 'Corporaton' -> 'Corporation'
2019-08-13 08:34:39 +01:00
f0c83a4a1f MCOL-2178 Enable GBH by default.
We preserve union related condition blocks until UNION-capable smart handler.

    Removed a number of commented code blocks.

    Add projection list REAL and TIME constants, e.g
        SELECT TIME'10:20:30',  TIMESTAMP'2001-01-01 10:20:30',  DATE'2001-01-01' FROM cs1;

    Marked potentially useless block in ORDER BY processing for future removal.

    Removed string variables used for reconstructed query in the pre-1.4 fork.

    Removed cp_get_plan().

    GBH doesn't step in if SH processes the query.

    All smart handlers now correctly processes impossible WHERE and HAVING.
2019-08-12 21:02:32 +03:00
9d83b49fca MCOL-104 First pass of InfiniDB rename in code 2019-08-12 09:41:28 +01:00
7af9771319 Merge branch 'develop' into develop-merge-up-20190729 2019-08-09 14:01:11 +01:00
a09a9d5d0f Mass substitution 'Corporaton' -> 'Corporation' 2019-08-07 14:43:25 -05:00
1c460f3ba5 MCOL-2178 Cleanup of MIGR:: singleton from the plugin code.
Disable SP execution by the smart handlers for now.

    Add session variables to Enable/Disable select/derived/group_by
    handlers. Defaulted to Enable.
2019-08-04 21:50:50 -04:00
d62b66ecf7 parse_item() in execplan code now always get an actual GWI structure
to avoid accedental crashes.

Add check for Conversion of Big IN Predicates Into Subqueries optimization
conditions.

Enabled derivedTableOptimization() for group by and derived handlers.

Disabled Conversion of Big IN Predicates Into Subqueries optimization.

Disabled most of optimizer_flags for now.

RowGroup + operator now correctly sets useStringTable flag that
instructs code to check StringStore instead of plain data buffer.
2019-08-01 14:29:55 -04:00
7d5275e1bd MCOL-2178 CS now doesn't initiate a scan when MDB explicitly set scan to false in rnd_init().
sortItemIsInGroupRec() now has a base case for Item_Field and this prevents unbound recursion.

    Fixes fromSub() call with incorrect number of arguments.

    CS now doesn't ask for statistics unless a user explicitly asks for it using calsettrace().
2019-08-01 14:29:55 -04:00
a9c72675ba MCOL-2178 Fixed MDB crash with setError() operating with empty gwi.
FromSubQuery() is no pushdown aware.

    Actualize OUTER_JOIN_DEBUG section in ha_calpont_execplan.cpp
    to be used with 10.4.

    Enabled derivedTableOptimization() for select handler.
2019-08-01 14:29:55 -04:00
3074b6c4b3 MCOL-2178 Functions with constant args are processed by CS now.
Fix crash in ha_calpont_impl_close_connection()

    Fix leak in ci.tableMap.

    Removed extra returns in pushdown_init to avoid crashes.

    create_select_handler now detects INSERT..SELECT.

    buildConstColFromFilter now uses any kind of filter to supply
    relevant columns.

    Remove strings used by vtable redo phase.

    Make FromSubQuery aware of Pushdown handlers.

    Changed debug_walk to work around changed Item framework.

    Temporary disabled derived handler and unsupported features checks.
2019-08-01 14:09:35 -04:00
cd72326c4d MCOL-2178 Introduced a dummy replacement for a infinidb_table.
Used Item attribute getters introduced by 10.4

    Make changes to support Item::CONST_ITEM introduced by 10.4
    as a replacement for INT_,REAL_,STRING_ ITEM.

    Replaced QT_INFINIDB_DERIVED and similar flags
    with correponded flags for Item->print().

    Replaced or commented out infinidb_ variable names with columnstore_
    where applicable.
2019-08-01 14:09:35 -04:00
6fd5b2f22d MCOL-2178 Merging with 10.4
SELECT_LEX had been moved in THD so changed all references.
        Avoid writing CS decimal scales into MDB decimal fields
            d-only dec attribute. WIP
        Replaced infinidb_vtable with a singleton MIGR.
        Merged with MCOL-2121.
        Added new wsrep include paths needed by UDaF code.
        Removed .vcxproj from Connector code.
2019-08-01 12:54:17 -04:00
2071716ebd MCOL-2121 New derived_handler(MDEV-17096) infrastructure.
Renamed isInfiniDB() into isMCSTable

    Changed getSelectPlan() to reuse it with derived and
        other handler types.

    Separate pushdown handlers methods and functions.

    Removed vcxproj files from the source.

    Added fix for MCOL-2166.

    Merged with MCOL-2121
2019-08-01 12:54:17 -04:00
765d1d38d4 MCOL-174 Handle quoted numerics 2019-07-31 13:58:50 -05:00
811909aa72 Merge branch 'develop-1.2' into develop-merge-up-20190729 2019-07-29 12:19:26 +01:00
cddb776bd4 Merge branch 'develop-1.1' into develop-1.2-merge-up-20190619 2019-06-19 18:34:43 +01:00
7d22a5945c MCOL-1989 Fix view in view subquery outer join
A view calling a view as part of a subquery outer join was not getting
the view name for the derived table columns. Which caused ColumnStore to
think it was joining outside of the view and triggered a missing column
error.

This fix adds the view name from the subquery if one cannot be obtained
from the field object.
2019-06-14 15:52:30 +01:00
5e4f1b9933 Merge branch 'develop' into MCOL-265 2019-06-10 13:58:03 +01:00
020b211bb7 Merge branch 'develop-1.2' into develop-merge-up-20190514 2019-05-14 13:58:33 +01:00
9dc33c4e82 Another try to cope with warnings under gcc 8.2. 2019-04-29 11:05:03 +03:00
4b9d046c6e Fully resolve potentially ambiguous symbols by removing using namespace statements from headers which have a cascading effect. This causes potential behavior changes when switching to c++11 since symbols can be exported from std and boost while both have been imported into the global namespace. 2019-04-29 01:21:15 -05:00