Fix: Remove AS Keyword for Subquery Aliases in Oracle SQL #44210
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.
Oracle SQL does not permit the use of the AS keyword when aliasing subqueries. While AS is valid for column and table aliases in some contexts, subquery aliases must not include the keyword AS. This PR addresses this limitation in the SQLTableCheckOperator.
Changes:
Updated the SQLTableCheckOperator to handle Oracle-specific SQL syntax by omitting the AS keyword for subquery aliases.
Introduced a check to determine the database type, ensuring this adjustment is applied only for Oracle SQL.
Added relevant unit tests to ensure compatibility across supported databases.
Closes:
Closes #44135.
Notes:
This change ensures that Airflow's SQLTableCheckOperator works seamlessly with Oracle SQL while maintaining compatibility with other databases.