neilramaswamy commented on code in PR #44323:
URL: https://github.com/apache/spark/pull/44323#discussion_r1566227605
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamingSymmetricHashJoinHelper.scala:
##########
@@ -218,11 +222,27 @@ object StreamingSymmetricHashJoinHelper extends Logging {
attributesToFindStateWatermarkFor =
AttributeSet(oneSideInputAttributes),
attributesWithEventWatermark =
AttributeSet(otherSideInputAttributes),
condition,
- eventTimeWatermarkForEviction)
- val inputAttributeWithWatermark =
oneSideInputAttributes.find(_.metadata.contains(delayKey))
- val expr = watermarkExpression(inputAttributeWithWatermark,
stateValueWatermark)
- expr.map(JoinStateValueWatermarkPredicate.apply _)
+ eventTimeWatermarkForEviction
+ )
+
+ val attributesInCondition = AttributeSet(
+ condition.get.collect { case a: AttributeReference => a }
Review Comment:
Comment added.
No, the hierarchy is:
```
Attribute --> AttributeReference --> ColumnarAttributeReference
|
| --> PrettyAttribute (used only for debugging)
```
So it's safe to just use an `AttributeReference` in the collect. We also do
this when we generate the state value watermark predicate:
https://github.com/apache/spark/blob/f3a6ca9e2c476fe418679f82b0c5148d69d0fbda/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/StreamingJoinHelper.scala#L139
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]