Skip to content

refactor: collapse redundant branch in add_columns_from transform#5198

Open
LuciferYang wants to merge 1 commit into
lance-format:mainfrom
LuciferYang:refactor/wrap-transform-redundant-branch
Open

refactor: collapse redundant branch in add_columns_from transform#5198
LuciferYang wants to merge 1 commit into
lance-format:mainfrom
LuciferYang:refactor/wrap-transform-redundant-branch

Conversation

@LuciferYang

Copy link
Copy Markdown

In add_columns_from, the callable-transform branch checked whether the transform's result was a pa.Table or dict and assigned new_cols = result, then the else did exactly the same thing. The isinstance check had no effect — both arms were identical — and the result is normalized further down regardless.

Collapsed the two arms into a single else. No behavior change; the RecordBatch case above it is untouched.

The elif (pa.Table | dict) and else arms in _wrap_transform both assigned
new_cols = result, so the isinstance check was dead. Collapse to a single
else.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant