Fixed tests

This commit is contained in:
Maksim Kita 2022-05-16 11:43:36 +02:00
parent 0e5f13e53e
commit 6c033f340b
4 changed files with 11 additions and 10 deletions

View File

@ -222,6 +222,10 @@ struct SimpleSortCursor : SortCursorHelper<SimpleSortCursor>
bool ALWAYS_INLINE greaterAt(const SimpleSortCursor & rhs, size_t lhs_pos, size_t rhs_pos) const
{
if (unlikely(impl->sort_columns_size == 0)) {
return impl->order > rhs.impl->order;
}
const auto & desc = impl->desc[0];
int direction = desc.direction;
int nulls_direction = desc.nulls_direction;

View File

@ -74,8 +74,7 @@ void MergingSortedAlgorithm::initialize(Inputs inputs)
if (has_collation)
queue_with_collation = SortingHeap<SortCursorWithCollation>(cursors);
else
if (description.size() > 1)
else if (description.size() > 1)
queue_without_collation = SortingHeap<SortCursor>(cursors);
else
queue_simple = SortingHeap<SimpleSortCursor>(cursors);
@ -89,8 +88,7 @@ void MergingSortedAlgorithm::consume(Input & input, size_t source_num)
if (has_collation)
queue_with_collation.push(cursors[source_num]);
else
if (description.size() > 1)
else if (description.size() > 1)
queue_without_collation.push(cursors[source_num]);
else
queue_simple.push(cursors[source_num]);
@ -100,8 +98,7 @@ IMergingAlgorithm::Status MergingSortedAlgorithm::merge()
{
if (has_collation)
return mergeImpl(queue_with_collation);
else
if (description.size() > 1)
else if (description.size() > 1)
return mergeImpl(queue_without_collation);
else
return mergeImpl(queue_simple);

View File

@ -17,8 +17,8 @@
2015-01-01 ['Hello','World'] [0,0]
2015-01-01 ['Hello2','World2'] [0,0]
2015-01-01 Hello 0
2015-01-01 World 0
2015-01-01 Hello2 0
2015-01-01 World 0
2015-01-01 World2 0
2015-01-01 Hello 0
2015-01-01 Hello2 0

View File

@ -22,8 +22,8 @@ SELECT * FROM alter_00147 ARRAY JOIN n WHERE n.x LIKE '%Hello%' ORDER BY n.x;
OPTIMIZE TABLE alter_00147;
SELECT * FROM alter_00147;
SELECT * FROM alter_00147 ARRAY JOIN n;
SELECT * FROM alter_00147 ARRAY JOIN n WHERE n.x LIKE '%Hello%';
SELECT * FROM alter_00147 ORDER BY n.x;
SELECT * FROM alter_00147 ARRAY JOIN n ORDER BY n.x;
SELECT * FROM alter_00147 ARRAY JOIN n WHERE n.x LIKE '%Hello%' ORDER BY n.x;
DROP TABLE alter_00147;