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

SQL compiler plugin does not validate time module constructs properly #2893

Closed
kaneeldias opened this issue May 10, 2022 · 0 comments
Closed
Assignees
Labels
module/sql Points/2 Team/DIU Data, IO, and Util packages related issues Type/Improvement

Comments

@kaneeldias
Copy link
Contributor

Description:
Currently, the SQL compiler plugin does not verify the type of time module types correctly with OutParameterValues. [1]. The expected return type for time:Civil, time:TimeOfDay etc. is a record, but a TYPE_REFERENCE is returned.

It is required the properly validate the expected return types.

[1] https://github.com/ballerina-platform/module-ballerina-sql/blob/70834a738de1495ee691e2091f67e00c6f29d59a/compiler-plugin/src/main/java/io/ballerina/stdlib/sql/compiler/Utils.java#L252-L260

Steps to reproduce:
Build the code snippet below

import ballerina/sql;
import ballerina/time;

sql:TimestampWithTimezoneOutParameter datetimetzOutValue = new;
time:Civil testVal = datetimetzOutValue.get(time:Civil);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/sql Points/2 Team/DIU Data, IO, and Util packages related issues Type/Improvement
Projects
None yet
Development

No branches or pull requests

3 participants