gobblin icon indicating copy to clipboard operation
gobblin copied to clipboard

[GOBBLIN-1367] Fix PostgresqlExtractor's unnecessary string replacement

Open sekikn opened this issue 5 years ago • 1 comments

Dear Gobblin maintainers,

Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!

JIRA

  • [x] My PR addresses the following Gobblin JIRA issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
    • https://issues.apache.org/jira/browse/GOBBLIN-1367

Description

  • [x] Here are some details about my PR, including screenshots (if applicable):

PostgresqlExtractor fails if the name of schema or table contains the one of its column as substring. This PR fixes it.

Tests

  • [x] My PR adds the following unit tests OR does not need testing for this extremely good reason:
  • o.a.g.source.jdbc.PostgresqlExtractorTest.testGetHighWatermarkMetadata
  • o.a.g.source.jdbc.PostgresqlExtractorTest.testGetCountMetadata

Commits

  • [x] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

sekikn avatar Jan 21 '21 00:01 sekikn

Codecov Report

Merging #3209 (07d9511) into master (2fa3553) will decrease coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3209      +/-   ##
============================================
- Coverage     46.23%   46.23%   -0.01%     
- Complexity     9788     9797       +9     
============================================
  Files          2019     2019              
  Lines         77439    77504      +65     
  Branches       8602     8606       +4     
============================================
+ Hits          35807    35837      +30     
- Misses        38300    38334      +34     
- Partials       3332     3333       +1     
Impacted Files Coverage Δ Complexity Δ
...pache/gobblin/source/jdbc/PostgresqlExtractor.java 50.00% <100.00%> (+20.17%) 14.00 <0.00> (+2.00)
...obblin/yarn/YarnAppSecurityManagerWithKeytabs.java 8.33% <0.00%> (-13.55%) 1.00% <0.00%> (-1.00%)
...he/gobblin/source/PartitionAwareFileRetriever.java 48.14% <0.00%> (-7.41%) 0.00% <0.00%> (ø%)
...in/java/org/apache/gobblin/cluster/HelixUtils.java 32.23% <0.00%> (-5.79%) 12.00% <0.00%> (-2.00%)
...a/org/apache/gobblin/cluster/GobblinHelixTask.java 58.06% <0.00%> (-2.16%) 6.00% <0.00%> (ø%)
...n/java/org/apache/gobblin/yarn/YarnHelixUtils.java 32.69% <0.00%> (-2.01%) 8.00% <0.00%> (ø%)
...rg/apache/gobblin/yarn/GobblinYarnAppLauncher.java 24.10% <0.00%> (-0.06%) 12.00% <0.00%> (ø%)
...ava/org/apache/gobblin/util/hadoop/TokenUtils.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
...e/gobblin/yarn/AbstractYarnAppSecurityManager.java 49.47% <0.00%> (+1.19%) 7.00% <0.00%> (+1.00%)
...a/management/copy/publisher/CopyDataPublisher.java 75.33% <0.00%> (+1.33%) 32.00% <0.00%> (+1.00%)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2fa3553...07d9511. Read the comment docs.

codecov-io avatar Jan 21 '21 07:01 codecov-io