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

TDL-14448 Numbertype falls to string for boolean values #73

Merged

Conversation

namrata270998
Copy link
Contributor

@namrata270998 namrata270998 commented Apr 12, 2022

Description of change

  • Number type values fall to string for boolean values

Manual QA steps

  • Verify that the number values returns string output

Risks

Rollback steps

  • revert this branch

@namrata270998 namrata270998 changed the title initial commit TDL-14448 Numbertype falls to string for boolean values Apr 12, 2022
@namrata270998 namrata270998 marked this pull request as ready for review April 14, 2022 10:06
Comment on lines 242 to 245
# BUG_TDL-14448 | https://jira.talendforge.org/browse/TDL-14448
# Skipping Number and Currency columns with boolean values because they do not fallback to string
elif test_case == 'boolean' and column in {'Currency', 'Number'}: # BUG_TDL-14448
continue # skip
# elif test_case == 'boolean' and column in {'Currency', 'Number'}: # BUG_TDL-14448
# continue # skip
Copy link
Contributor

Choose a reason for hiding this comment

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

If we have resolved this issue then we should remove this section rather than commenting it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the commented code

"""Verify that boolean values falls back as string"""
value = True
transformed_data = transform_sheet_number_data(value, sheet_title='test-sheet', col_name='test-column', col_letter='col', row_num=1, col_type='numberType')
self.assertIsInstance(transformed_data, str)
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, add an assertion for the value of transformed_data in all unit tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the assertion

@namrata270998 namrata270998 changed the base branch from master to crest-work April 27, 2022 08:07
@namrata270998 namrata270998 merged commit da372f0 into crest-work May 30, 2022
KrisPersonal pushed a commit that referenced this pull request May 31, 2022
* TDL-7096 used effective format to check the type instead of effective value (#76)

* TDL-7096 used eff format to check the type instead of eff value

* added integration test for the updated code

* added new sheet in schema

* TDL-18745 changed to formatted, and made 2 API calls for datetime values (#75)

* TDL-18745 changed to formatted, and made 2 API calls for datetime values

* added cftime in setup.py

* added extra check for currency

* added unittsts for currency format and fixed cci

* added comments back

* resolved PR comments

* transform into datetime, if error, return string values

* added unittests

* resolved PR comments

* resolved review comments

* added sadsheet-date in sync

* added sadsheet-effective-format to base.py for schema

* added new test sheet

* added sheet to skip

* fixed unittests

* TDL-14454 Changed multipleof to singer.decimal (#74)

* changed multipleof to singer.decimal

* fixed cci issues

* fixed cci failures

* converted int to str list

* fixed circlci

* removed unused import

* resolved comments

* added sheets in base

* skipped streams due to errors

* added test-sheet-number in base

* TDL-14448 Numbertype falls to string for boolean values (#73)

* initial commit

* unittests for number transform

* intgration test update

* deleted test.py

* resolve PR comments

* resolved cci failures

* changed currency to string as it would now come as a string
@KrisPersonal KrisPersonal mentioned this pull request May 31, 2022
@namrata270998 namrata270998 deleted the TDL-14448-numbertype-falls-to-string-for-boolean branch June 2, 2022 09:46
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.

6 participants