You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Julian Hyde <jh...@apache.org> on 2017/08/05 00:01:19 UTC

Cosette - A tool for checking whether SQL statements are equivalent

Cosette is a tool that proves that two SQL statements are equivalent,
or tries to find a counter-example.

https://medium.com/@uwdb/introducing-cosette-527898504bd6

I wonder whether we can use it to make Calcite better? After all, our
rules are supposed to preserve semantics, right?

Julian

Re: Cosette - A tool for checking whether SQL statements are equivalent

Posted by Josh Elser <el...@apache.org>.
On 8/4/17 8:01 PM, Julian Hyde wrote:
> Cosette is a tool that proves that two SQL statements are equivalent,
> or tries to find a counter-example.
> 
> https://medium.com/@uwdb/introducing-cosette-527898504bd6
> 
> I wonder whether we can use it to make Calcite better? After all, our
> rules are supposed to preserve semantics, right?
> 
> Julian
> 

Thanks for sharing the link!

It sounds to me like it would be a good addition (lest the optimizer 
inadvertently modifies a query in a way that returns results the user 
didn't intend).

Re: Cosette - A tool for checking whether SQL statements are equivalent

Posted by Vladimir Sitnikov <si...@gmail.com>.
>I wonder whether we can use it to make Calcite better? After all, our
rules are supposed to preserve semantics, right?

Do you mean something between the lines of:
1) Fuzz-generate a SQL statement
2) Apply Calcite rules
3) Unparse the SQL
4) assertCosetteSqlEqual(originalSql, calciteOptimizedSql)

?

Vladimir