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

feat: support array_distinct #1306

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

NoeB
Copy link
Contributor

@NoeB NoeB commented Jan 18, 2025

Which issue does this PR close?

Part of #1042

Rationale for this change

What changes are included in this PR?

How are these changes tested?

spark.read.parquet(path.toString).createOrReplaceTempView("t1")
checkSparkAnswerAndOperator(spark.sql("Select array_distinct(array(_2, _3,_4)) from t1"))
checkSparkAnswerAndOperator(
spark.sql("Select array_distinct(array(_2,_4, null)) from t1"))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The results for this check do not match on my machine but I am unsure why because in the spark shell (with and without comet) and also DataFusion cli It works as expected

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason for the different order is that datafusion sorts the data before it removes duplicates

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