Skip to content

Fix sqlancer#1209: UNARY_PLUS operator now converts values to DOUBLE PRECISION#1220

Open
guptapratykshh wants to merge 1 commit intosqlancer:mainfrom
guptapratykshh:fix-unary-plus-operatorr
Open

Fix sqlancer#1209: UNARY_PLUS operator now converts values to DOUBLE PRECISION#1220
guptapratykshh wants to merge 1 commit intosqlancer:mainfrom
guptapratykshh:fix-unary-plus-operatorr

Conversation

@guptapratykshh
Copy link
Copy Markdown
Contributor

@guptapratykshh guptapratykshh commented Apr 8, 2025

This PR addresses an issue where the UNARY_PLUS operator (+) wasn't properly handling type promotion. In SQL (including Materialize/PostgreSQL), applying the unary + operator on a numeric value should promote it to DOUBLE PRECISION. The previous implementation simply returned the input value without performing any conversion, which could lead to mismatches in expected vs. actual results during testing.

Closes #1209

@guptapratykshh
Copy link
Copy Markdown
Contributor Author

@robins please look into this PR I have raised a new separate PR for that issue. #1210 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix : UNARY_PLUS operator should convert value to DOUBLE in expected value generation

1 participant