Skip to content

Typmod handling for functions expression with numeric.#3851

Closed
Yvinayak07 wants to merge 19 commits intobabelfish-for-postgresql:BABEL_5_X_DEVfrom
amazon-aurora:BABEL-5666-5_X
Closed

Typmod handling for functions expression with numeric.#3851
Yvinayak07 wants to merge 19 commits intobabelfish-for-postgresql:BABEL_5_X_DEVfrom
amazon-aurora:BABEL-5666-5_X

Conversation

@Yvinayak07
Copy link
Copy Markdown
Contributor

@Yvinayak07 Yvinayak07 commented Jun 19, 2025

Issue

In resolve_numeric_typmod_from_exp we missed the handling for typmod calculation for some mathematical functions in function expression like ROUND(), POWER(), CEILING(), FLOOR(), SIGN(), ABS(), DEGREES(), RADAINS(), SCOPE_IDENTITY(), IDENT_SEED(), IDENT_INCR(), IDENT_CURRENT().

2. Changes made to fix the issues

Added handling for ROUND(), POWER(), CEILING(), FLOOR(), SIGN(), ABS(), DEGREES(), RADAINS(), SCOPE_IDENTITY(), IDENT_SEED(), IDENT_INCR(), IDENT_CURRENT() mathematical functions in T_FuncExpr node

Issues Resolved

Task: BABEL-5666

Authored-by: yashneet vinayak yashneet@amazon.com
Signed-off-by: yashneet vinayak yashneet@amazon.com

Test Scenarios Covered

  • Use case based - YES

  • Boundary conditions - YES

  • Arbitrary inputs - YES

  • Negative test cases - YES

  • Minor version upgrade tests -

  • Major version upgrade tests -

  • Performance tests -

  • Tooling impact -

  • Client tests -

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

yashneet vinayak added 7 commits June 19, 2025 04:29
Signed-off-by: yashneet vinayak <yashneet@amazon.com>
Signed-off-by: yashneet vinayak <yashneet@amazon.com>
Signed-off-by: yashneet vinayak <yashneet@amazon.com>
Signed-off-by: yashneet vinayak <yashneet@amazon.com>
Signed-off-by: yashneet vinayak <yashneet@amazon.com>
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Jun 19, 2025

Pull Request Test Coverage Report for Build 16142159261

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 99 of 103 (96.12%) changed or added relevant lines in 3 files are covered.
  • 41 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.08%) to 75.958%

Changes Missing Coverage Covered Lines Changed/Added Lines %
contrib/babelfishpg_tsql/src/pltsql_coerce.c 89 93 95.7%
Files with Coverage Reduction New Missed Lines %
contrib/babelfishpg_tds/src/backend/tds/tdsresponse.c 1 79.08%
contrib/babelfishpg_tds/src/backend/tds/tdsutils.c 40 79.23%
Totals Coverage Status
Change from base Build 16109528009: 0.08%
Covered Lines: 49655
Relevant Lines: 65372

💛 - Coveralls

yashneet vinayak added 12 commits June 20, 2025 04:24
Signed-off-by: yashneet vinayak <yashneet@amazon.com>
Signed-off-by: yashneet vinayak <yashneet@amazon.com>
Signed-off-by: yashneet vinayak <yashneet@amazon.com>
Signed-off-by: yashneet vinayak <yashneet@amazon.com>
Signed-off-by: yashneet vinayak <yashneet@amazon.com>
Signed-off-by: yashneet vinayak <yashneet@amazon.com>
Signed-off-by: yashneet vinayak <yashneet@amazon.com>
Signed-off-by: yashneet vinayak <yashneet@amazon.com>
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.

3 participants