Skip to content

CREATE WATCHER … FROM a JOIN b ON … parses the JOIN and then silently discards it #191

Description

@fupelaqu

Discovered while implementing story R1FIX.6 (routing fix for softclient4es-arrow#130).

Parser.scala:748-755 builds SearchWatcherInput(f.tables.map(_.name).distinct, w.flatMap(_.criteria), t), and SearchWatcherInput (sql/.../watcher/WatcherInput.scala:50-54) is (index: Seq[String], query: Option[Criteria], timeout). FromParser.scala:81-84 does build a StandardJoin (:61-74), so the statement parses and the join is then thrown away — the watcher watches only the first table, with no error and no warning.

Before R1FIX.6 this was masked: JoinDetector.classify mis-routed the statement to the cross-index JOIN engine, which rejected it loudly (with the wrong message — it blamed "Federation"). R1FIX.6 makes the routing correct, which correctly exposes the underlying grammar gap. The net effect is that a loud, wrongly-worded error becomes a silent wrong answer, which is why this is being filed rather than shipped quietly.

Two acceptable resolutions:

  • reject JOIN in a watcher FROM at parse/validate time with a clear message, or
  • implement it.

The current silent drop is the one option that must not stand.

Refs: SoftClient4ES epic epic-r1-defect-closure-stories.md, story R1FIX.6 §V-7 and PD-3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions