> .left_join(schema::alert::table.on(view::metric_boundary::boundary_id.eq(schema::alert::boundary_id.nullable())))
instead of
> LEFT OUTER JOIN alert ON (alert.boundary_id = metric_boundary.boundary_id)
> .left_join(schema::alert::table.on(view::metric_boundary::boundary_id.eq(schema::alert::boundary_id.nullable())))
instead of
> LEFT OUTER JOIN alert ON (alert.boundary_id = metric_boundary.boundary_id)
The main thing you left out is the type conversions with plain sql. So a fair comparison would include the e2e flow, imo.
That said, your point is very much valid because of the nested parentheses - I think the main issue is that SQL is an “infix”(?) dsl? It’s strange because Rust has perfectly good proc macros for this type of stuff.
Having strongly typed SQL has prevented these sort of bugs from happening at compile time. The only reason I ran into trouble here was that I went into `unsafe` land without proper precaution. That's on me, not the ORM.
Scala is sometimes dangerously syntax-sweet, but Spark does some things right.