-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add escape hatch for Insert Bulk Unsupported Features #2422
Merged
KushaalShroff
merged 6 commits into
babelfish-for-postgresql:BABEL_4_X_DEV
from
amazon-aurora:tablock_hints
Apr 8, 2024
Merged
Add escape hatch for Insert Bulk Unsupported Features #2422
KushaalShroff
merged 6 commits into
babelfish-for-postgresql:BABEL_4_X_DEV
from
amazon-aurora:tablock_hints
Apr 8, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KushaalShroff
commented
Mar 12, 2024
@@ -206,7 +206,7 @@ select * from t1 (tablock, index(i1)) order by id; -- syntax error | |||
go | |||
~~ERROR (Code: 33557097)~~ | |||
|
|||
~~ERROR (Message: syntax error near ',' at line 1 and character position 25)~~ | |||
~~ERROR (Message: syntax error near 'index' at line 1 and character position 27)~~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is expected error. The following is SQL Servers error:
Incorrect syntax near 'index'. If this is intended as a part of a table hint, A WITH keyword and parenthesis are now required. See SQL Server Books Online for proper syntax.
KushaalShroff
force-pushed
the
tablock_hints
branch
from
March 12, 2024 09:13
c7673a2
to
5fbd15c
Compare
Pull Request Test Coverage Report for Build 8246269835Details
💛 - Coveralls |
2jungkook
reviewed
Mar 12, 2024
KushaalShroff
force-pushed
the
tablock_hints
branch
from
April 4, 2024 12:07
048f79b
to
c445852
Compare
This reverts commit 5fbd15c.
KushaalShroff
force-pushed
the
tablock_hints
branch
from
April 4, 2024 12:08
c445852
to
651e4a8
Compare
KushaalShroff
changed the title
Add Escape Hatch For Unsupported Insert Bulk Options
Ignore Tablock Unsupported Error Message for Insert Bulk
Apr 4, 2024
This reverts commit 651e4a8.
KushaalShroff
changed the title
Ignore Tablock Unsupported Error Message for Insert Bulk
Add escape hatch for Insert Bulk Unsupported Features
Apr 4, 2024
KushaalShroff
force-pushed
the
tablock_hints
branch
from
April 4, 2024 15:05
e78a95d
to
ab3d5bd
Compare
KushaalShroff
force-pushed
the
tablock_hints
branch
from
April 4, 2024 15:41
ab3d5bd
to
2917ce8
Compare
2jungkook
approved these changes
Apr 5, 2024
KushaalShroff
merged commit Apr 8, 2024
c3420f0
into
babelfish-for-postgresql:BABEL_4_X_DEV
40 checks passed
staticlibs
pushed a commit
to wiltondb/babelfish_extensions
that referenced
this pull request
Apr 14, 2024
…postgresql#2422) This commit fixes TABLOCK not being parsed as a KEYWORD because of which users were getting Syntax Errors rather than Unsupported errors. To alleviate the drawback of unsupported Tablock options and to keep it consistent with Query options - where its ignored too using an escape hatch - we ignore the unsupported Insert Bulk Option by adding a new a escape hatch for it escape_hatch_insert_bulk_options which is set to ignore be default Issues Resolved BABEL-4830/BABEL-4831 Authored-by: Kushaal Shroff kushaal@amazon.com Signed-off-by: Kushaal Shroff kushaal@amazon.com
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This commit fixed TABLOCK not being parsed as a KEYWORD because of which users were getting Syntax Errors rather than Unsupported erros.
To alleviate the drawback of unsupported Tablock options and to keep it consistent with Query options - where its ignored too using an escape hatch - we ignore the unsupported Insert Bulk Option by adding a new a escape hatch for it escape_hatch_insert_bulk_options which is set to ignore be default
Authored-by: Kushaal Shroff kushaal@amazon.com
Signed-off-by: Kushaal Shroff kushaal@amazon.com
Issues Resolved
BABEL-4830/BABEL-4831
Test Scenarios Covered
Use case based -
Yes
Boundary conditions -
Arbitrary inputs -
Negative test cases -
Minor version upgrade tests -
Major version upgrade tests -
Performance tests -
Tooling impact -
Client tests -
Check List
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.