osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DISCUSS] Problem with 'assert' ignored in production, leading to inconsistent query results


If you have a problem with code behaving differently in production,
let's take out the assert.

You (or we) screwed up. The input promised that it was sorted, but it
wasn't. We can't afford to check assumptions in performance-critical
code.

I'm sorry that it took a long time to debug. But don't blame the messenger.

Julian

On Fri, Sep 21, 2018 at 9:14 AM Vladimir Sitnikov
<sitnikov.vladimir@xxxxxxxxx> wrote:
>
> +1 for converting that assert to exception with the relevant text.
>
> https://issues.apache.org/jira/browse/CALCITE-1890 would probably help
> there to identify the relation in question (Enumerable.toString can be
> added to exception message).
>
> On the other hand, I don't think we should enable expensive checks by
> default.
>
> Vladimir