File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed
mysql-test/columnstore/basic Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,10 @@ class SimpleColumn : public ReturnedColumn
337337 double getDoubleVal (rowgroup::Row& row, bool & isNull) override
338338 {
339339 evaluate (row, isNull);
340+ if (isNull)
341+ {
342+ return 0 ;
343+ }
340344 return TreeNode::getDoubleVal ();
341345 }
342346
Original file line number Diff line number Diff line change 1+ DROP DATABASE IF EXISTS mcol6218;
2+ CREATE DATABASE mcol6218;
3+ USE mcol6218;
4+ CREATE TABLE person (
5+ name VARCHAR(100) NOT NULL,
6+ surname VARCHAR(100) DEFAULT NULL
7+ ) ENGINE=Columnstore
8+ DEFAULT CHARSET=utf8mb3
9+ COLLATE=utf8mb3_general_ci;
10+ INSERT INTO person (name, surname) VALUES
11+ ('Warren Baby', NULL),
12+ ('Charlie', 'Parker'),
13+ ('Oscar', 'Peterson');
14+ SELECT * FROM person WHERE surname <=> 1;
15+ name surname
16+ drop table person;
17+ DROP DATABASE mcol6218;
Original file line number Diff line number Diff line change 1+ -- source ../include/have_columnstore.inc
2+
3+ --disable_warnings
4+ DROP DATABASE IF EXISTS mcol6218;
5+ --enable_warnings
6+
7+ CREATE DATABASE mcol6218;
8+
9+ USE mcol6218;
10+
11+ CREATE TABLE person (
12+ name VARCHAR(100) NOT NULL,
13+ surname VARCHAR(100) DEFAULT NULL
14+ ) ENGINE=Columnstore
15+ DEFAULT CHARSET=utf8mb3
16+ COLLATE=utf8mb3_general_ci;
17+
18+ INSERT INTO person (name, surname) VALUES
19+ ('Warren Baby', NULL),
20+ ('Charlie', 'Parker'),
21+ ('Oscar', 'Peterson');
22+
23+ SELECT * FROM person WHERE surname <=> 1;
24+
25+ drop table person;
26+ DROP DATABASE mcol6218;
You can’t perform that action at this time.
0 commit comments