locked
Reference data join with ST_WITHIN , ST_DISTANCE etc. RRS feed

  • Question

  • Hi,

    I've got the following query setup which uses a reference data JOIN from blob storage (zones) against a stream of telemetry with Points stored in loc.loc.

    SELECT t.*
    INTO Output
    FROM telemetry t  
    JOIN zones g ON ST_WITHIN(t.loc.loc, g.l) = 1

    However when I run it I get the following error:-

    Error : Cannot split the join predicate into two key selectors.

    Please make sure reference data JOIN statement includes equality predicate with values from the stream on one side and values from reference data on the other side.

    If I replace the ST_WITHIN with ST_DISTANCE I get the same error, however if I replace either argument to the geospatial functions with a CreatePoint(0,0) call, it succeeds so both sets of data appear to be valid.

    I've tested ref data joins with equality comparisons and these work but geo-spatialfunctions don't seem to.

    Am I doing something wrong?



    Tuesday, August 1, 2017 8:39 PM

All replies

  • You are missing key selectors, like JOIN zones g ON t.id = g.id AND ST_WITHIN

    Going forward you will not need to do this as we are working on a fix - should be deployed soon.

    Wednesday, August 2, 2017 10:04 PM
  • Thanks for the information.  Do you have any idea:- 

    (i) when the fix will be available, and

    (ii) will it mean my query will then work - or will I still not be able to JOIN on reference data this way?

    (and if anyone can tell me why my font here keeps changing size when I delete rows I'd be eternally grateful).

    Monday, August 7, 2017 10:22 AM