-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-45688][SPARK-45693][CORE] Clean up the deprecated API usage related to MapOps & Fix method += in trait Growable is deprecated
#43578
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 4 commits
9cd3c43
d4ebf7d
2700b98
52da31c
a9e9af0
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 |
|---|---|---|
|
|
@@ -206,13 +206,12 @@ case class JoinEstimation(join: Join) extends Logging { | |
| case _ => | ||
| computeByNdv(leftKey, rightKey, newMin, newMax) | ||
| } | ||
| keyStatsAfterJoin += ( | ||
| // Histograms are propagated as unchanged. During future estimation, they should be | ||
| // truncated by the updated max/min. In this way, only pointers of the histograms are | ||
| // propagated and thus reduce memory consumption. | ||
| leftKey -> joinStat.copy(histogram = leftKeyStat.histogram), | ||
| rightKey -> joinStat.copy(histogram = rightKeyStat.histogram) | ||
| ) | ||
| // Histograms are propagated as unchanged. During future estimation, they should be | ||
|
||
| // truncated by the updated max/min. In this way, only pointers of the histograms are | ||
| // propagated and thus reduce memory consumption. | ||
| keyStatsAfterJoin += | ||
| (leftKey -> joinStat.copy(histogram = leftKeyStat.histogram)) += | ||
| (rightKey -> joinStat.copy(histogram = rightKeyStat.histogram)) | ||
| // Return cardinality estimated from the most selective join keys. | ||
| if (card < joinCard) joinCard = card | ||
| } else { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,8 @@ case class DescribeNamespaceExec( | |
| } | ||
|
|
||
| if (isExtended) { | ||
| val properties = metadata.asScala -- CatalogV2Util.NAMESPACE_RESERVED_PROPERTIES | ||
| val properties = metadata.asScala.filterNot( | ||
|
||
| m => CatalogV2Util.NAMESPACE_RESERVED_PROPERTIES.toSet.contains(m._1)) | ||
| val propertiesStr = | ||
| if (properties.isEmpty) { | ||
| "" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -825,9 +825,8 @@ class V2SessionCatalogNamespaceSuite extends V2SessionCatalogBaseSuite { | |
| expected: scala.collection.Map[String, String], | ||
| actual: scala.collection.Map[String, String]): Unit = { | ||
| // remove location and comment that are automatically added by HMS unless they are expected | ||
| val toRemove = | ||
| CatalogV2Util.NAMESPACE_RESERVED_PROPERTIES.filter(expected.contains) | ||
| assert(expected -- toRemove === actual) | ||
| val toRemove = CatalogV2Util.NAMESPACE_RESERVED_PROPERTIES.toSet | ||
|
||
| assert(expected.filterNot(e => toRemove.contains(e._1)) === actual) | ||
| } | ||
|
|
||
| test("listNamespaces: basic behavior") { | ||
|
|
||
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.
Not sure if this modification aligns with the original test objective.
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.
I found that
TimeStampedHashMapis now a utility class that is no longer used by Spark, and only test cases are still using it.I personally have the following optional suggestions:
private[spark]visibility, perhaps we can directly deleteTimeStampedHashMap.TimeStampedHashMapinto animmutableimplementation to maintain the current usage.cc @dongjoon-hyun FYI
Uh oh!
There was an error while loading. Please reload this page.
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.
b18d708#diff-77b12178a7036c71135074c6ddf7d659e5a69906264d5e3061087e4352e304ed introduced this data structure
After #22339, this data structure is only being used in unit tests. So, after Spark 3.0, this data structure has not been used by any production code of Spark.
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.
+1 for (1)
direct deletion.