Skip to content
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

[Bug]: Crash in object-ctr in do-clause #40228

Open
KavinduZoysa opened this issue Apr 17, 2023 · 1 comment
Open

[Bug]: Crash in object-ctr in do-clause #40228

KavinduZoysa opened this issue Apr 17, 2023 · 1 comment
Assignees
Labels
Crash All issues caused by NPE, CCE, etc Lang/Actions/Query Priority/High Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug

Comments

@KavinduZoysa
Copy link
Contributor

Description

Use of query variable in object-ctr inside do-clause causes to compiler crash.

Steps to Reproduce

public function main() {
    var input = [{name: "Saman", price1: 11, price2: 12}, 
                    {name: "Saman", price1: 13, price2: 14}, 
                    {name: "Kamal", price1: 15, price2: 16}, 
                    {name: "Kamal", price1: 17, price2: 18}, 
                    {name: "Saman", price1: 19, price2: 20}];    
    _ = from var {name, price1, price2} in input
            do {
                var obj = object {
                    int p1 = price1;
                };
            };
}

Affected Version(s)

2201.4.1

OS, DB, other environment details and versions

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@KavinduZoysa KavinduZoysa added Type/Bug Priority/High Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Crash All issues caused by NPE, CCE, etc Lang/Actions/Query labels Apr 17, 2023
@LakshanWeerasinghe
Copy link
Contributor

This bug is related to object closures. Before addressing object closures inside query action we need to complete the design and implementation of how the object closures should behave. This will be addressed and tracked in the #36301. Once its is address we can take this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Crash All issues caused by NPE, CCE, etc Lang/Actions/Query Priority/High Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug
Projects
Status: On Hold
Development

No branches or pull requests

2 participants