Skip to content

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

@jepett0

Description

@jepett0

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions