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

Predicate Pushdown not Working #2215

Open
Lukas012 opened this issue Jan 28, 2022 · 3 comments
Open

Predicate Pushdown not Working #2215

Lukas012 opened this issue Jan 28, 2022 · 3 comments

Comments

@Lukas012
Copy link

Lukas012 commented Jan 28, 2022

Hi all,

Environment: Spark 3.0.2, Koalas: 1.8.2, Delta Lake 0.7

I've a Delta-Table partioned by column "PARTITION". Koalas doesn't seem to execute predicate pushdown.

  1. Using Spark:
my_kdf = ks.read_delta(f"...")
my_df = my_kdf.to_spark()
result_df = my_df.filter((col("PARTITION") == 15) & (col("ID") == 1))
result_df.to_koalas().toPandas()

Takes: 20 seconds

  1. Same with koalas:
result_kdf = ks.read_delta(f"...")
result_kdf = result_kdf [(result_kdf ["PARTITION"] == 15) & (result_kdf ["ID"] == 1)]
result_kdf.toPandas()

Takes 130 seconds (seems that it doesnt execute predicate pushdown)

  1. Other try with koalas:
my_kdf = ks.read_delta(f"...")
result_kdf = my_kdf [(my_kdf ["PARTITION"] == 15)]
result_kdf = result_kdf [(result_kdf ["ID"] == 1)]
result_kdf.toPandas()

Takes: 20 seconds.

Why takes 2. so long?

Thanks!
Best

@Lukas012 Lukas012 changed the title Koalas Partition Pruning not Working Predicate Pushdown not Working Jan 28, 2022
@HyukjinKwon
Copy link
Member

@Lukas012 do you mind reporting a issue in https://issues.apache.org/jira/projects/SPARK?

@Lukas012
Copy link
Author

Lukas012 commented Feb 7, 2022

Why? This problem only occurs in koalas.

@itholic
Copy link
Contributor

itholic commented Feb 7, 2022

@Lukas012 Koalas is ported into PySpark under the name "pandas API on Spark", and this repository is only in maintenance mode. You can get faster feedback in Apache Spark community.

FYI: and also you can use Koalas code as is in the Apache Spark as below:

# import databricks.koalas as ks
import pyspark.pandas as ks

... (existing Koalas codes)

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

No branches or pull requests

3 participants