Skip to content

[SPARK-28208][SQL][FOLLOWUP] Use tryWithResource pattern#25842

Closed
dongjoon-hyun wants to merge 3 commits intoapache:masterfrom
dongjoon-hyun:SPARK-28208
Closed

[SPARK-28208][SQL][FOLLOWUP] Use tryWithResource pattern#25842
dongjoon-hyun wants to merge 3 commits intoapache:masterfrom
dongjoon-hyun:SPARK-28208

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Sep 19, 2019

What changes were proposed in this pull request?

This PR aims to use tryWithResource for ORC file.

Why are the changes needed?

This is a follow-up to address #25006 (comment) .

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass the Jenkins with the existing tests.

@dongjoon-hyun
Copy link
Member Author

dongjoon-hyun commented Sep 19, 2019

@HyukjinKwon , according to your advice, I tried to replace two more instances.

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

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

LGTM if tests pass

@dongjoon-hyun
Copy link
Member Author

Thank you for review. I transformed the test cases, too.

@SparkQA
Copy link

SparkQA commented Sep 19, 2019

Test build #110963 has finished for PR 25842 at commit 60a15df.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 19, 2019

Test build #110970 has finished for PR 25842 at commit 9c20556.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member Author

Retest this please.

@SparkQA
Copy link

SparkQA commented Sep 19, 2019

Test build #110981 has finished for PR 25842 at commit 9c20556.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

val requestedColIdsOrEmptyFile = OrcUtils.requestedColumnIds(
isCaseSensitive, dataSchema, requiredSchema, reader, conf)
reader.close()
val requestedColIdsOrEmptyFile = {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: The outer braces are redundant here

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

@HeartSaVioR HeartSaVioR left a comment

Choose a reason for hiding this comment

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

LGTM

@SparkQA
Copy link

SparkQA commented Sep 19, 2019

Test build #111016 has finished for PR 25842 at commit bf4dffe.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member Author

Thank you, @HyukjinKwon , @srowen , @HeartSaVioR . Merged to master.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-28208 branch September 19, 2019 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants