You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/05/10 21:24:38 UTC
[GitHub] [spark] anishshri-db commented on a diff in pull request #36491: [SPARK-39134][SS] Add custom metric of skipped null values for stream join operator
anishshri-db commented on code in PR #36491:
URL: https://github.com/apache/spark/pull/36491#discussion_r869691484
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/SymmetricHashJoinStateManager.scala:
##########
@@ -617,6 +619,7 @@ class SymmetricHashJoinStateManager(
val keyWithIndex = keyWithIndexRow(key, index)
val valuePair = valueRowConverter.convertValue(stateStore.get(keyWithIndex))
if (valuePair == null && storeConf.skipNullsForStreamStreamJoins) {
+ skippedNullValueCount.map(_ += 1L)
Review Comment:
We also skip null values in `findNextValueForIndex` function as well:
```
private def findNextValueForIndex(): ValueAndMatchPair = {
// Loop across all values for the current key, and then all other keys, until we find a
// value satisfying the removal condition.
def hasMoreValuesForCurrentKey = currentKey != null && index < numValues
def hasMoreKeys = allKeyToNumValues.hasNext
while (hasMoreValuesForCurrentKey || hasMoreKeys) {
if (hasMoreValuesForCurrentKey) {
// First search the values for the current key.
val valuePair = keyWithIndexToValue.get(currentKey, index)
if (valuePair == null && storeConf.skipNullsForStreamStreamJoins) {
index += 1
```
Do we want to track these skips as well ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org