K2InformaticsGmbH / dderl

Web based Data Explorer / Data Jump Station with Erlang In-Memory Support
Apache License 2.0
23 stars 12 forks source link

filter in SQL not correctly handled on user error #548

Open tgdriph3 opened 6 years ago

tgdriph3 commented 6 years ago

When a filter is set on a numeric field for 'in' and the values are set to ENTER<> (e.g. the user has simply hit enter and not entered a second value to filter for) [see Picture]filter-with-empty ... this get's translated to

where x in (1200143811, )

instead of

where x in (1200143811)

or 

where x = 1200143811

This may lead to a wrong result or SQL Parser error, especially when executing the query on a Oracle / Oracle like database. Same is valid for string based values, there the translation is done to

where x in ('Test','')
acautin commented 5 years ago

@tgdriph3 this is not a bug as there it allows to filter for empty strings which wouldn't it be possible otherwise. cc @stoch