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

Warn user about unused replace parameter in insert_rows (OracleHook) #39408

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

RichieSK
Copy link

@RichieSK RichieSK commented May 4, 2024

Following changes made to OracleHook class.

The replace boolean parameter claims to replace rows instead of insert, but this functionality has not been implemented and the documentation claims it works. This can be misleading to any user of this class. Furthermore, the parameter isn't even being used anywhere in this function.

In this change, I removed the unused 'replace' parameter in both the function and the docs to prevent any confusion amongst the users of this class.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@RichieSK RichieSK changed the title Remove unused replace boolean parameter in insert_rows function of Or… Warn user about unused replace parameter in insert_rows (OracleHook) May 4, 2024
Copy link
Collaborator

@romsharon98 romsharon98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@dirrao dirrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RichieSK RichieSK force-pushed the patch-1 branch 2 times, most recently from 67ece44 to 8c36ec2 Compare May 5, 2024 06:49
Copy link
Contributor

@syedahsn syedahsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…acleHook class

The replace boolean parameter claims to replace rows instead of insert, but this functionality has not been implemented and the documentation claims it works. This can be misleading to any user of this class. Furthermore, the parameter isn't even being used anywhere in this function.

In this commit, I removed the parameter to prevent any confusion amongst the users of this class.
Re-introduced the replace boolean parameter.
Added a warning when the user sets the replace parameter to True.
Updated the docstring to let the user know that the replace boolean parameter does nothing.
Updated the formatting of warning to increase readability.
Switched back to original description of replace parameter with a warning of no current implementation
Added a format fix to pass static format testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants