Skip to content

Unexpected error when using NATURAL RIGHT JOIN #7524

Closed

Description

@suyZhong

Describe the bug
An internal error occurs when executing a NATURAL RIGHT JOIN between two tables, where the RIGHT JOIN works correctly.

To Reproduce

CREATE TABLE t0(c0 INT); 
CREATE TABLE t1(c0 VARCHAR);

SELECT * FROM t1 RIGHT JOIN t0 ON t1.c0 = t0.c0; -- empty table
SELECT * FROM t1 NATURAL RIGHT JOIN t0;
-- Error in optimizer multiplex: TypeException:user.main[19]:'calc.ifthenelse' undefined in:     X_139:any := calc.ifthenelse(X_133:bit, X_135:int, X_137:str);

Expected behavior
Empty table or handling the error gracefully

Screenshots
N/A

Software versions
Build from source:

> docker exec -it monetdb-test mserver5 --version         
MonetDB 5 server 11.50.0 (hg id: 2d9ea21) (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993 - July 2008 CWI
Copyright (c) August 2008 - 2023 MonetDB B.V., all rights reserved
Visit https://www.monetdb.org/ for further information
Found 503.5GiB available memory, 128 available cpu cores
Libraries:
Compiled by: @20410e6e122d (x86_64-pc-linux-gnu)
Compilation: /usr/bin/cc 
Linking    : /usr/bin/ld

Issue labeling
Bug

Additional context
Add any other context about the problem here.

Activity

  1. self-assigned this
    on May 29, 2024
  2. added this to the NEXTFEATURERELEASE milestone on May 29, 2024
  3. added a commit that references this issue on May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions