# LogicTest: 3node-tenant

statement ok
CREATE TABLE tbl1 (a INT PRIMARY KEY, b INT)

query T
EXPLAIN SELECT * FROM tbl1 WHERE a < 3 OR (a > 7 AND a < 9) OR a > 14
----
distribution: full
vectorized: true
·
• scan
  missing stats
  table: tbl1@tbl1_pkey
  spans: [ - /2] [/8 - /8] [/15 - ]

statement ok
CREATE TABLE tbl2 (k INT PRIMARY KEY, v INT, w INT, x INT,
   FAMILY fam_0 (k),
   FAMILY fam_1 (x),
   FAMILY fam_2 (v, w)
)

# Currently, the DistSQL planner uses all available SQL instances (when they
# have no locality information) in naive round-robin fashion. In order to make
# the output deterministic, we ensure that 3 ranges need to be scanned by the
# query so that each of the three instances would get 1 range.
statement ok
ALTER TABLE tbl2 SPLIT AT VALUES (2), (3)

query T
EXPLAIN SELECT v, w FROM tbl2 WHERE k <= 3
----
distribution: full
vectorized: true
·
• scan
  missing stats
  table: tbl2@tbl2_pkey
  spans: [ - /3]
