Skip to content

views: IN (< subquery >) clause cannot be used in view queries #10521

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

Closed
jepett0 opened this issue Oct 16, 2024 · 0 comments
Closed

views: IN (< subquery >) clause cannot be used in view queries #10521

jepett0 opened this issue Oct 16, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jepett0
Copy link
Collaborator

jepett0 commented Oct 16, 2024

Description

Attempting to create a view that has an IN (< subquery >) clause produces an error:

the error
Status: INTERNAL_ERROR
Issues: 
<main>: Fatal: ydb/library/yql/sql/v1/context.cpp:165  GetCurrentBlocks(): requirement !CurrentBlocks.empty() failed, code: 1

Reproduction steps

  1. Create a base table.
CREATE TABLE series (
    series_id Int32,
    PRIMARY KEY (series_id)
);
  1. Execute the following query via the QueryService:
CREATE VIEW in_subquery_view WITH (security_invoker = TRUE) AS
    SELECT
        *
    FROM series
    WHERE series_id IN (
        SELECT
            series_id
        FROM series
    );  
  1. Observe an error.

Tested versions

@jepett0 jepett0 added the bug Something isn't working label Oct 16, 2024
@jepett0 jepett0 self-assigned this Oct 16, 2024
@jepett0 jepett0 changed the title IN (< subquery >) clause cannot be used in VIEWs views: IN (< subquery >) clause cannot be used in view queries Oct 16, 2024
@jepett0 jepett0 closed this as completed Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant