Skip to content

[SQL] Self-join on table fails with compile error: "Operator MapIndex has two RetainKeys policies" #5811

@rivudhk

Description

@rivudhk

Following SQL:

CREATE TABLE purchase (
ts TIMESTAMP NOT NULL LATENESS INTERVAL 1 HOUR,
amount BIGINT
) WITH ('append_only' = 'true'); 

CREATE MATERIALIZED VIEW join_lateness_view
WITH ('emit_final' = 'a_ts')
AS
SELECT
  a.ts AS a_ts,
  a.amount + b.amount AS total
FROM purchase a
JOIN purchase b
ON a.ts = b.ts;

Fails with the following error:

Compiler error
Operator MapIndex 267(159) has two RetainKeys policies:IntegrateTraceRetainKeys 270 and IntegrateTraceRetainKeys 272

Metadata

Metadata

Assignees

Labels

SQL compilerRelated to the SQL compiler

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions