WangYa002 commented on issue #59692:
URL: https://github.com/apache/doris/issues/59692#issuecomment-3767724513

   你好,你这个问题和https://github.com/apache/doris/pull/53291. 
本质是一样的,你可以考虑更新版本,如果版本更新后解决了问题,你是否可以给我一个PR。
   You can try the following workarounds to bypass this check:
   
   Method 1: Explicit Type Casting Try explicitly casting the string literals 
to JSON. This can sometimes help the optimizer handle the types correctly:
   
   SQL
   
   SELECT JSON_CONTAINS(CAST('["1","2"]' AS JSON), CAST('"1"' AS JSON));
   Method 2: Force Runtime Evaluation (Recommended) Wrap the parameters with a 
function like concat (adding an empty string). This tricks the optimizer into 
treating the parameters as dynamic expressions rather than constant literals, 
forcing the database to evaluate them at runtime:
   
   SQL
   
   -- Append an empty string so it is not treated as a pure literal
   SELECT JSON_CONTAINS(concat('', '["1","2","3"]'), '"1"');
   Please let me know if these workarounds work for your specific query.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to