What is the bug?
The version of Calcite was updated to 1.41.0 in #4714 .
Streamstats command was implemented in #4297 .
These complex use cases worked in the former version of Calcite, but now failed.
"query": """
source=stream_test_null | streamstats window=2 avg(age) as avg_age by state, country | streamstats window=2 avg(avg_age) as avg_state_age by country
"""
POST _plugins/_ppl
{
"query": """
source=stream_test_null | streamstats reset_before=age>20 avg(age) as avg_age | streamstats reset_before=avg_age>20 window=2 avg(avg_age) as avg_state_age by country
"""
}
POST _plugins/_ppl
{
"query": """
source=stream_test_null | streamstats reset_before=age>22 avg(age) as avg_age | streamstats window=2 avg(avg_age) as avg_state_age by country
"""
It is caused by a NPE. But I still not find the exact reason in the Calcite code.
How can one reproduce the bug?
Steps to reproduce the behavior:
Set data:
POST stream_test_null/_bulk?refresh=true
{"index":{"_id":"1"}}
{"name":"Jake","age":70,"state":"California","country":"USA","year":2023,"month":4}
{"index":{"_id":"2"}}
{"name":"Hello","age":30,"state":"New York","country":"USA","year":2023,"month":4}
{"index":{"_id":"3"}}
{"name":"John","age":25,"state":"Ontario","country":"Canada","year":2023,"month":4}
{"index":{"_id":"4"}}
{"name":"Jane","age":20,"state":"Quebec","country":"Canada","year":2023,"month":4}
{"index":{"_id":"5"}}
{"name":null,"age":10,"state":null,"country":"Canada","year":2023,"month":4}
{"index":{"_id":"6"}}
{"name":"Kevin","year":2023,"month":4}
Then do the query.
What is the expected behavior?
A clear and concise description of what you expected to happen.
What is your host/environment?
- OS: [e.g. iOS]
- Version [e.g. 22]
- Plugins
Do you have any screenshots?
Do you have any additional context?
Add any other context about the problem.
What is the bug?
The version of Calcite was updated to 1.41.0 in #4714 .
Streamstatscommand was implemented in #4297 .These complex use cases worked in the former version of Calcite, but now failed.
It is caused by a NPE. But I still not find the exact reason in the Calcite code.
How can one reproduce the bug?
Steps to reproduce the behavior:
Set data:
Then do the query.
What is the expected behavior?
A clear and concise description of what you expected to happen.
What is your host/environment?
Do you have any screenshots?
Do you have any additional context?
Add any other context about the problem.