Skip to content

[VL] Minor refactoring of get_velox.sh for better readability#10647

Merged
philo-he merged 2 commits intoapache:mainfrom
Zouxxyy:dev/update-scrip
Oct 2, 2025
Merged

[VL] Minor refactoring of get_velox.sh for better readability#10647
philo-he merged 2 commits intoapache:mainfrom
Zouxxyy:dev/update-scrip

Conversation

@Zouxxyy
Copy link
Copy Markdown
Contributor

@Zouxxyy Zouxxyy commented Sep 7, 2025

What changes are proposed in this pull request?

Wrapping the key steps into functions will help everyone understand the flow of the script.

How was this patch tested?

Copy link
Copy Markdown
Member

@philo-he philo-he left a comment

Choose a reason for hiding this comment

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

Please do a rebase. Thanks.

Comment thread dev/builddeps-veloxbe.sh Outdated
if [[ "x$commands_to_run" == "x" ]]; then
get_velox
setup_dependencies
if [[ "$RUN_SETUP_SCRIPT" == "ON" ]]; then
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.

Can we also move the check -z "${GLUTEN_VCPKG_ENABLED:-}" here?

@Zouxxyy
Copy link
Copy Markdown
Contributor Author

Zouxxyy commented Sep 30, 2025

@philo-he Can you take a look again thanks, the failed case should be irrelevant.

Copy link
Copy Markdown
Member

@philo-he philo-he left a comment

Choose a reason for hiding this comment

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

@Zouxxyy, thanks for the update. I posted some minor comments, which is not related to your changes. Please help fix them if it makes sense to do so.

Comment thread ep/build-velox/src/get_velox.sh Outdated
if [ "$VELOX_HOME" == "" ]; then
VELOX_HOME="$CURRENT_DIR/../build/velox_ep"
fi
VELOX_SOURCE_DIR="${VELOX_HOME}"
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.

It seems not necessary to define VELOX_SOURCE_DIR.

Comment thread ep/build-velox/src/get_velox.sh Outdated
fi

apply_compilation_fixes $CURRENT_DIR $VELOX_SOURCE_DIR
apply_provided_velox_patch "$VELOX_SOURCE_DIR"
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.

VELOX_HOME is a basic global variable. I think we can just access it inside the function instead of passing the arg.

Comment thread ep/build-velox/src/get_velox.sh Outdated
apply_compilation_fixes $CURRENT_DIR $VELOX_SOURCE_DIR
apply_provided_velox_patch "$VELOX_SOURCE_DIR"

apply_compilation_fixes "$CURRENT_DIR" "$VELOX_SOURCE_DIR"
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.

Ditto. $CURRENT_DIR is accessible inside the function.

@Zouxxyy
Copy link
Copy Markdown
Contributor Author

Zouxxyy commented Sep 30, 2025

I removed the useless variables, CC @philo-he

Copy link
Copy Markdown
Member

@philo-he philo-he left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks.

@philo-he philo-he merged commit d2e7f4b into apache:main Oct 2, 2025
138 of 142 checks passed
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.

2 participants