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

Support column_list in CONTAINS #521

Conversation

jaspal007
Copy link

@jaspal007 jaspal007 commented Jan 29, 2025

Description

Specifies two or more columns, separated by commas. column_list must be enclosed in parentheses. Unless language_term is specified, the language of all columns of column_list must be the same.

Issues

Previously in Babelfish the support for multiple columns was unsupported for simple terms in contains clause and it gave syntax error.

  • This was the error thrown while using multiple column syntax at the TDS endpoint of Babelfish
image

Changes made to fix the issue

To resolve this issue we created a new grammar var_name_list and opt_var_name_list to support the list of columns passed in the TSQL query.
We also modified the grammar for single column to pass it as a list opt_var_name to bring singularity in the way both the column name and column list are being passed into the backend parser.

  • Now the TDS endpoint supports multiple column syntax.
image



Task: BABEL-4239
Authored-by: Jaspal Singh [email protected]
Signed-off-by: Jaspal Singh [email protected]

Issues Resolved

BABEL-4239
Extension side PR link: Support column_list in CONTAINS #3438

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 PostgreSQL license, 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.

Jaspal Singh added 3 commits January 23, 2025 11:26
This reverts commit 97dd2cf.

	deleted:    doc/cmake/html/_sources/variable/CTEST_HG_COMMAND.rst.txt
@jaspal007
Copy link
Author

The changes in engine are not required, any change in the grammar needed is to be done in gram-tsql-rule.y file on extension side.

@jaspal007 jaspal007 closed this Jan 30, 2025
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.

1 participant