Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: distsql does not support labeled tuples #26627

Closed
knz opened this issue Jun 12, 2018 · 1 comment
Closed

sql: distsql does not support labeled tuples #26627

knz opened this issue Jun 12, 2018 · 1 comment
Assignees
Labels
A-sql-execution Relating to SQL execution. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@knz
Copy link
Contributor

knz commented Jun 12, 2018

Found while investigating #26621. Ultimately needed for #16971.

> CREATE TABLE t (a INT, b STRING)
> SELECT (x).a, (x).b
    FROM (SELECT (ROW(a, b) AS a, b) AS x FROM t)
ORDER BY 1
   LIMIT 1

Fails with setting up flow: ("$0").a: type tuple{int, string} is not composite with distribution enabled, succeeds with local execution.

This is related to, but not identical to, #26624. The two issues must be addressed concurrently to ensure labeled tuples are fully supported.

There is a logic test introduced by #26621/#26628 in the tuples logic test that currently force-disables distsql to work. When this issue is addressed, the test must be reenabled (and checked).

@knz knz added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-sql-execution Relating to SQL execution. labels Jun 12, 2018
@knz
Copy link
Contributor Author

knz commented Jun 12, 2018

@jordanlewis I am assigning this to you for prioritization.

craig bot pushed a commit that referenced this issue Jun 14, 2018
26628: sql: Support tuple column access and tuple stars r=knz a=knz

First commits from #26621.
Completes the fix to #24866 by re-activating disabled tests.
This work is yet another step towards #16971. It would actually fix #16971 if it were not for #26627, #26624 and #26629.

This work is yet another step towards #16971.

The labeled tuples introduced in #25283 can now be accessed using
their labels or using a star, e.g. `(E).*`.

Release note (sql change): Labeled tuples can now be accessed using
their labels (e.g. `SELECT (x).word FROM (SELECT pg_expand_keywords()
AS x)` or a star (e.g. `SELECT (x).* FROM (SELECT pg_expand_keywords()
AS x)`).

Fixes #26720.

Co-authored-by: Raphael 'kena' Poss <knz@cockroachlabs.com>
Co-authored-by: Bram Gruneir <bram@cockroachlabs.com>
@rjnn rjnn assigned rjnn and unassigned jordanlewis Jul 19, 2018
rjnn pushed a commit to rjnn/cockroach that referenced this issue Jul 27, 2018
@craig craig bot closed this as completed in c8564bc Jul 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-execution Relating to SQL execution. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

No branches or pull requests

3 participants