Skip to content

[HUDI-485]: corrected the check for incremental sql#2768

Merged
codope merged 6 commits intoapache:masterfrom
pratyakshsharma:hudi-485
Jan 12, 2022
Merged

[HUDI-485]: corrected the check for incremental sql#2768
codope merged 6 commits intoapache:masterfrom
pratyakshsharma:hudi-485

Conversation

@pratyakshsharma
Copy link
Copy Markdown
Contributor

Tips

What is the purpose of the pull request

Corrected the check for incremental SQL in HiveIncrementalPuller.java class.

Brief change log

(for example:)

  • Modify AnnotationLocation checkstyle rule in checkstyle.xml

Verify this pull request

(Please pick either of the following options)

This pull request is a trivial rework / code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end.
  • Added HoodieClientWriteTest to verify the change.
  • Manually verified the change by running a job locally.

Committer checklist

  • Has a corresponding JIRA in PR title & commit

  • Commit message is descriptive of the change

  • CI is green

  • Necessary doc changes done or have another open PR

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Apr 4, 2021

Codecov Report

Merging #2768 (5d32a15) into master (e970e1f) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2768      +/-   ##
============================================
- Coverage     52.32%   52.30%   -0.02%     
  Complexity     3689     3689              
============================================
  Files           483      483              
  Lines         23095    23095              
  Branches       2460     2460              
============================================
- Hits          12084    12080       -4     
- Misses         9942     9946       +4     
  Partials       1069     1069              
Flag Coverage Δ Complexity Δ
hudicli 37.01% <ø> (ø) 0.00 <ø> (ø)
hudiclient ∅ <ø> (∅) 0.00 <ø> (ø)
hudicommon 50.78% <ø> (-0.05%) 0.00 <ø> (ø)
hudiflink 56.71% <ø> (ø) 0.00 <ø> (ø)
hudihadoopmr 33.44% <ø> (ø) 0.00 <ø> (ø)
hudisparkdatasource 71.33% <ø> (ø) 0.00 <ø> (ø)
hudisync 45.47% <ø> (ø) 0.00 <ø> (ø)
huditimelineservice 64.36% <ø> (ø) 0.00 <ø> (ø)
hudiutilities 69.74% <ø> (+0.05%) 0.00 <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...ache/hudi/common/fs/inline/InMemoryFileSystem.java 79.31% <0.00%> (-10.35%) 15.00% <0.00%> (-1.00%)
...e/hudi/common/table/log/HoodieLogFormatWriter.java 78.12% <0.00%> (-1.57%) 26.00% <0.00%> (ø%)
...apache/hudi/utilities/deltastreamer/DeltaSync.java 71.42% <0.00%> (+0.34%) 56.00% <0.00%> (+1.00%)

@vinothchandar vinothchandar self-assigned this Apr 19, 2021
@vinothchandar
Copy link
Copy Markdown
Member

vinothchandar commented Apr 19, 2021

@vingov for an extra pair of eyes. @pratyakshsharma any testing done for the PR? any way to add a test for the tool?

@vingov
Copy link
Copy Markdown

vingov commented Apr 20, 2021

lgtm, we should use '%s' to replace the from commit time in the line no. 197 with the string format function:

incrementalPullSQLtemplate.add("incrementalSQL", String.format(incrementalSQL, config.fromCommitTime));

@nsivabalan nsivabalan added the priority:high Significant impact; potential bugs label May 11, 2021
@nsivabalan
Copy link
Copy Markdown
Contributor

@pratyakshsharma : can you please respond to vinoth's feedback when you get a chance.

@pratyakshsharma
Copy link
Copy Markdown
Contributor Author

@vingov for an extra pair of eyes. @pratyakshsharma any testing done for the PR? any way to add a test for the tool?

No I have not done any testing. Currently there is no test coverage for this tool. The lines of code that this PR is touching do not need any test case I believe. We can try to cover the entire tool in general with unit tests though. Do you want me to do that as part of this PR itself? @vinothchandar

@nsivabalan
Copy link
Copy Markdown
Contributor

yes, please.

@vinothchandar
Copy link
Copy Markdown
Member

I see L197 is not yet fixed. @vingov given you use this or a similar tool daily. Do you want to upstream a patch for this?

Copy link
Copy Markdown
Member

@codope codope left a comment

Choose a reason for hiding this comment

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

@pratyakshsharma This should be good to land. Could you please resolve the conflict and address the comment by @vingov ?

@vingov
Copy link
Copy Markdown

vingov commented Sep 9, 2021

the code looks good, my last comment was confirming that we should use '%s' so that the String.format function in the L197 will replace it correctly.

No further changes are required by @pratyakshsharma!

@pratyakshsharma
Copy link
Copy Markdown
Contributor Author

@codope I need to add few test cases for this PR. Will do that soon!

@nsivabalan
Copy link
Copy Markdown
Contributor

@pratyakshsharma : Can you please follow up on this and address the feedback.

@nsivabalan nsivabalan assigned codope and unassigned nsivabalan Dec 13, 2021
@vinothchandar
Copy link
Copy Markdown
Member

@pratyakshsharma can we please see this PR through? are you still interested in driving this forward?

@pratyakshsharma
Copy link
Copy Markdown
Contributor Author

Ack. Let me close this in a day or two.

@pratyakshsharma
Copy link
Copy Markdown
Contributor Author

@nsivabalan @vinothchandar please take a pass. We can include this in 0.10.1 release as well.

Copy link
Copy Markdown
Member

@vinothchandar vinothchandar left a comment

Choose a reason for hiding this comment

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

Few nits. but okay with it overall. @codope Can take it from here.

}

@Test
public void testPullerWithoutIncrementalClause() throws IOException, URISyntaxException {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

these tests only seem to be testing some failure scenarios? not the happy path?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was expecting this comment :)

I am actually facing some error with the happy flow test case. Once I am able to fix it, will add it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@pratyakshsharma Is the patch ready? If not, can you please update the happy flow test case even if it's failing. I can take over and try to fix it.

@pratyakshsharma
Copy link
Copy Markdown
Contributor Author

@codope please take a pass, I have added the happy flow test case now.

@hudi-bot
Copy link
Copy Markdown
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

Copy link
Copy Markdown
Member

@codope codope left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the comments and adding the test. Looks good.

@codope codope merged commit a392e9b into apache:master Jan 12, 2022
@vinishjail97 vinishjail97 mentioned this pull request Jan 24, 2022
5 tasks
vingov pushed a commit to vingov/hudi that referenced this pull request Jan 26, 2022
* [HUDI-485]: corrected the check for incremental sql

* [HUDI-485]: added tests

* code review comments addressed

* [HUDI-485]: added happy flow test case
liusenhua pushed a commit to liusenhua/hudi that referenced this pull request Mar 1, 2022
* [HUDI-485]: corrected the check for incremental sql

* [HUDI-485]: added tests

* code review comments addressed

* [HUDI-485]: added happy flow test case
vingov pushed a commit to vingov/hudi that referenced this pull request Apr 3, 2022
* [HUDI-485]: corrected the check for incremental sql

* [HUDI-485]: added tests

* code review comments addressed

* [HUDI-485]: added happy flow test case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:high Significant impact; potential bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants