manticoresoftware / columnar

Manticore Columnar Library
Apache License 2.0
82 stars 15 forks source link

to_string(a) requires a to be in the select list #21

Open sanikolaev opened 1 year ago

sanikolaev commented 1 year ago

to_string(<bool>) works only if the <bool> is in the select list too, otherwise it returns an empty value:

mysql> drop table if exists t; create table t(a bool) engine='columnar'; insert into t(id, a) values(1, 1); select to_string(a) from t; select a, to_string(a) from t;  
--------------  
drop table if exists t  
--------------  

Query OK, 0 rows affected (0.01 sec)  

--------------  
create table t(a bool) engine='columnar'  
--------------  

Query OK, 0 rows affected (0.00 sec)  

--------------  
insert into t(id, a) values(1, 1)  
--------------  

Query OK, 1 row affected (0.00 sec)  

--------------  
select to_string(a) from t  
--------------  

 --------------   
| to_string(a) |  
 --------------   
|              |  
 --------------   
1 row in set (0.00 sec)  

--------------  
select a, to_string(a) from t  
--------------  

 ------ --------------   
| a    | to_string(a) |  
 ------ --------------   
|    1 | 1            |  
 ------ --------------   
1 row in set (0.00 sec)