cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
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.

 

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now