gojumprope opened a new issue, #23466:
URL: https://github.com/apache/doris/issues/23466

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   2.0.0
   
   ### What's Wrong?
   
   SQL Error [1105] [HY000]: errCode = 2, detailMessage = 
(xx.xx.xxx.xxx)[CANCELLED][RUNTIME_ERROR]funciton context for function 'in' 
must have Set;
   
   ### What You Expected?
   
   Able to query when filter multiple value in where condition.
   Error message "funcition" should be "function" too.
   
   ### How to Reproduce?
   
   -- error
   SELECT * FROM (
        WITH temptable as (
                SELECT 1 Id, '2023-08-25 00:00:00' UpdateDateTime, 10 Value
                UNION
                SELECT 1 Id, '2023-08-25 01:00:00' UpdateDateTime, 20 Value
        )
        SELECT temptable.Id, temptable.UpdateDateTime, temptable.Value, 
rolling.RollingValue FROM temptable 
        LEFT JOIN (
                SELECT Id, UpdateDateTime, SUM(Value) OVER (PARTITION BY 
CAST(UpdateDateTime AS DATE) ORDER BY UpdateDateTime) AS RollingValue
                FROM temptable 
                GROUP BY Id, UpdateDateTime, Value
        ) rolling ON temptable.Id = rolling.Id AND temptable.UpdateDateTime = 
rolling.UpdateDateTime 
   ) tab
   WHERE Id IN (1, 2)
   
   
   -- no error
   SELECT * FROM (
        WITH temptable as (
                SELECT 1 Id, '2023-08-25 00:00:00' UpdateDateTime, 10 Value
                UNION
                SELECT 1 Id, '2023-08-25 01:00:00' UpdateDateTime, 20 Value
        )
        SELECT temptable.Id, temptable.UpdateDateTime, temptable.Value, 
rolling.RollingValue FROM temptable 
        LEFT JOIN (
                SELECT Id, UpdateDateTime, SUM(Value) OVER (PARTITION BY 
CAST(UpdateDateTime AS DATE) ORDER BY UpdateDateTime) AS RollingValue
                FROM temptable 
                GROUP BY Id, UpdateDateTime, Value
        ) rolling ON temptable.Id = rolling.Id AND temptable.UpdateDateTime = 
rolling.UpdateDateTime 
   ) tab
   WHERE Id IN (1)
   
   
   -- no error
   SELECT * FROM (
        WITH temptable as (
                SELECT 1 Id, '2023-08-25 00:00:00' UpdateDateTime, 10 Value
                UNION
                SELECT 1 Id, '2023-08-25 01:00:00' UpdateDateTime, 20 Value
        )
        SELECT temptable.Id, temptable.UpdateDateTime, temptable.Value, 
rolling.RollingValue FROM temptable 
        LEFT JOIN (
                SELECT Id, UpdateDateTime, SUM(Value) OVER (PARTITION BY 
CAST(UpdateDateTime AS DATE) ORDER BY UpdateDateTime) AS RollingValue
                FROM temptable 
                GROUP BY Id, UpdateDateTime, Value
        ) rolling ON temptable.Id = rolling.Id AND temptable.UpdateDateTime = 
rolling.UpdateDateTime 
   ) tab
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscr...@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to