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

Merged
merged 5 commits into from
Jul 5, 2024

Conversation

RichieSK
Copy link
Contributor

@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
Contributor

@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
Contributor

@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

Copy link

github-actions bot commented Jul 4, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Jul 4, 2024
…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
@eladkal eladkal removed the stale Stale PRs per the .github/workflows/stale.yml policy file label Jul 5, 2024
@eladkal eladkal merged commit 89d2f29 into apache:main Jul 5, 2024
51 checks passed
Copy link

boring-cyborg bot commented Jul 5, 2024

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
…pache#39408)

* Remove unused replace boolean parameter in insert_rows function of 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 commit, I removed the parameter to prevent any confusion amongst the users of this class.

* Clarified usage of replace parameter in insert_rows

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 formatting of warning in insert_rows

Updated the formatting of warning to increase readability.

* Update oracle.py

Switched back to original description of replace parameter with a warning of no current implementation

* Format Fix

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.

7 participants