Skip to content

Remove Oracle ROWNUM from SQLServer unparenthesized functions#39103

Open
thswlsqls wants to merge 1 commit into
apache:masterfrom
thswlsqls:39100
Open

Remove Oracle ROWNUM from SQLServer unparenthesized functions#39103
thswlsqls wants to merge 1 commit into
apache:masterfrom
thswlsqls:39100

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Fixes #39100.

Changes proposed in this pull request:

  • Remove ROWNUM, ROWNUM_ and ROW_NUMBER from SQLServerFunctionOption.getUnparenthesizedFunctionNames(); these are Oracle pseudo-columns that SQL Server does not have (ROW_NUMBER always needs () + OVER).
  • Resolve the existing maintainer TODO that already asked to remove these three names.
  • The set is consumed by ColumnSegmentBinder.isUnparenthesizedFunction(), which skipped binding for any identifier in it; a real SQL Server column named ROWNUM was therefore left unbound (wrong output).
  • Restore parity with the sibling dialects: among all dialect FunctionOptions only Oracle legitimately keeps these pseudo-columns; SQLServer was an Oracle copy remnant.
  • Update SQLServerFunctionOptionTest to assert the remaining niladic functions stay and the three Oracle names are gone.

Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.
  • I have updated the Release Notes of the current development version. For more details, see Update Release Note

@terrymanu

Copy link
Copy Markdown
Member

Please resolve conflict first

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.

SQLServerFunctionOption wrongly lists Oracle ROWNUM pseudo-columns as unparenthesized functions

2 participants