[MCOL-712] TEXT/LONGTEXT columns returned NULL when COUNT() MIN() MAX() functions used in the project list Created: 2017-05-10  Updated: 2017-05-11  Resolved: 2017-05-11

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: 1.1.0
Fix Version/s: 1.1.0

Type: Bug Priority: Major
Reporter: Daniel Lee (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2017-10

 Description   

Build tested: Github source

[root@localhost mariadb-columnstore-server]# git show
commit 349cae544b6bc71910267a3b3b0fa3fb57b0a587
Merge: bd13090 2ecb85c
Author: benthompson15 <ben.thompson@mariadb.com>
Date: Thu May 4 16:06:16 2017 -0500

Merge pull request #50 from mariadb-corporation/10.2-fixes

10.2 fixes

[root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/
[root@localhost mariadb-columnstore-engine]# git show
commit 03c62656b3750fd5f9759897f048bda8423c4aae
Author: david hill <david.hill@mariadb.com>
Date: Wed May 10 10:35:56 2017 -0500

update post-install

removed test lines of echo adn early exit

diff --git a/oam/install_scripts/post-install b/oam/install_scripts/post-install
index c09e7d5..69dfb58 100755
— a/oam/install_scripts/post-install
+++ b/oam/install_scripts/post-install
@@ -36,10 +36,6 @@ for arg in "$@"; do
echo "post-install: ignoring unknown argument: $arg" 1>&2
fi
done
-
-echo $installdir
-echo $prefix
-exit 0

if [ $user != "root" ]; then
export COLUMNSTORE_INSTALL_DIR=$installdir

MariaDB [mytest]> select cidx, CTEXT from datatypetestm;
-----------------+

cidx CTEXT

-----------------+

1 aaaaaaaaaaa

-----------------+
1 row in set (0.02 sec)

COUNT()

MariaDB [mytest]> select cidx, CTEXT, COUNT(CTEXT) from datatypetestm group by cidx, CTEXT;
-----------------------

cidx CTEXT COUNT(CTEXT)

-----------------------

1 NULL 1

-----------------------
1 row in set (0.02 sec)

MariaDB [mytest]> select cidx, CTEXT, COUNT(CLONGTEXT) from datatypetestm group by cidx, CTEXT;
---------------------------

cidx CTEXT COUNT(CLONGTEXT)

---------------------------

1 NULL 1

---------------------------
1 row in set (0.01 sec)

MIN()

MariaDB [mytest]> select MIN(CTEXT) from datatypetestm;
------------

MIN(CTEXT)

------------

NULL

------------
1 row in set (0.01 sec)

MariaDB [mytest]> select MIN(CLONGTEXT) from datatypetestm;
----------------

MIN(CLONGTEXT)

----------------

NULL

----------------
1 row in set (0.01 sec)

MAX()

MariaDB [mytest]> select MAX(CTEXT) from datatypetestm;
------------

MAX(CTEXT)

------------

NULL

------------
1 row in set (0.01 sec)

MariaDB [mytest]> select MAX(CLONGTEXT) from datatypetestm;
----------------

MAX(CLONGTEXT)

----------------

NULL

----------------
1 row in set (0.01 sec)

Same behavior when there are more than one row
Same behavior when there is only three columns in the table (int, TEXT, LONGTEXT).



 Comments   
Comment by Daniel Lee (Inactive) [ 2017-05-10 ]

It looks like the first column that reference TEXT/LONGTEXT returned NULL.

Comment by Andrew Hutchings (Inactive) [ 2017-05-11 ]

Support for aggregate TEXT/LONGTEXT was missing and just cast to NULL. Now fixed.

Comment by Daniel Lee (Inactive) [ 2017-05-11 ]

Build verified: Github source 1.1.0-1

[root@localhost mariadb-columnstore-server]# git show
commit 349cae544b6bc71910267a3b3b0fa3fb57b0a587
Merge: bd13090 2ecb85c
Author: benthompson15 <ben.thompson@mariadb.com>
Date: Thu May 4 16:06:16 2017 -0500

Merge pull request #50 from mariadb-corporation/10.2-fixes

10.2 fixes

[root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/
[root@localhost mariadb-columnstore-engine]# git show
commit b4883e6abd18fb63c4af450679c2720cdb537dad
Merge: 85a5eaa 83331f4
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Thu May 11 09:43:28 2017 -0500

Merge pull request #182 from mariadb-corporation/MCOL-712

MCOL-712 Support TEXT for GROUP BY

Test case passed:

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 503
Server version: 10.2.5-MariaDB-log Columnstore 1.1.0-1

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [mytest]> select cidx, CTEXT, COUNT(CTEXT) from datatypetestm group by cidx, CTEXT;
-----------------------------

cidx CTEXT COUNT(CTEXT)

-----------------------------

1 aaaaaaaaaaa 1

-----------------------------
1 row in set (0.05 sec)

MariaDB [mytest]> select cidx, CTEXT, COUNT(CLONGTEXT) from datatypetestm group by cidx, CTEXT;
---------------------------------

cidx CTEXT COUNT(CLONGTEXT)

---------------------------------

1 aaaaaaaaaaa 1

---------------------------------
1 row in set (0.01 sec)

MariaDB [mytest]> select MIN(CTEXT) from datatypetestm;
-------------

MIN(CTEXT)

-------------

aaaaaaaaaaa

-------------
1 row in set (0.03 sec)

MariaDB [mytest]> select MIN(CLONGTEXT) from datatypetestm;
----------------

MIN(CLONGTEXT)

----------------

aaaaaaaaaaaa

----------------
1 row in set (0.01 sec)

MariaDB [mytest]> select MAX(CLONGTEXT) from datatypetestm;
----------------

MAX(CLONGTEXT)

----------------

aaaaaaaaaaaa

----------------
1 row in set (0.01 sec)

Generated at Thu Feb 08 02:23:15 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.