Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

The IF function with nested locate function doesn't work in Query Workbench #861

Open
nicolaslledo opened this issue Nov 27, 2020 · 2 comments
Labels

Comments

@nicolaslledo
Copy link

The query

SELECT IF(LOCATE('o', 'hello')>0, 'found', 'no found') AS ifTrue FROM siouxsso* limit 10;

results in ": no response" the result pane

@chloe-zh
Copy link
Member

chloe-zh commented Jan 7, 2021

Hi @nicolaslledo , thanks for reporting this issue! The old engine does not support nested functions in many cases, neither string functions nor conditional functions, even though both locate and if work fine separately. This issue results from the implementation of the functions in the old engine is to push the hard coded painless script to the es engine, but it is ineligible when the functions are nested. The good thing is our new engine is eligible fo nested functions, and the case you mentioned would also be supported once the IF and LOCATE are supported. We will keep you updated when the features are good to release. Thanks!

@dai-chen
Copy link
Member

dai-chen commented Jan 26, 2021

IF function is already added in new query engine. LOCATE function is pending.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants