exec-ddl
CREATE TABLE a (k INT PRIMARY KEY, i INT, f FLOAT, s STRING, j JSON)
----
table a
  k int NOT NULL
  i int NULL
  f float NULL
  s string NULL
  j jsonb NULL

#
# NormalizeVar
#
opt
SELECT * FROM a WHERE 1=k AND 2<>i
----
select
 ├── columns: a.k:int:1 a.i:int:null:2 a.f:float:null:3 a.s:string:null:4 a.j:jsonb:null:5
 ├── scan
 │    └── columns: a.k:int:1 a.i:int:null:2 a.f:float:null:3 a.s:string:null:4 a.j:jsonb:null:5
 └── and [type=bool]
      ├── eq [type=bool]
      │    ├── variable: a.k [type=int]
      │    └── const: 1 [type=int]
      └── ne [type=bool]
           ├── variable: a.i [type=int]
           └── const: 2 [type=int]

#
# NormalizeTupleEquality
#
opt
SELECT * FROM a WHERE (i, f, s) = (1, 3.5, 'foo')
----
select
 ├── columns: a.k:int:1 a.i:int:null:2 a.f:float:null:3 a.s:string:null:4 a.j:jsonb:null:5
 ├── scan
 │    └── columns: a.k:int:1 a.i:int:null:2 a.f:float:null:3 a.s:string:null:4 a.j:jsonb:null:5
 └── and [type=bool]
      ├── eq [type=bool]
      │    ├── variable: a.i [type=int]
      │    └── const: 1 [type=int]
      ├── eq [type=bool]
      │    ├── variable: a.f [type=float]
      │    └── const: 3.5 [type=float]
      └── eq [type=bool]
           ├── variable: a.s [type=string]
           └── const: 'foo' [type=string]

#
# NormalizeTupleEquality, FlattenAnd
#   Nested tuples.
#
opt
SELECT * FROM a WHERE (1, (2, 'foo')) = (k, (i, s))
----
select
 ├── columns: a.k:int:1 a.i:int:null:2 a.f:float:null:3 a.s:string:null:4 a.j:jsonb:null:5
 ├── scan
 │    └── columns: a.k:int:1 a.i:int:null:2 a.f:float:null:3 a.s:string:null:4 a.j:jsonb:null:5
 └── and [type=bool]
      ├── eq [type=bool]
      │    ├── variable: a.k [type=int]
      │    └── const: 1 [type=int]
      ├── eq [type=bool]
      │    ├── variable: a.i [type=int]
      │    └── const: 2 [type=int]
      └── eq [type=bool]
           ├── variable: a.s [type=string]
           └── const: 'foo' [type=string]
