Skip to content

[SPARK-42664][CONNECT] Support bloomFilter function for DataFrameStatFunctions - #40352

Closed
LuciferYang wants to merge 47 commits into
apache:masterfrom
LuciferYang:SPARK-42664
Closed

[SPARK-42664][CONNECT] Support bloomFilter function for DataFrameStatFunctions#40352
LuciferYang wants to merge 47 commits into
apache:masterfrom
LuciferYang:SPARK-42664

Conversation

@LuciferYang

@LuciferYangLuciferYang commented Mar 9, 2023

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This is pr using BloomFilterAggregate to implement bloomFilter function for DataFrameStatFunctions.

Why are the changes needed?

Add Spark connect jvm client api coverage.

Does this PR introduce any user-facing change?

No

How was this patch tested?

  • Add new test
  • Manually check Scala 2.13

@LuciferYang
LuciferYang marked this pull request as draft March 9, 2023 11:41
@LuciferYangLuciferYang changed the title [SPARK-42664][CONNECT] Support bloomFilter function for DataFrameStatFunctions[WIP][SPARK-42664][CONNECT] Support bloomFilter function for DataFrameStatFunctionsMar 9, 2023
numBits: Long,
fpp: Double): BloomFilter = {

val dataType = sparkSession

@LuciferYangLuciferYangMar 10, 2023

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Add this due to:

  1. check col support type in server side
  2. Add Cast for IntegerType/ShortType/ByteType

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we use the TypeOf expression for this instead? Alternatively we can try to figure this out in the planner.

@LuciferYangLuciferYang changed the title [WIP][SPARK-42664][CONNECT] Support bloomFilter function for DataFrameStatFunctions[SPARK-42664][CONNECT] Support bloomFilter function for DataFrameStatFunctionsMar 10, 2023
@LuciferYang
LuciferYang marked this pull request as ready for review March 10, 2023 15:38
@LuciferYang

Copy link
Copy Markdown
ContributorAuthor

In the last commit, make BloomFilterAggregate explicitly supported IntegerType/ShortType/ByteType and added corresponding updaters, then removed pass dataType and adding cast nodes

@LuciferYang

Copy link
Copy Markdown
ContributorAuthor

GA failure is not related to the current PR

numBits: Long,
fpp: Double): BloomFilter = {

val agg = if (!fpp.isNaN) {

@LuciferYangLuciferYangApr 7, 2023

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Before chanage to always pass 3 parameters, always pass all 4 parameters.

Now change to pass (col, expectedNumItems, fpp) if !fpp. isNaN , otherwise pass (col, expectedNumItems, numBits).

@hvanhovell

Copy link
Copy Markdown
Contributor

@LuciferYang can we restart this effort.

I promise I will look at the proto PR :)

@LuciferYang

Copy link
Copy Markdown
ContributorAuthor

This pr has been rebased many times, should I submit a new one...

@LuciferYang

Copy link
Copy Markdown
ContributorAuthor

I make a clean one #42414

@LuciferYang
LuciferYang deleted the SPARK-42664 branch March 30, 2026 08:09
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@LuciferYang@hvanhovell