In query editor, add the possibility to use expression as filter

Expressions are considered as columns. But what if it was possible to create our own filters as expressions, it means you can’t select it (no checkbox) but you can use it as filter.

So when you drag and drop it in the filter area, no comparison item is proposed, it’s just the filter and nothing else.

This would enable to force our own filters. For example when easymorph uses oracle dates, it casts it into timestamp which is not good. So with filter expression we could do MY_DATE = TO_DATE(…) without the timestamp cast and without any more comparison to do.

Other possible solution : the possibility to deactivate on fields all the possible functions applied by easymorph, which means for example avoid cast on date column, and avoid timestamp on date value (deactivation in both sides of comparison). Or at least this possibility but on date formats only. Could be an option on connector level.

Hi Romain,

As a temporary workaround you can create an expression like the following:

CASE WHEN MY_DATE = TO_DATE(…) THEN 1 ELSE 0 END

and then filter the expression.

As a more user-friendly solution we were thinking about adding something like a “Custom” condition:
image

What do you think about this approach?

I tried the « case when » but it’s failing the query plan too. The custom filter is a very good idea.

Hi Andrew, can you confirm this feature is planned for next version or for future version ? I mean we would prefer not having this timestamp function that is highly decreasing performance but Custom is a nice way to bypass this.

It is also a way for users to do what they want by typing simple code. It’s very important that Custom SQL can handle parameters as it is described in my previous post (screenshot).

I’m surprised no one spotted this among oracle users. As soon as you have oracle table with date field as key, performance are really bad with timestamp function, as generated by Easymorph query editor.

Hi Romain,

I confirm that the custom condition is planned for release in v4.6.

1 Like