Skip to content

[Bug] Relational expression xxx belongs to a different planner than is currently being used #8633

Description

@seekforshell

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version

1.4.1

Compute Engine

flink 1.14 + Hadoop 3.1.1

Minimal reproduce step

-- 1.create paimon catalog
CREATE CATALOG pc WITH (
'type' = 'paimon',
'warehouse' = 'file:///tmp/paimon-warehouse'
);

-- 2. test case, first create three base table
CREATE TABLE IF NOT EXISTS pc.test.user_info (
user_id BIGINT,
user_name STRING,
age INT,
PRIMARY KEY (user_id) NOT ENFORCED
);

CREATE TABLE IF NOT EXISTS pc.test.user_ext_info (
user_id BIGINT,
address STRING,
phone STRING,
PRIMARY KEY (user_id) NOT ENFORCED
);

CREATE TABLE IF NOT EXISTS pc.test.user_level (
user_id BIGINT,
level STRING,
score INT,
PRIMARY KEY (user_id) NOT ENFORCED
) WITH (
'bucket' = '10',
'bucket-key' = 'user_id'
);

-- 3. create union view
CREATE VIEW IF NOT EXISTS view_user_union AS
SELECT
user_id,
user_name,
age,
CAST(NULL AS STRING) AS address,
CAST(NULL AS STRING) AS phone
FROM pc.test.user_info

UNION ALL

SELECT
user_id,
CAST(NULL AS STRING) AS user_name,
CAST(NULL AS INT) AS age,
address,
phone
FROM pc.test.user_ext_info;

-- 4. assert found
SELECT
u.user_id,
u.user_name,
u.age,
u.address,
u.phone,
l.level,
l.score
FROM view_user_union u
LEFT JOIN pc.test.user_level l ON u.user_id = l.user_id;

What doesn't meet your expectations?

The SELECT statement is expected to execute normally

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions