mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-19 04:42:37 +00:00
Make query results deterministic in test
This commit is contained in:
parent
892eddbc73
commit
c3bc7fd64b
@ -51,25 +51,25 @@ FROM default.x AS __table1
|
|||||||
WHERE __table1.A AND (__table1.B OR __table1.C)
|
WHERE __table1.A AND (__table1.B OR __table1.C)
|
||||||
SETTINGS optimize_extract_common_expressions = 1
|
SETTINGS optimize_extract_common_expressions = 1
|
||||||
-9137658153367139416 1 1 1 0 0 0
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
5551918026146320404 1 1 1 0 0 0
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
-2996395377931803345 1 1 1 0 0 0
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
5025358099778248663 1 1 1 0 0 0
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
9185779160712471769 1 1 1 0 0 0
|
-8816638533025328863 1 1 1 0 1 1
|
||||||
95474718890257185 1 1 1 0 0 0
|
-8778069835572290074 1 1 1 1 1 1
|
||||||
2248520110901842660 1 1 1 0 0 0
|
-8751975391509985483 1 1 1 0 1 1
|
||||||
4269743235373690057 1 1 1 0 0 0
|
-8699036683208290351 1 1 1 0 0 1
|
||||||
-3254171257796361610 1 1 1 0 0 0
|
-8647725213825146240 1 1 1 1 0 1
|
||||||
-2057347811709491782 1 1 1 0 0 0
|
-8525570993468372516 1 1 1 1 1 0
|
||||||
-9137658153367139416 1 1 1 0 0 0
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
5551918026146320404 1 1 1 0 0 0
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
-2996395377931803345 1 1 1 0 0 0
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
5025358099778248663 1 1 1 0 0 0
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
9185779160712471769 1 1 1 0 0 0
|
-8816638533025328863 1 1 1 0 1 1
|
||||||
95474718890257185 1 1 1 0 0 0
|
-8778069835572290074 1 1 1 1 1 1
|
||||||
2248520110901842660 1 1 1 0 0 0
|
-8751975391509985483 1 1 1 0 1 1
|
||||||
4269743235373690057 1 1 1 0 0 0
|
-8699036683208290351 1 1 1 0 0 1
|
||||||
-3254171257796361610 1 1 1 0 0 0
|
-8647725213825146240 1 1 1 1 0 1
|
||||||
-2057347811709491782 1 1 1 0 0 0
|
-8525570993468372516 1 1 1 1 1 0
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
@ -89,26 +89,26 @@ QUERY id: 0
|
|||||||
SELECT count() AS `count()`
|
SELECT count() AS `count()`
|
||||||
FROM default.x AS __table1
|
FROM default.x AS __table1
|
||||||
WHERE __table1.A AND __table1.B AND __table1.C
|
WHERE __table1.A AND __table1.B AND __table1.C
|
||||||
-1718308154946016060 1 1 1 0 0 1
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
-909098580002376266 1 1 1 0 0 1
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
-3361624987358969173 1 1 1 0 0 1
|
-8816638533025328863 1 1 1 0 1 1
|
||||||
-3655654558316512012 1 1 1 0 0 1
|
-8778069835572290074 1 1 1 1 1 1
|
||||||
|
-8751975391509985483 1 1 1 0 1 1
|
||||||
-8699036683208290351 1 1 1 0 0 1
|
-8699036683208290351 1 1 1 0 0 1
|
||||||
4783429523421833175 1 1 1 0 0 1
|
-8647725213825146240 1 1 1 1 0 1
|
||||||
7828110511858076458 1 1 1 0 0 1
|
-8525570993468372516 1 1 1 1 1 0
|
||||||
-1265166225143531838 1 1 1 0 0 1
|
-8476148063717219538 1 1 1 1 1 1
|
||||||
-7556142413115723841 1 1 1 0 0 1
|
-8387418414841552371 1 1 1 1 0 1
|
||||||
7754782253328504134 1 1 1 0 0 1
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
-1718308154946016060 1 1 1 0 0 1
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
-909098580002376266 1 1 1 0 0 1
|
-8816638533025328863 1 1 1 0 1 1
|
||||||
-3361624987358969173 1 1 1 0 0 1
|
-8778069835572290074 1 1 1 1 1 1
|
||||||
-3655654558316512012 1 1 1 0 0 1
|
-8751975391509985483 1 1 1 0 1 1
|
||||||
-8699036683208290351 1 1 1 0 0 1
|
-8699036683208290351 1 1 1 0 0 1
|
||||||
4783429523421833175 1 1 1 0 0 1
|
-8647725213825146240 1 1 1 1 0 1
|
||||||
7828110511858076458 1 1 1 0 0 1
|
-8525570993468372516 1 1 1 1 1 0
|
||||||
-1265166225143531838 1 1 1 0 0 1
|
-8476148063717219538 1 1 1 1 1 1
|
||||||
-7556142413115723841 1 1 1 0 0 1
|
-8387418414841552371 1 1 1 1 0 1
|
||||||
7754782253328504134 1 1 1 0 0 1
|
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
@ -133,26 +133,26 @@ QUERY id: 0
|
|||||||
SELECT count() AS `count()`
|
SELECT count() AS `count()`
|
||||||
FROM default.x AS __table1
|
FROM default.x AS __table1
|
||||||
WHERE __table1.A AND (__table1.E OR __table1.F) AND __table1.B AND __table1.C
|
WHERE __table1.A AND (__table1.E OR __table1.F) AND __table1.B AND __table1.C
|
||||||
-1718308154946016060 1 1 1 0 0 1
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
-909098580002376266 1 1 1 0 0 1
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
-3361624987358969173 1 1 1 0 0 1
|
-8816638533025328863 1 1 1 0 1 1
|
||||||
-3655654558316512012 1 1 1 0 0 1
|
-8778069835572290074 1 1 1 1 1 1
|
||||||
|
-8751975391509985483 1 1 1 0 1 1
|
||||||
-8699036683208290351 1 1 1 0 0 1
|
-8699036683208290351 1 1 1 0 0 1
|
||||||
4783429523421833175 1 1 1 0 0 1
|
-8647725213825146240 1 1 1 1 0 1
|
||||||
7828110511858076458 1 1 1 0 0 1
|
-8525570993468372516 1 1 1 1 1 0
|
||||||
-1265166225143531838 1 1 1 0 0 1
|
-8476148063717219538 1 1 1 1 1 1
|
||||||
-7556142413115723841 1 1 1 0 0 1
|
-8387418414841552371 1 1 1 1 0 1
|
||||||
7754782253328504134 1 1 1 0 0 1
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
-1718308154946016060 1 1 1 0 0 1
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
-909098580002376266 1 1 1 0 0 1
|
-8816638533025328863 1 1 1 0 1 1
|
||||||
-3361624987358969173 1 1 1 0 0 1
|
-8778069835572290074 1 1 1 1 1 1
|
||||||
-3655654558316512012 1 1 1 0 0 1
|
-8751975391509985483 1 1 1 0 1 1
|
||||||
-8699036683208290351 1 1 1 0 0 1
|
-8699036683208290351 1 1 1 0 0 1
|
||||||
4783429523421833175 1 1 1 0 0 1
|
-8647725213825146240 1 1 1 1 0 1
|
||||||
7828110511858076458 1 1 1 0 0 1
|
-8525570993468372516 1 1 1 1 1 0
|
||||||
-1265166225143531838 1 1 1 0 0 1
|
-8476148063717219538 1 1 1 1 1 1
|
||||||
-7556142413115723841 1 1 1 0 0 1
|
-8387418414841552371 1 1 1 1 0 1
|
||||||
7754782253328504134 1 1 1 0 0 1
|
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
@ -177,26 +177,26 @@ QUERY id: 0
|
|||||||
SELECT count() AS `count()`
|
SELECT count() AS `count()`
|
||||||
FROM default.x AS __table1
|
FROM default.x AS __table1
|
||||||
WHERE __table1.A AND (__table1.E OR __table1.F) AND __table1.B AND __table1.C
|
WHERE __table1.A AND (__table1.E OR __table1.F) AND __table1.B AND __table1.C
|
||||||
3574384104825527969 1 1 0 0 1 0
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
-2211493827666596761 1 1 0 0 1 0
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
8958830522204821629 1 1 0 0 1 0
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
1346739481280160211 1 1 0 0 1 0
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
3279338559385463408 1 1 0 0 1 0
|
-9001504240784412840 1 1 0 0 1 1
|
||||||
3312987885102520931 1 1 0 0 1 0
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
1164803530066053002 1 1 0 0 1 0
|
-8816638533025328863 1 1 1 0 1 1
|
||||||
-5278928290423082776 1 1 0 0 1 0
|
-8778069835572290074 1 1 1 1 1 1
|
||||||
8491129310781185476 1 1 0 0 1 0
|
-8757579268243194545 1 1 0 1 0 0
|
||||||
-7239011331174116716 1 1 0 0 1 0
|
-8753962234239378281 1 1 0 1 0 0
|
||||||
3574384104825527969 1 1 0 0 1 0
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
-2211493827666596761 1 1 0 0 1 0
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
8958830522204821629 1 1 0 0 1 0
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
1346739481280160211 1 1 0 0 1 0
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
3279338559385463408 1 1 0 0 1 0
|
-9001504240784412840 1 1 0 0 1 1
|
||||||
3312987885102520931 1 1 0 0 1 0
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
1164803530066053002 1 1 0 0 1 0
|
-8816638533025328863 1 1 1 0 1 1
|
||||||
-5278928290423082776 1 1 0 0 1 0
|
-8778069835572290074 1 1 1 1 1 1
|
||||||
8491129310781185476 1 1 0 0 1 0
|
-8757579268243194545 1 1 0 1 0 0
|
||||||
-7239011331174116716 1 1 0 0 1 0
|
-8753962234239378281 1 1 0 1 0 0
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
@ -221,26 +221,26 @@ QUERY id: 0
|
|||||||
SELECT count() AS `count()`
|
SELECT count() AS `count()`
|
||||||
FROM default.x AS __table1
|
FROM default.x AS __table1
|
||||||
WHERE __table1.A AND (__table1.C OR __table1.D OR __table1.E) AND __table1.B
|
WHERE __table1.A AND (__table1.C OR __table1.D OR __table1.E) AND __table1.B
|
||||||
3574384104825527969 1 1 0 0 1 0
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
-2211493827666596761 1 1 0 0 1 0
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
8958830522204821629 1 1 0 0 1 0
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
1346739481280160211 1 1 0 0 1 0
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
3279338559385463408 1 1 0 0 1 0
|
-9001504240784412840 1 1 0 0 1 1
|
||||||
3312987885102520931 1 1 0 0 1 0
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
1164803530066053002 1 1 0 0 1 0
|
-8816638533025328863 1 1 1 0 1 1
|
||||||
-5278928290423082776 1 1 0 0 1 0
|
-8778069835572290074 1 1 1 1 1 1
|
||||||
8491129310781185476 1 1 0 0 1 0
|
-8757579268243194545 1 1 0 1 0 0
|
||||||
-7239011331174116716 1 1 0 0 1 0
|
-8753962234239378281 1 1 0 1 0 0
|
||||||
3574384104825527969 1 1 0 0 1 0
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
-2211493827666596761 1 1 0 0 1 0
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
8958830522204821629 1 1 0 0 1 0
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
1346739481280160211 1 1 0 0 1 0
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
3279338559385463408 1 1 0 0 1 0
|
-9001504240784412840 1 1 0 0 1 1
|
||||||
3312987885102520931 1 1 0 0 1 0
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
1164803530066053002 1 1 0 0 1 0
|
-8816638533025328863 1 1 1 0 1 1
|
||||||
-5278928290423082776 1 1 0 0 1 0
|
-8778069835572290074 1 1 1 1 1 1
|
||||||
8491129310781185476 1 1 0 0 1 0
|
-8757579268243194545 1 1 0 1 0 0
|
||||||
-7239011331174116716 1 1 0 0 1 0
|
-8753962234239378281 1 1 0 1 0 0
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
@ -265,26 +265,26 @@ QUERY id: 0
|
|||||||
SELECT count() AS `count()`
|
SELECT count() AS `count()`
|
||||||
FROM default.x AS __table1
|
FROM default.x AS __table1
|
||||||
WHERE __table1.A AND (__table1.C OR __table1.D OR __table1.E) AND __table1.B
|
WHERE __table1.A AND (__table1.C OR __table1.D OR __table1.E) AND __table1.B
|
||||||
910439267853176941 0 1 1 0 0 0
|
-9217261049539683905 0 1 1 0 1 1
|
||||||
-835764896252397456 0 1 1 0 0 0
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
36802202306659819 0 1 1 0 0 0
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
-21405676422526023 0 1 1 0 0 0
|
-9128210600225023826 0 1 1 0 1 1
|
||||||
-186684117184539357 0 1 1 0 0 0
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
2294399721801435121 0 1 1 0 0 0
|
-9092546166635132947 0 1 1 1 1 0
|
||||||
271677944114046880 0 1 1 0 0 0
|
-9027896542766292056 0 1 1 1 0 1
|
||||||
-4341212657373873318 0 1 1 0 0 0
|
-9016286694578688546 0 1 1 1 0 1
|
||||||
-4556789282933643330 0 1 1 0 0 0
|
-9007101892394668722 0 1 1 0 0 1
|
||||||
4042734258081112561 0 1 1 0 0 0
|
-8971956622356473539 0 1 1 1 0 1
|
||||||
910439267853176941 0 1 1 0 0 0
|
-9217261049539683905 0 1 1 0 1 1
|
||||||
-835764896252397456 0 1 1 0 0 0
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
36802202306659819 0 1 1 0 0 0
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
-21405676422526023 0 1 1 0 0 0
|
-9128210600225023826 0 1 1 0 1 1
|
||||||
-186684117184539357 0 1 1 0 0 0
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
2294399721801435121 0 1 1 0 0 0
|
-9092546166635132947 0 1 1 1 1 0
|
||||||
271677944114046880 0 1 1 0 0 0
|
-9027896542766292056 0 1 1 1 0 1
|
||||||
-4341212657373873318 0 1 1 0 0 0
|
-9016286694578688546 0 1 1 1 0 1
|
||||||
-4556789282933643330 0 1 1 0 0 0
|
-9007101892394668722 0 1 1 0 0 1
|
||||||
4042734258081112561 0 1 1 0 0 0
|
-8971956622356473539 0 1 1 1 0 1
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
@ -303,26 +303,26 @@ QUERY id: 0
|
|||||||
SELECT count() AS `count()`
|
SELECT count() AS `count()`
|
||||||
FROM default.x AS __table1
|
FROM default.x AS __table1
|
||||||
WHERE __table1.B AND __table1.C
|
WHERE __table1.B AND __table1.C
|
||||||
5604528747227576251 0 1 1 0 0 1
|
-9217261049539683905 0 1 1 0 1 1
|
||||||
-3227180127647371250 0 1 1 0 0 1
|
-9128210600225023826 0 1 1 0 1 1
|
||||||
-3777435661756238740 0 1 1 0 0 1
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
-4105312414544198416 0 1 1 0 0 1
|
-9092546166635132947 0 1 1 1 1 0
|
||||||
3624151743867502404 0 1 1 0 0 1
|
-9027896542766292056 0 1 1 1 0 1
|
||||||
4327451746496881795 0 1 1 0 0 1
|
-9016286694578688546 0 1 1 1 0 1
|
||||||
-7076772903747348221 0 1 1 0 0 1
|
-9007101892394668722 0 1 1 0 0 1
|
||||||
520798717162063931 0 1 1 0 0 1
|
-8971956622356473539 0 1 1 1 0 1
|
||||||
-8449852538623664136 0 1 1 0 0 1
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
1104848393205607021 0 1 1 0 0 1
|
-8884339606857089357 0 1 1 0 1 1
|
||||||
5604528747227576251 0 1 1 0 0 1
|
-9217261049539683905 0 1 1 0 1 1
|
||||||
-3227180127647371250 0 1 1 0 0 1
|
-9128210600225023826 0 1 1 0 1 1
|
||||||
-3777435661756238740 0 1 1 0 0 1
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
-4105312414544198416 0 1 1 0 0 1
|
-9092546166635132947 0 1 1 1 1 0
|
||||||
3624151743867502404 0 1 1 0 0 1
|
-9027896542766292056 0 1 1 1 0 1
|
||||||
4327451746496881795 0 1 1 0 0 1
|
-9016286694578688546 0 1 1 1 0 1
|
||||||
-7076772903747348221 0 1 1 0 0 1
|
-9007101892394668722 0 1 1 0 0 1
|
||||||
520798717162063931 0 1 1 0 0 1
|
-8971956622356473539 0 1 1 1 0 1
|
||||||
-8449852538623664136 0 1 1 0 0 1
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
1104848393205607021 0 1 1 0 0 1
|
-8884339606857089357 0 1 1 0 1 1
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
@ -346,26 +346,26 @@ QUERY id: 0
|
|||||||
SELECT count() AS `count()`
|
SELECT count() AS `count()`
|
||||||
FROM default.x AS __table1
|
FROM default.x AS __table1
|
||||||
WHERE __table1.B AND __table1.C AND (__table1.E OR __table1.F)
|
WHERE __table1.B AND __table1.C AND (__table1.E OR __table1.F)
|
||||||
5604528747227576251 0 1 1 0 0 1
|
-9217261049539683905 0 1 1 0 1 1
|
||||||
-3227180127647371250 0 1 1 0 0 1
|
-9128210600225023826 0 1 1 0 1 1
|
||||||
-3777435661756238740 0 1 1 0 0 1
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
-4105312414544198416 0 1 1 0 0 1
|
-9092546166635132947 0 1 1 1 1 0
|
||||||
3624151743867502404 0 1 1 0 0 1
|
-9027896542766292056 0 1 1 1 0 1
|
||||||
4327451746496881795 0 1 1 0 0 1
|
-9016286694578688546 0 1 1 1 0 1
|
||||||
-7076772903747348221 0 1 1 0 0 1
|
-9007101892394668722 0 1 1 0 0 1
|
||||||
520798717162063931 0 1 1 0 0 1
|
-8971956622356473539 0 1 1 1 0 1
|
||||||
-8449852538623664136 0 1 1 0 0 1
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
1104848393205607021 0 1 1 0 0 1
|
-8884339606857089357 0 1 1 0 1 1
|
||||||
5604528747227576251 0 1 1 0 0 1
|
-9217261049539683905 0 1 1 0 1 1
|
||||||
-3227180127647371250 0 1 1 0 0 1
|
-9128210600225023826 0 1 1 0 1 1
|
||||||
-3777435661756238740 0 1 1 0 0 1
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
-4105312414544198416 0 1 1 0 0 1
|
-9092546166635132947 0 1 1 1 1 0
|
||||||
3624151743867502404 0 1 1 0 0 1
|
-9027896542766292056 0 1 1 1 0 1
|
||||||
4327451746496881795 0 1 1 0 0 1
|
-9016286694578688546 0 1 1 1 0 1
|
||||||
-7076772903747348221 0 1 1 0 0 1
|
-9007101892394668722 0 1 1 0 0 1
|
||||||
520798717162063931 0 1 1 0 0 1
|
-8971956622356473539 0 1 1 1 0 1
|
||||||
-8449852538623664136 0 1 1 0 0 1
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
1104848393205607021 0 1 1 0 0 1
|
-8884339606857089357 0 1 1 0 1 1
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
@ -389,26 +389,26 @@ QUERY id: 0
|
|||||||
SELECT count() AS `count()`
|
SELECT count() AS `count()`
|
||||||
FROM default.x AS __table1
|
FROM default.x AS __table1
|
||||||
WHERE __table1.B AND __table1.C AND (__table1.E OR __table1.F)
|
WHERE __table1.B AND __table1.C AND (__table1.E OR __table1.F)
|
||||||
-761481560319605917 0 1 0 0 1 0
|
-9217261049539683905 0 1 1 0 1 1
|
||||||
-5533222425689494786 0 1 0 0 1 0
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
989832766219156063 0 1 0 0 1 0
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
-3972983892221867704 0 1 0 0 1 0
|
-9128210600225023826 0 1 1 0 1 1
|
||||||
-8548855706734087530 0 1 0 0 1 0
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
5284071364923999442 0 1 0 0 1 0
|
-9120901636510510987 0 1 0 1 0 0
|
||||||
5223032192244036365 0 1 0 0 1 0
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
8288659361821935470 0 1 0 0 1 0
|
-9092546166635132947 0 1 1 1 1 0
|
||||||
3669979250564809316 0 1 0 0 1 0
|
-9034436041280906643 0 1 0 1 0 0
|
||||||
-3068712899003736471 0 1 0 0 1 0
|
-9032227688076112856 0 1 0 1 0 0
|
||||||
-761481560319605917 0 1 0 0 1 0
|
-9217261049539683905 0 1 1 0 1 1
|
||||||
-5533222425689494786 0 1 0 0 1 0
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
989832766219156063 0 1 0 0 1 0
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
-3972983892221867704 0 1 0 0 1 0
|
-9128210600225023826 0 1 1 0 1 1
|
||||||
-8548855706734087530 0 1 0 0 1 0
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
5284071364923999442 0 1 0 0 1 0
|
-9120901636510510987 0 1 0 1 0 0
|
||||||
5223032192244036365 0 1 0 0 1 0
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
8288659361821935470 0 1 0 0 1 0
|
-9092546166635132947 0 1 1 1 1 0
|
||||||
3669979250564809316 0 1 0 0 1 0
|
-9034436041280906643 0 1 0 1 0 0
|
||||||
-3068712899003736471 0 1 0 0 1 0
|
-9032227688076112856 0 1 0 1 0 0
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
@ -432,26 +432,26 @@ QUERY id: 0
|
|||||||
SELECT count() AS `count()`
|
SELECT count() AS `count()`
|
||||||
FROM default.x AS __table1
|
FROM default.x AS __table1
|
||||||
WHERE __table1.B AND (__table1.C OR __table1.D OR __table1.E)
|
WHERE __table1.B AND (__table1.C OR __table1.D OR __table1.E)
|
||||||
-761481560319605917 0 1 0 0 1 0
|
-9217261049539683905 0 1 1 0 1 1
|
||||||
-5533222425689494786 0 1 0 0 1 0
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
989832766219156063 0 1 0 0 1 0
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
-3972983892221867704 0 1 0 0 1 0
|
-9128210600225023826 0 1 1 0 1 1
|
||||||
-8548855706734087530 0 1 0 0 1 0
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
5284071364923999442 0 1 0 0 1 0
|
-9120901636510510987 0 1 0 1 0 0
|
||||||
5223032192244036365 0 1 0 0 1 0
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
8288659361821935470 0 1 0 0 1 0
|
-9092546166635132947 0 1 1 1 1 0
|
||||||
3669979250564809316 0 1 0 0 1 0
|
-9034436041280906643 0 1 0 1 0 0
|
||||||
-3068712899003736471 0 1 0 0 1 0
|
-9032227688076112856 0 1 0 1 0 0
|
||||||
-761481560319605917 0 1 0 0 1 0
|
-9217261049539683905 0 1 1 0 1 1
|
||||||
-5533222425689494786 0 1 0 0 1 0
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
989832766219156063 0 1 0 0 1 0
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
-3972983892221867704 0 1 0 0 1 0
|
-9128210600225023826 0 1 1 0 1 1
|
||||||
-8548855706734087530 0 1 0 0 1 0
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
5284071364923999442 0 1 0 0 1 0
|
-9120901636510510987 0 1 0 1 0 0
|
||||||
5223032192244036365 0 1 0 0 1 0
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
8288659361821935470 0 1 0 0 1 0
|
-9092546166635132947 0 1 1 1 1 0
|
||||||
3669979250564809316 0 1 0 0 1 0
|
-9034436041280906643 0 1 0 1 0 0
|
||||||
-3068712899003736471 0 1 0 0 1 0
|
-9032227688076112856 0 1 0 1 0 0
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
@ -475,26 +475,26 @@ QUERY id: 0
|
|||||||
SELECT count() AS `count()`
|
SELECT count() AS `count()`
|
||||||
FROM default.x AS __table1
|
FROM default.x AS __table1
|
||||||
WHERE __table1.B AND (__table1.C OR __table1.D OR __table1.E)
|
WHERE __table1.B AND (__table1.C OR __table1.D OR __table1.E)
|
||||||
-608986750099316624 0 1 0 0 0 0
|
-9220160771238933596 1 0 0 0 1 1
|
||||||
4634030441303755773 0 1 0 0 0 0
|
-9154303869107404275 1 0 1 1 1 1
|
||||||
1594908885273767697 0 1 0 0 0 0
|
-9154240572955605594 1 0 0 0 0 1
|
||||||
4525560033677464079 0 1 0 0 0 0
|
-9136706315507142110 1 0 0 0 1 0
|
||||||
2306683870575600851 0 1 0 0 0 0
|
-9136188450553078231 0 1 0 0 0 1
|
||||||
-4812729937086184087 0 1 0 0 0 0
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
-8185772668638940850 0 1 0 0 0 0
|
-9119049435533988608 1 0 0 0 1 1
|
||||||
-8315367594051711131 0 1 0 0 0 0
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
5705028529783052191 0 1 0 0 0 0
|
-9092546166635132947 0 1 1 1 1 0
|
||||||
-8545685458500363239 0 1 0 0 0 0
|
-9054835338197246193 1 0 0 0 1 0
|
||||||
-608986750099316624 0 1 0 0 0 0
|
-9220160771238933596 1 0 0 0 1 1
|
||||||
4634030441303755773 0 1 0 0 0 0
|
-9154303869107404275 1 0 1 1 1 1
|
||||||
1594908885273767697 0 1 0 0 0 0
|
-9154240572955605594 1 0 0 0 0 1
|
||||||
4525560033677464079 0 1 0 0 0 0
|
-9136706315507142110 1 0 0 0 1 0
|
||||||
2306683870575600851 0 1 0 0 0 0
|
-9136188450553078231 0 1 0 0 0 1
|
||||||
-4812729937086184087 0 1 0 0 0 0
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
-8185772668638940850 0 1 0 0 0 0
|
-9119049435533988608 1 0 0 0 1 1
|
||||||
-8315367594051711131 0 1 0 0 0 0
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
5705028529783052191 0 1 0 0 0 0
|
-9092546166635132947 0 1 1 1 1 0
|
||||||
-8545685458500363239 0 1 0 0 0 0
|
-9054835338197246193 1 0 0 0 1 0
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
@ -527,26 +527,26 @@ QUERY id: 0
|
|||||||
SELECT count() AS `count()`
|
SELECT count() AS `count()`
|
||||||
FROM default.x AS __table1
|
FROM default.x AS __table1
|
||||||
WHERE (sipHash64(__table1.C) = sipHash64(__table1.D)) AND (__table1.A OR __table1.B)
|
WHERE (sipHash64(__table1.C) = sipHash64(__table1.D)) AND (__table1.A OR __table1.B)
|
||||||
7762400598731351030 0 0 0 0 1 1
|
-9220160771238933596 1 0 0 0 1 1
|
||||||
4383923020933692842 0 0 0 0 1 1
|
-9217261049539683905 0 1 1 0 1 1
|
||||||
-8485383028044727808 0 0 0 0 1 1
|
-9154303869107404275 1 0 1 1 1 1
|
||||||
-8417770467973836608 0 0 0 0 1 1
|
-9146648809962620241 0 0 1 1 1 1
|
||||||
2299883611232961048 0 0 0 0 1 1
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
1390628346580495568 0 0 0 0 1 1
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
9080544688861627695 0 0 0 0 1 1
|
-9128210600225023826 0 1 1 0 1 1
|
||||||
-7721736184933939401 0 0 0 0 1 1
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
4299643423346067577 0 0 0 0 1 1
|
-9119049435533988608 1 0 0 0 1 1
|
||||||
-4360831390913279988 0 0 0 0 1 1
|
-9118603327247981370 0 0 1 1 0 1
|
||||||
7762400598731351030 0 0 0 0 1 1
|
-9220160771238933596 1 0 0 0 1 1
|
||||||
4383923020933692842 0 0 0 0 1 1
|
-9217261049539683905 0 1 1 0 1 1
|
||||||
-8485383028044727808 0 0 0 0 1 1
|
-9154303869107404275 1 0 1 1 1 1
|
||||||
-8417770467973836608 0 0 0 0 1 1
|
-9146648809962620241 0 0 1 1 1 1
|
||||||
2299883611232961048 0 0 0 0 1 1
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
1390628346580495568 0 0 0 0 1 1
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
9080544688861627695 0 0 0 0 1 1
|
-9128210600225023826 0 1 1 0 1 1
|
||||||
-7721736184933939401 0 0 0 0 1 1
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
4299643423346067577 0 0 0 0 1 1
|
-9119049435533988608 1 0 0 0 1 1
|
||||||
-4360831390913279988 0 0 0 0 1 1
|
-9118603327247981370 0 0 1 1 0 1
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
@ -581,26 +581,26 @@ QUERY id: 0
|
|||||||
SELECT count() AS `count()`
|
SELECT count() AS `count()`
|
||||||
FROM default.x AS __table1
|
FROM default.x AS __table1
|
||||||
WHERE (__table1.A AND __table1.B) OR ((__table1.C AND __table1.D) OR (__table1.E AND __table1.F))
|
WHERE (__table1.A AND __table1.B) OR ((__table1.C AND __table1.D) OR (__table1.E AND __table1.F))
|
||||||
2061801445197034299 0 0 0 0 1 1
|
-9220160771238933596 1 0 0 0 1 1
|
||||||
-4692710336366551784 0 0 0 0 1 1
|
-9217261049539683905 0 1 1 0 1 1
|
||||||
8827599087436950777 0 0 0 0 1 1
|
-9154303869107404275 1 0 1 1 1 1
|
||||||
-882303417518114752 0 0 0 0 1 1
|
-9146648809962620241 0 0 1 1 1 1
|
||||||
3625807179116440482 0 0 0 0 1 1
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
-8417770467973836608 0 0 0 0 1 1
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
2813303165430768949 0 0 0 0 1 1
|
-9128210600225023826 0 1 1 0 1 1
|
||||||
-8353024809925920489 0 0 0 0 1 1
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
-6723016927829163686 0 0 0 0 1 1
|
-9120901636510510987 0 1 0 1 0 0
|
||||||
2766695568743886462 0 0 0 0 1 1
|
-9119049435533988608 1 0 0 0 1 1
|
||||||
2061801445197034299 0 0 0 0 1 1
|
-9220160771238933596 1 0 0 0 1 1
|
||||||
-4692710336366551784 0 0 0 0 1 1
|
-9217261049539683905 0 1 1 0 1 1
|
||||||
8827599087436950777 0 0 0 0 1 1
|
-9154303869107404275 1 0 1 1 1 1
|
||||||
-882303417518114752 0 0 0 0 1 1
|
-9146648809962620241 0 0 1 1 1 1
|
||||||
3625807179116440482 0 0 0 0 1 1
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
-8417770467973836608 0 0 0 0 1 1
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
2813303165430768949 0 0 0 0 1 1
|
-9128210600225023826 0 1 1 0 1 1
|
||||||
-8353024809925920489 0 0 0 0 1 1
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
-6723016927829163686 0 0 0 0 1 1
|
-9120901636510510987 0 1 0 1 0 0
|
||||||
2766695568743886462 0 0 0 0 1 1
|
-9119049435533988608 1 0 0 0 1 1
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
@ -635,26 +635,26 @@ QUERY id: 0
|
|||||||
SELECT count() AS `count()`
|
SELECT count() AS `count()`
|
||||||
FROM default.x AS __table1
|
FROM default.x AS __table1
|
||||||
WHERE (__table1.A AND __table1.B) OR ((__table1.B AND __table1.D) OR (__table1.E AND __table1.F))
|
WHERE (__table1.A AND __table1.B) OR ((__table1.B AND __table1.D) OR (__table1.E AND __table1.F))
|
||||||
-5591479919192876859 1 1 0 0 0 1
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
2342517051443094765 1 1 0 0 0 1
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
-3440223316648760770 1 1 0 0 0 1
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
-4242513015859548468 1 1 0 0 0 1
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
-730351741811412687 1 1 0 0 0 1
|
-9001504240784412840 1 1 0 0 1 1
|
||||||
-2389210960120872170 1 1 0 0 0 1
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
-4292066734783786923 1 1 0 0 0 1
|
-8816638533025328863 1 1 1 0 1 1
|
||||||
-4414169073687495257 1 1 0 0 0 1
|
-8778069835572290074 1 1 1 1 1 1
|
||||||
-6222496616288459687 1 1 0 0 0 1
|
-8751975391509985483 1 1 1 0 1 1
|
||||||
-506440052941725006 1 1 0 0 0 1
|
-8699036683208290351 1 1 1 0 0 1
|
||||||
-5591479919192876859 1 1 0 0 0 1
|
-9137658153367139416 1 1 1 0 0 0
|
||||||
2342517051443094765 1 1 0 0 0 1
|
-9137309194079040284 1 1 1 0 0 0
|
||||||
-3440223316648760770 1 1 0 0 0 1
|
-9121738304623869295 1 1 0 0 1 0
|
||||||
-4242513015859548468 1 1 0 0 0 1
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
-730351741811412687 1 1 0 0 0 1
|
-9001504240784412840 1 1 0 0 1 1
|
||||||
-2389210960120872170 1 1 0 0 0 1
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
-4292066734783786923 1 1 0 0 0 1
|
-8816638533025328863 1 1 1 0 1 1
|
||||||
-4414169073687495257 1 1 0 0 0 1
|
-8778069835572290074 1 1 1 1 1 1
|
||||||
-6222496616288459687 1 1 0 0 0 1
|
-8751975391509985483 1 1 1 0 1 1
|
||||||
-506440052941725006 1 1 0 0 0 1
|
-8699036683208290351 1 1 1 0 0 1
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
@ -687,26 +687,26 @@ QUERY id: 0
|
|||||||
SELECT count() AS `count()`
|
SELECT count() AS `count()`
|
||||||
FROM default.x AS __table1
|
FROM default.x AS __table1
|
||||||
WHERE __table1.A AND __table1.B AND (__table1.C OR (__table1.E AND __table1.E) OR (__table1.F AND __table1.F))
|
WHERE __table1.A AND __table1.B AND (__table1.C OR (__table1.E AND __table1.E) OR (__table1.F AND __table1.F))
|
||||||
-1198014781329290529 1 1 0 1 0 1
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
3804289730569409059 1 1 0 1 0 1
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
388942571848780949 1 1 0 1 0 1
|
-8816638533025328863 1 1 1 0 1 1
|
||||||
4303421928547547327 1 1 0 1 0 1
|
-8778069835572290074 1 1 1 1 1 1
|
||||||
5622057975514104466 1 1 0 1 0 1
|
-8751975391509985483 1 1 1 0 1 1
|
||||||
6003991070199658801 1 1 0 1 0 1
|
-8699036683208290351 1 1 1 0 0 1
|
||||||
6156030380809776164 1 1 0 1 0 1
|
-8647725213825146240 1 1 1 1 0 1
|
||||||
2991799832496995739 1 1 0 1 0 1
|
|
||||||
3699238018341750080 1 1 0 1 0 1
|
|
||||||
-8569013057605390975 1 1 0 1 0 1
|
-8569013057605390975 1 1 0 1 0 1
|
||||||
-1198014781329290529 1 1 0 1 0 1
|
-8548886235737406452 1 1 0 1 0 1
|
||||||
3804289730569409059 1 1 0 1 0 1
|
-8525570993468372516 1 1 1 1 1 0
|
||||||
388942571848780949 1 1 0 1 0 1
|
-9114056182077943575 1 1 1 1 0 1
|
||||||
4303421928547547327 1 1 0 1 0 1
|
-8941493636296671386 1 1 1 1 1 1
|
||||||
5622057975514104466 1 1 0 1 0 1
|
-8816638533025328863 1 1 1 0 1 1
|
||||||
6003991070199658801 1 1 0 1 0 1
|
-8778069835572290074 1 1 1 1 1 1
|
||||||
6156030380809776164 1 1 0 1 0 1
|
-8751975391509985483 1 1 1 0 1 1
|
||||||
2991799832496995739 1 1 0 1 0 1
|
-8699036683208290351 1 1 1 0 0 1
|
||||||
3699238018341750080 1 1 0 1 0 1
|
-8647725213825146240 1 1 1 1 0 1
|
||||||
-8569013057605390975 1 1 0 1 0 1
|
-8569013057605390975 1 1 0 1 0 1
|
||||||
|
-8548886235737406452 1 1 0 1 0 1
|
||||||
|
-8525570993468372516 1 1 1 1 1 0
|
||||||
QUERY id: 0
|
QUERY id: 0
|
||||||
PROJECTION COLUMNS
|
PROJECTION COLUMNS
|
||||||
count() UInt64
|
count() UInt64
|
||||||
|
@ -19,68 +19,68 @@ EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE (A AND B) OR (A AND
|
|||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE (A AND B) OR (A AND C) SETTINGS optimize_extract_common_expressions = 1;
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE (A AND B) OR (A AND C) SETTINGS optimize_extract_common_expressions = 1;
|
||||||
|
|
||||||
-- Test multiple cases
|
-- Test multiple cases
|
||||||
SELECT * FROM x WHERE A AND ((B AND C) OR (B AND C AND F)) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE A AND ((B AND C) OR (B AND C AND F)) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE A AND ((B AND C) OR (B AND C AND F)) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE A AND ((B AND C) OR (B AND C AND F)) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE A AND ((B AND C) OR (B AND C AND F));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE A AND ((B AND C) OR (B AND C AND F));
|
||||||
|
|
||||||
SELECT * FROM x WHERE A AND ((B AND C AND E) OR (B AND C AND F)) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE A AND ((B AND C AND E) OR (B AND C AND F)) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE A AND ((B AND C AND E) OR (B AND C AND F)) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE A AND ((B AND C AND E) OR (B AND C AND F)) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE A AND ((B AND C AND E) OR (B AND C AND F));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE A AND ((B AND C AND E) OR (B AND C AND F));
|
||||||
|
|
||||||
SELECT * FROM x WHERE A AND ((B AND (C AND E)) OR (B AND C AND F)) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE A AND ((B AND (C AND E)) OR (B AND C AND F)) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE A AND ((B AND (C AND E)) OR (B AND C AND F)) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE A AND ((B AND (C AND E)) OR (B AND C AND F)) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE A AND ((B AND (C AND E)) OR (B AND C AND F));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE A AND ((B AND (C AND E)) OR (B AND C AND F));
|
||||||
|
|
||||||
SELECT * FROM x WHERE A AND ((B AND C) OR (B AND D) OR (B AND E)) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE A AND ((B AND C) OR (B AND D) OR (B AND E)) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE A AND ((B AND C) OR (B AND D) OR (B AND E)) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE A AND ((B AND C) OR (B AND D) OR (B AND E)) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE A AND ((B AND C) OR (B AND D) OR (B AND E));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE A AND ((B AND C) OR (B AND D) OR (B AND E));
|
||||||
|
|
||||||
SELECT * FROM x WHERE A AND ((B AND C) OR ((B AND D) OR (B AND E))) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE A AND ((B AND C) OR ((B AND D) OR (B AND E))) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE A AND ((B AND C) OR ((B AND D) OR (B AND E))) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE A AND ((B AND C) OR ((B AND D) OR (B AND E))) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE A AND ((B AND C) OR ((B AND D) OR (B AND E)));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE A AND ((B AND C) OR ((B AND D) OR (B AND E)));
|
||||||
|
|
||||||
-- Without AND as a root
|
-- Without AND as a root
|
||||||
SELECT * FROM x WHERE ((B AND C) OR (B AND C AND F)) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE ((B AND C) OR (B AND C AND F)) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE ((B AND C) OR (B AND C AND F)) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE ((B AND C) OR (B AND C AND F)) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((B AND C) OR (B AND C AND F));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((B AND C) OR (B AND C AND F));
|
||||||
|
|
||||||
SELECT * FROM x WHERE ((B AND C AND E) OR (B AND C AND F)) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE ((B AND C AND E) OR (B AND C AND F)) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE ((B AND C AND E) OR (B AND C AND F)) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE ((B AND C AND E) OR (B AND C AND F)) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((B AND C AND E) OR (B AND C AND F));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((B AND C AND E) OR (B AND C AND F));
|
||||||
|
|
||||||
SELECT * FROM x WHERE ((B AND (C AND E)) OR (B AND C AND F)) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE ((B AND (C AND E)) OR (B AND C AND F)) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE ((B AND (C AND E)) OR (B AND C AND F)) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE ((B AND (C AND E)) OR (B AND C AND F)) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((B AND (C AND E)) OR (B AND C AND F));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((B AND (C AND E)) OR (B AND C AND F));
|
||||||
|
|
||||||
SELECT * FROM x WHERE ((B AND C) OR (B AND D) OR (B AND E)) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE ((B AND C) OR (B AND D) OR (B AND E)) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE ((B AND C) OR (B AND D) OR (B AND E)) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE ((B AND C) OR (B AND D) OR (B AND E)) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((B AND C) OR (B AND D) OR (B AND E));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((B AND C) OR (B AND D) OR (B AND E));
|
||||||
|
|
||||||
SELECT * FROM x WHERE ((B AND C) OR ((B AND D) OR (B AND E))) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE ((B AND C) OR ((B AND D) OR (B AND E))) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE ((B AND C) OR ((B AND D) OR (B AND E))) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE ((B AND C) OR ((B AND D) OR (B AND E))) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((B AND C) OR ((B AND D) OR (B AND E)));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((B AND C) OR ((B AND D) OR (B AND E)));
|
||||||
|
|
||||||
-- Complex expression
|
-- Complex expression
|
||||||
SELECT * FROM x WHERE (A AND (sipHash64(C) = sipHash64(D))) OR (B AND (sipHash64(C) = sipHash64(D))) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE (A AND (sipHash64(C) = sipHash64(D))) OR (B AND (sipHash64(C) = sipHash64(D))) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE (A AND (sipHash64(C) = sipHash64(D))) OR (B AND (sipHash64(C) = sipHash64(D))) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE (A AND (sipHash64(C) = sipHash64(D))) OR (B AND (sipHash64(C) = sipHash64(D))) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE (A AND (sipHash64(C) = sipHash64(D))) OR (B AND (sipHash64(C) = sipHash64(D)));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE (A AND (sipHash64(C) = sipHash64(D))) OR (B AND (sipHash64(C) = sipHash64(D)));
|
||||||
|
|
||||||
-- Flattening is only happening if something can be extracted
|
-- Flattening is only happening if something can be extracted
|
||||||
SELECT * FROM x WHERE ((A AND B) OR ((C AND D) OR (E AND F))) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE ((A AND B) OR ((C AND D) OR (E AND F))) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE ((A AND B) OR ((C AND D) OR (E AND F))) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE ((A AND B) OR ((C AND D) OR (E AND F))) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((A AND B) OR ((C AND D) OR (E AND F)));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((A AND B) OR ((C AND D) OR (E AND F)));
|
||||||
|
|
||||||
SELECT * FROM x WHERE ((A AND B) OR ((B AND D) OR (E AND F))) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE ((A AND B) OR ((B AND D) OR (E AND F))) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE ((A AND B) OR ((B AND D) OR (E AND F))) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE ((A AND B) OR ((B AND D) OR (E AND F))) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((A AND B) OR ((B AND D) OR (E AND F)));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((A AND B) OR ((B AND D) OR (E AND F)));
|
||||||
|
|
||||||
-- Duplicates
|
-- Duplicates
|
||||||
SELECT * FROM x WHERE (A AND B AND C) OR ((A AND A AND A AND B AND B AND E AND E) OR (A AND B AND B AND F AND F)) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE (A AND B AND C) OR ((A AND A AND A AND B AND B AND E AND E) OR (A AND B AND B AND F AND F)) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE (A AND B AND C) OR ((A AND A AND A AND B AND B AND E AND E) OR (A AND B AND B AND F AND F)) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE (A AND B AND C) OR ((A AND A AND A AND B AND B AND E AND E) OR (A AND B AND B AND F AND F)) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE (A AND B AND C) OR ((A AND A AND A AND B AND B AND E AND E) OR (A AND B AND B AND F AND F));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE (A AND B AND C) OR ((A AND A AND A AND B AND B AND E AND E) OR (A AND B AND B AND F AND F));
|
||||||
|
|
||||||
SELECT * FROM x WHERE ((A AND B AND C) OR (A AND B AND D)) AND ((B AND A AND E) OR (B AND A AND F)) ORDER BY A, B, C, D, E, F LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
SELECT * FROM x WHERE ((A AND B AND C) OR (A AND B AND D)) AND ((B AND A AND E) OR (B AND A AND F)) ORDER BY x LIMIT 10 SETTINGS optimize_extract_common_expressions = 0;
|
||||||
SELECT * FROM x WHERE ((A AND B AND C) OR (A AND B AND D)) AND ((B AND A AND E) OR (B AND A AND F)) ORDER BY A, B, C, D, E, F LIMIT 10;
|
SELECT * FROM x WHERE ((A AND B AND C) OR (A AND B AND D)) AND ((B AND A AND E) OR (B AND A AND F)) ORDER BY x LIMIT 10;
|
||||||
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((A AND B AND C) OR (A AND B AND D)) AND ((B AND A AND E) OR (B AND A AND F));
|
EXPLAIN QUERY TREE dump_ast = 1 SELECT count() FROM x WHERE ((A AND B AND C) OR (A AND B AND D)) AND ((B AND A AND E) OR (B AND A AND F));
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user