Fix Nullable const columns in JOIN

This commit is contained in:
vdimir 2021-08-10 10:42:56 +03:00
parent f6cabb6e08
commit 77adb509cb
No known key found for this signature in database
GPG Key ID: F57B3E10A21DBB31
3 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,7 @@
#include <Columns/ColumnLowCardinality.h>
#include <Columns/ColumnNullable.h>
#include <Columns/ColumnConst.h>
#include <DataStreams/materializeBlock.h>
@ -112,6 +113,8 @@ void convertColumnToNullable(ColumnWithTypeAndName & column)
if (!column.column)
return;
column.column = column.column->convertToFullColumnIfConst();
if (column.column->lowCardinality())
{
/// Convert nested to nullable, not LowCardinality itself

View File

@ -0,0 +1 @@
1 2 3 1 3

View File

@ -0,0 +1 @@
SELECT *, d.* FROM ( SELECT 1 AS id, 2 AS value ) a SEMI LEFT JOIN ( SELECT 1 AS id, 3 AS values ) AS d USING id SETTINGS join_use_nulls=1;