Merge pull request #41511 from Algunenano/batch_nullable_assert

This commit is contained in:
Vladimir C 2022-09-20 09:21:52 +02:00 committed by GitHub
commit befc0440e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 2 deletions

View File

@ -488,9 +488,15 @@ public:
}
}
bool found_one = false;
/// We can have 0 nullable filters if we don't skip nulls
if (nullable_filters.size() == 0)
{
this->setFlag(place);
this->nested_function->addBatchSinglePlace(row_begin, row_end, this->nestedPlace(place), nested_columns, arena, -1);
return;
}
chassert(nullable_filters.size() > 0); /// We work under the assumption that we reach this because one argument was NULL
bool found_one = false;
if (nullable_filters.size() == 1)
{
/// We can avoid making copies of the only filter but we still need to check that there is data to be added

View File

@ -0,0 +1 @@
100,-9223372036854775808,nan

View File

@ -0,0 +1,24 @@
-- https://github.com/ClickHouse/ClickHouse/issues/41470
SELECT
roundBankers(100),
-9223372036854775808,
roundBankers(result.2, 256)
FROM
(
SELECT studentTTest(sample, variant) AS result
FROM
(
SELECT
toFloat64(number) % NULL AS sample,
0 AS variant
FROM system.numbers
LIMIT 1025
UNION ALL
SELECT
(toFloat64(number) % 9223372036854775807) + nan AS sample,
-9223372036854775808 AS variant
FROM system.numbers
LIMIT 1024
)
)
FORMAT CSV