Skip to content

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 <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit d68cde8)
Signed-off-by: Kent Yao <[email protected]>
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 <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit d68cde8)
Signed-off-by: Kent Yao <[email protected]>
@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 <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
turboFei pushed a commit to turboFei/spark that referenced this pull request Nov 6, 2025
…ileStreamSink.hasMetadata (apache#537)

### 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 <[email protected]>

(cherry picked from commit d68cde8)

Signed-off-by: Kent Yao <[email protected]>
Co-authored-by: Kent Yao <[email protected]>
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