Skip to content

GH-36820: [C++] Remove a needless return in Acero ScanNode::AddScanTasks - #36821

Closed
mapleFU wants to merge 1 commit into
apache:mainfrom
mapleFU:tiny-fix-for-scan-multiple-return
Closed

mapleFU wants to merge 1 commit into
apache:mainfrom
mapleFU:tiny-fix-for-scan-multiple-return

Conversation

@mapleFU

@mapleFU mapleFU commented Jul 22, 2023 •

Copy link
Copy Markdown
Member

Rationale for this change

ScanNode::AddScanTasks has multiple return value. This patch remove the latter one.

What changes are included in this PR?

Just remove some code.

Are these changes tested?

no

Are there any user-facing changes?

no

@mapleFU
mapleFU requested a review from westonpace as a code owner July 22, 2023 07:16
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #36820 has been automatically assigned in GitHub to PR creator.

@kou kou changed the title GH-36820: [C++] Minor: trying to fix style in Acero ScanNode::AddScanTasks GH-36820: [C++] Remove a needless return in Acero ScanNode::AddScanTasks Jul 24, 2023
@kou

kou commented Jul 24, 2023

Copy link
Copy Markdown
Member

(I'm not sure the details of this code too.)

If we don't need to return list_and_scan_done, it seems that we can remove all list_and_scan_done related codes too.

@mapleFU

mapleFU commented Jul 24, 2023

Copy link
Copy Markdown
Member Author

Let me wait for weston's idea...Actually I'm not sure whether we need to return OK() or list_and_scan_done

@mapleFU

mapleFU commented Jul 24, 2023

Copy link
Copy Markdown
Member Author

@westonpace would you mind take a look? Just two line fix

@westonpace westonpace left a comment

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.

Thanks. I changed the need for this future in #32768 but it was very clumsy of me to leave this return statement here. Sorry.

You could probably change this method to return void but the method will also hopefully be going away entirely as part of #35889 so I'm fine if you want to stick with this minimal change.

@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Jul 24, 2023
@westonpace

Copy link
Copy Markdown
Member

And yes, we should be able to remove list_and_scan_done entirely but it is not too important since this method is going away.

@mapleFU

mapleFU commented Jul 24, 2023

Copy link
Copy Markdown
Member Author

Just want to remove it because I seen this while reading the code. If you think it's not neccessary, feel free to close this patch :-)
I'll try to remove list_and_scan_done later

@mapleFU

mapleFU commented Jul 24, 2023

Copy link
Copy Markdown
Member Author

Close this issue and wait for #35889 to be merged :-)

@mapleFU mapleFU closed this Jul 24, 2023
@mapleFU
mapleFU deleted the tiny-fix-for-scan-multiple-return branch July 24, 2023 15:42
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.

[C++] Acero: ScanNode::AddScanTasks has unreached return value

3 participants