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

[SPARK-48991][SQL] Move path initialization into try-catch block in FileStreamSink.hasMetadata #47471

Closed
wants to merge 1 commit into from

Conversation

yaooqinn
Copy link
Member

What changes were proposed in this pull request?

This pull request proposed to move path initialization into try-catch block in FileStreamSink.hasMetadata. Then, exceptions from invalid paths can be handled consistently like other path-related exceptions in the current try-catch block. At last, we can make the errors fall into the correct code branches to be handled

Why are the changes needed?

bugfix for improperly handled exceptions in FileStreamSink.hasMetadata

Does this PR introduce any user-facing change?

no, an invalid path is still invalid, but fails in the correct places

How was this patch tested?

new test

Was this patch authored or co-authored using generative AI tooling?

no

@yaooqinn yaooqinn closed this in d68cde8 Jul 24, 2024
yaooqinn added a commit that referenced this pull request Jul 24, 2024
…ileStreamSink.hasMetadata

### What changes were proposed in this pull request?

This pull request proposed to move path initialization into try-catch block in FileStreamSink.hasMetadata. Then, exceptions from invalid paths can be handled consistently like other path-related exceptions in the current try-catch block. At last, we can make the errors fall into the correct code branches to be handled

### Why are the changes needed?

bugfix for improperly handled exceptions in FileStreamSink.hasMetadata

### Does this PR introduce _any_ user-facing change?

no, an invalid path is still invalid, but fails in the correct places

### How was this patch tested?

new test

### Was this patch authored or co-authored using generative AI tooling?
no

Closes #47471 from yaooqinn/SPARK-48991.

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
(cherry picked from commit d68cde8)
Signed-off-by: Kent Yao <yao@apache.org>
yaooqinn added a commit that referenced this pull request Jul 24, 2024
…ileStreamSink.hasMetadata

### What changes were proposed in this pull request?

This pull request proposed to move path initialization into try-catch block in FileStreamSink.hasMetadata. Then, exceptions from invalid paths can be handled consistently like other path-related exceptions in the current try-catch block. At last, we can make the errors fall into the correct code branches to be handled

### Why are the changes needed?

bugfix for improperly handled exceptions in FileStreamSink.hasMetadata

### Does this PR introduce _any_ user-facing change?

no, an invalid path is still invalid, but fails in the correct places

### How was this patch tested?

new test

### Was this patch authored or co-authored using generative AI tooling?
no

Closes #47471 from yaooqinn/SPARK-48991.

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
(cherry picked from commit d68cde8)
Signed-off-by: Kent Yao <yao@apache.org>
@yaooqinn
Copy link
Member Author

Merged to master/3.5/3.4,

Thank you @cloud-fan

@yaooqinn yaooqinn deleted the SPARK-48991 branch July 24, 2024 12:04
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. Thank you, @yaooqinn and Wenchen.

@dongjoon-hyun
Copy link
Member

BTW, although this landed at during 3.5.2 RC2 period, this is not a blocker for 3.5.2 RC2 vote, right, @yaooqinn ?

ilicmarkodb pushed a commit to ilicmarkodb/spark that referenced this pull request Jul 29, 2024
…ileStreamSink.hasMetadata

### What changes were proposed in this pull request?

This pull request proposed to move path initialization into try-catch block in FileStreamSink.hasMetadata. Then, exceptions from invalid paths can be handled consistently like other path-related exceptions in the current try-catch block. At last, we can make the errors fall into the correct code branches to be handled

### Why are the changes needed?

bugfix for improperly handled exceptions in FileStreamSink.hasMetadata

### Does this PR introduce _any_ user-facing change?

no, an invalid path is still invalid, but fails in the correct places

### How was this patch tested?

new test

### Was this patch authored or co-authored using generative AI tooling?
no

Closes apache#47471 from yaooqinn/SPARK-48991.

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
fusheng-rd pushed a commit to fusheng-rd/spark that referenced this pull request Aug 6, 2024
…ileStreamSink.hasMetadata

### What changes were proposed in this pull request?

This pull request proposed to move path initialization into try-catch block in FileStreamSink.hasMetadata. Then, exceptions from invalid paths can be handled consistently like other path-related exceptions in the current try-catch block. At last, we can make the errors fall into the correct code branches to be handled

### Why are the changes needed?

bugfix for improperly handled exceptions in FileStreamSink.hasMetadata

### Does this PR introduce _any_ user-facing change?

no, an invalid path is still invalid, but fails in the correct places

### How was this patch tested?

new test

### Was this patch authored or co-authored using generative AI tooling?
no

Closes apache#47471 from yaooqinn/SPARK-48991.

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
szehon-ho pushed a commit to szehon-ho/spark that referenced this pull request Aug 7, 2024
…ileStreamSink.hasMetadata

### What changes were proposed in this pull request?

This pull request proposed to move path initialization into try-catch block in FileStreamSink.hasMetadata. Then, exceptions from invalid paths can be handled consistently like other path-related exceptions in the current try-catch block. At last, we can make the errors fall into the correct code branches to be handled

### Why are the changes needed?

bugfix for improperly handled exceptions in FileStreamSink.hasMetadata

### Does this PR introduce _any_ user-facing change?

no, an invalid path is still invalid, but fails in the correct places

### How was this patch tested?

new test

### Was this patch authored or co-authored using generative AI tooling?
no

Closes apache#47471 from yaooqinn/SPARK-48991.

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
(cherry picked from commit d68cde8)
Signed-off-by: Kent Yao <yao@apache.org>
attilapiros pushed a commit to attilapiros/spark that referenced this pull request Oct 4, 2024
…ileStreamSink.hasMetadata

### What changes were proposed in this pull request?

This pull request proposed to move path initialization into try-catch block in FileStreamSink.hasMetadata. Then, exceptions from invalid paths can be handled consistently like other path-related exceptions in the current try-catch block. At last, we can make the errors fall into the correct code branches to be handled

### Why are the changes needed?

bugfix for improperly handled exceptions in FileStreamSink.hasMetadata

### Does this PR introduce _any_ user-facing change?

no, an invalid path is still invalid, but fails in the correct places

### How was this patch tested?

new test

### Was this patch authored or co-authored using generative AI tooling?
no

Closes apache#47471 from yaooqinn/SPARK-48991.

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
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.

3 participants