Hi, I am following the PopularPlacesSQL example ( http://training.data-artisans.com/exercises/popularPlacesSql.html), but I am unable to understand why the following statement will pickup events with START flag only.
"SELECT " + "toCoords(cell), wstart, wend, isStart, popCnt " + "FROM " + "(SELECT " + "cell, " + "isStart, " + "HOP_START(eventTime, INTERVAL '5' MINUTE, INTERVAL '15' MINUTE) AS wstart, " + "HOP_END(eventTime, INTERVAL '5' MINUTE, INTERVAL '15' MINUTE) AS wend, " + "COUNT(isStart) AS popCnt " + "FROM " + "(SELECT " + "eventTime, " + "isStart, " + "CASE WHEN isStart THEN toCellId(startLon, startLat) ELSE toCellId(endLon, endLat) END AS cell " + "FROM TaxiRides " + "WHERE isInNYC(startLon, startLat) AND isInNYC(endLon, endLat)) " + "GROUP BY cell, isStart, HOP(eventTime, INTERVAL '5' MINUTE, INTERVAL '15' MINUTE)) " + "WHERE popCnt > 20" Since we can update state in processElement when we do it with low level ProcessFunction, how does SQL rule out the un-paired events? This is a UTF-8 formatted mail ----------------------------------------------- James C.-C.Yu +886988713275