Skip to content
Snippets Groups Projects
Commit 9c06c723 authored by Davies Liu's avatar Davies Liu Committed by Josh Rosen
Browse files

[SPARK-3500] [SQL] use JavaSchemaRDD as SchemaRDD._jschema_rdd


Currently, SchemaRDD._jschema_rdd is SchemaRDD, the Scala API (coalesce(), repartition()) can not been called in Python easily, there is no way to specify the implicit parameter `ord`. The _jrdd is an JavaRDD, so _jschema_rdd should also be JavaSchemaRDD.

In this patch, change _schema_rdd to JavaSchemaRDD, also added an assert for it. If some methods are missing from JavaSchemaRDD, then it's called by _schema_rdd.baseSchemaRDD().xxx().

BTW, Do we need JavaSQLContext?

Author: Davies Liu <davies.liu@gmail.com>

Closes #2369 from davies/fix_schemardd and squashes the following commits:

abee159 [Davies Liu] use JavaSchemaRDD as SchemaRDD._jschema_rdd

(cherry picked from commit 885d1621)
Signed-off-by: default avatarJosh Rosen <joshrosen@apache.org>

Conflicts:
	python/pyspark/tests.py
parent 6cbf83c0
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment