-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-25832][SQL] Remove newly added map related functions #22828
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2540,26 +2540,6 @@ def map_values(col): | |
| return Column(sc._jvm.functions.map_values(_to_java_column(col))) | ||
|
|
||
|
|
||
| @since(2.4) | ||
| def map_entries(col): | ||
| """ | ||
| Collection function: Returns an unordered array of all entries in the given map. | ||
|
|
||
| :param col: name of column or expression | ||
|
|
||
| >>> from pyspark.sql.functions import map_entries | ||
| >>> df = spark.sql("SELECT map(1, 'a', 2, 'b') as data") | ||
| >>> df.select(map_entries("data").alias("entries")).show() | ||
| +----------------+ | ||
| | entries| | ||
| +----------------+ | ||
| |[[1, a], [2, b]]| | ||
| +----------------+ | ||
| """ | ||
| sc = SparkContext._active_spark_context | ||
| return Column(sc._jvm.functions.map_entries(_to_java_column(col))) | ||
|
|
||
|
|
||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you review this, @HyukjinKwon and @BryanCutler ? |
||
| @since(2.4) | ||
| def map_from_entries(col): | ||
| """ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,8 +61,6 @@ | |
| */ | ||
| public final class UnsafeRow extends InternalRow implements Externalizable, KryoSerializable { | ||
|
|
||
| public static final int WORD_SIZE = 8; | ||
|
|
||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is added by map_entries |
||
| ////////////////////////////////////////////////////////////////////////////// | ||
| // Static methods | ||
| ////////////////////////////////////////////////////////////////////////////// | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -414,7 +414,6 @@ object FunctionRegistry { | |
| expression[MapFromArrays]("map_from_arrays"), | ||
| expression[MapKeys]("map_keys"), | ||
| expression[MapValues]("map_values"), | ||
| expression[MapEntries]("map_entries"), | ||
| expression[MapFromEntries]("map_from_entries"), | ||
| expression[MapConcat]("map_concat"), | ||
| expression[Size]("size"), | ||
|
|
@@ -433,13 +432,9 @@ object FunctionRegistry { | |
| expression[ArrayRemove]("array_remove"), | ||
| expression[ArrayDistinct]("array_distinct"), | ||
| expression[ArrayTransform]("transform"), | ||
| expression[MapFilter]("map_filter"), | ||
| expression[ArrayFilter]("filter"), | ||
| expression[ArrayExists]("exists"), | ||
| expression[ArrayAggregate]("aggregate"), | ||
| expression[TransformValues]("transform_values"), | ||
| expression[TransformKeys]("transform_keys"), | ||
| expression[MapZipWith]("map_zip_with"), | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you review this, @gatorsmile and @cloud-fan ? |
||
| expression[ZipWith]("zip_with"), | ||
|
|
||
| CreateStruct.registryEntry, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you review this, @felixcheung ?