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

test: add regression test for unnesting dictionary encoded columns #14395

Merged
merged 3 commits into from
Feb 2, 2025

Conversation

duongcongtoai
Copy link
Contributor

@duongcongtoai duongcongtoai commented Feb 1, 2025

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the core Core DataFusion crate label Feb 1, 2025
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Comment on lines 3342 to 3345
let make_array_udf_expr1 = Expr::ScalarFunction(ScalarFunction::new_udf(
make_array_udf(),
vec![col("column1")],
));
Copy link
Contributor

Choose a reason for hiding this comment

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

If we rewrote this test to use the DataFrame API I think it would belong here nicely

For example:

Suggested change
let make_array_udf_expr1 = Expr::ScalarFunction(ScalarFunction::new_udf(
make_array_udf(),
vec![col("column1")],
));
let make_array_udf_expr1 =make_array_udf()
.call(vec![col("column1")]));

Then instead of LogicalPlanBuilder, use the methods on DataFrame 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, i applied the suggestion

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thanks again @duongcongtoai

@alamb alamb merged commit fa0874b into apache:main Feb 2, 2025
25 checks passed
cj-zhukov pushed a commit to cj-zhukov/datafusion that referenced this pull request Feb 3, 2025
…pache#14395)

* chore: add regression test for unnest dict encoded cols

* chore: use dataframe api for testing

* chore: rm unused dep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make_array -> unnest w/ dict-encoded strings fails
2 participants