12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- # Copyright Materialize, Inc. and contributors. All rights reserved.
- #
- # Use of this software is governed by the Business Source License
- # included in the LICENSE file at the root of this repository.
- #
- # As of the Change Date specified in that file, in accordance with
- # the Business Source License, use of this software will be governed
- # by the Apache License, Version 2.0.
- # Keys should be detected for constants with
- # no duplicates in a column.
- query T multiline
- EXPLAIN OPTIMIZED PLAN WITH(keys, no fast path, humanized expressions) AS VERBOSE TEXT FOR (VALUES (1, 1), (1, 2))
- ----
- Explained Query:
- Constant // { keys: "([1])" }
- - (1, 1)
- - (1, 2)
- Target cluster: quickstart
- EOF
- # A global primary key should be detected for constants with fewer than two rows.
- query T multiline
- EXPLAIN OPTIMIZED PLAN WITH(keys, no fast path, humanized expressions) AS VERBOSE TEXT FOR (VALUES (1, 2, 3))
- ----
- Explained Query:
- Constant // { keys: "([])" }
- - (1, 2, 3)
- Target cluster: quickstart
- EOF
- # Each detected-unique column belongs in a separate key.
- query T multiline
- EXPLAIN OPTIMIZED PLAN WITH(keys, no fast path, humanized expressions) AS VERBOSE TEXT FOR (VALUES (1, 1, 1), (2, 2, 1), (3, 3, 1))
- ----
- Explained Query:
- Constant // { keys: "([0], [1])" }
- - (1, 1, 1)
- - (2, 2, 1)
- - (3, 3, 1)
- Target cluster: quickstart
- EOF
|