SQL filter - empty parameter substitution

Hi,

I have a problem with sql filter.
When I use Filter field all empty parameters are replaced by “1=1”. This is acceptable with AND in WHERE formula but not with OR.

SELECT *
FROM team_iteration_with_prediction
WHERE
team_id = 22499
AND
( is_current is true
[[ OR {{sprint}} ]])

This is from log:
PARAMS/SUBSTITUTED: :heart_eyes_cat:
{:native {:query “SELECT * FROM team_iteration_with_prediction WHERE team_id = 22499 AND ( is_current is true OR 1 = 1 )”, :params ()}}

Is there any chance to delete whole optional clause instead of this insane substitution?

Thank you