-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Tuples can be used in ORDER BY but cannot be directly compared when engine is MergeTree #7176
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official release
Description
To reproduce: server 19.14.3.3 with CLI client.
2177cc704f03 :) CREATE TABLE T2( a Tuple(DateTime, Int32)) ENGINE = MergeTree() ORDER BY a;
CREATE TABLE T2
(
`a` Tuple(DateTime, Int32)
)
ENGINE = MergeTree()
ORDER BY a
Ok.
0 rows in set. Elapsed: 0.006 sec.
2177cc704f03 :) INSERT INTO T2 (a) VALUES (('2018-01-01 00:00:00', 1));
INSERT INTO T2 (a) VALUES
Ok.
1 rows in set. Elapsed: 0.003 sec.
2177cc704f03 :) SELECT * FROM T2 WHERE a < tuple(toDateTime('2019-01-01 00:00:00'), 0);
SELECT *
FROM T2
WHERE a < (toDateTime('2019-01-01 00:00:00'), 0)
Received exception from server (version 19.14.3):
Code: 169. DB::Exception: Received from localhost:9000. DB::Exception: Cannot compare std::vector<DB::Field, std::allocator<DB::Field> > with StrongTypedef<std::vector<DB::Field, std::allocator<DB::Field> >, DB::TupleTag>.
0 rows in set. Elapsed: 0.004 sec.
Interestingly enough, when engine is Memory, everything works.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official release