fixup partial const column

This commit is contained in:
sundy-li 2019-10-29 11:51:27 +08:00
parent 538b77c123
commit dbd3227e5a
3 changed files with 7 additions and 2 deletions

View File

@ -1328,8 +1328,9 @@ public:
}
for (const size_t & column_idx : arguments)
{
const IColumn * column = block.getByPosition(column_idx).column.get();
{
//partial const column
const IColumn * column = block.getByPosition(column_idx).column->convertToFullColumnIfConst().get();
if (!(executeNumber<UInt8>(*column, out_vec, column_idx, rows, size_per_row)
|| executeNumber<UInt16>(*column, out_vec, column_idx, rows, size_per_row)
|| executeNumber<UInt32>(*column, out_vec, column_idx, rows, size_per_row)

View File

@ -1,2 +1,5 @@
ABCDabcdefg
ABC
ABC
ACD
ADE

View File

@ -1,3 +1,4 @@
/* char function */
SELECT char(65, 66.1, 67.2, 68.3, 97.4, 98.5, 99.6, 100.7, 101.0, 102.0, 103.0);
SELECT char(65 + 256, 66 + 1024, 66 + 1024 + 1);
SELECT char(65, 66 + number, 67 + number) from numbers(3);