cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

Parsed Logical Plan report UnresolvedHint RANGE_JOIN

hukel
Contributor

I'm new to RANGE_JOIN so this may be completely normal, but I'd like confirmation.

Whenever I put a RANGE_JOIN hint in my query

 

SELECT    /*+ RANGE_JOIN(pr2, 3600) */  
     event.FirstIP4Record    
FROM SCHEMA_NAME_HERE.dnsrequest event
INNER JOIN SCHEMA_NAME_HERE.processrollup2 pr2 ON 
       (pr2.timestamp BETWEEN dateadd(HOUR, -2 , event.timestamp) AND event.timestamp)
   AND event.aid=pr2.aid
   AND event.ContextProcessId=pr2.TargetProcessId

 

I get this message in the Parsed Logical plan, even though I see a "Generate rangejoinbingenerator" step down in the physical plan.

== Parsed Logical Plan ==
'UnresolvedHint RANGE_JOIN, ['pr2, 3600]
+- 'Project ['event.FirstIP4Record]

1 REPLY 1

shan_chandra
Databricks Employee
Databricks Employee

@hukel  - The query above does not have a range join, the range filter is not a join condition and it is evaluated as a regular filter.  Please refer to the criteria on range join optimization for joins. 

  • Have a condition that can be interpreted as a point in interval or interval overlap range join.

  • All values involved in the range join condition are of a numeric type (integral, floating point, decimal), DATE, or TIMESTAMP.

  • All values involved in the range join condition are of the same type. In the case of the decimal type, the values also need to be of the same scale and precision.

  • It is an INNER JOIN, or in case of point in interval range join, a LEFT OUTER JOIN with point value on the left side, or RIGHT OUTER JOIN with point value on the right side.

 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group