DataSQRL / sqrl

Flexible development framework for building streaming data applications in SQL with Kafka, Flink, Postgres, GraphQL, and more.
https://www.datasqrl.com/
97 stars 14 forks source link

Add check for to-one path in joins #1005

Open henneberger opened 1 week ago

henneberger commented 1 week ago

If the table is a to-one then we cannot use it in a join, it must use the column path syntax.

For example, this is invalid if details is to-one from events:

MyTable := SELECT *
                     FROM Events c JOIN c.details d;

The workaround is this:

MyTable := SELECT c.*, c.details.*
                     FROM Events c;

We should give a good error message for this case.