You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "experiencedProcrastinator (via GitHub)" <gi...@apache.org> on 2024/09/14 11:05:59 UTC
[I] [Bug]: Incorrect Output for Beam SQL MONTH and YEAR window queries [beam]
experiencedProcrastinator opened a new issue, #32458:
URL: https://github.com/apache/beam/issues/32458
### What happened?
When using a DAY tumble window, the aggregated output is correct. However, when using a MONTH tumble window, all input records pass through without aggregation
I ran the following SQL query using DirectRunner on batch data with:
- window = "'1' DAY"
- window = "'1' MONTH"
Query:
```java
private static String getSQLQuery(String window) {
return String.format("SELECT user_id, SUM(amount) as amount_sum, TUMBLE_START(ts, INTERVAL %s) AS start_ts, TUMBLE_END(ts, INTERVAL %s) AS end_ts from PCOLLECTION group by user_id, TUMBLE(ts, INTERVAL %s)", window, window, window);
}
```
Test code
[beam-test.zip](https://github.com/user-attachments/files/17002017/beam-test.zip)
Input
```json
[
{
"user_id": "user1",
"amount": 100,
"ts": "2022-05-09T12:10:00.00Z"
},
{
"user_id": "user1",
"amount": 200,
"ts": "2022-05-09T12:50:00.00Z"
},
{
"user_id": "user1",
"amount": 500,
"ts": "2022-08-10T11:40:00.00Z"
}
]
```
Output with 1 DAY window:
```
Row:
user_id:user1
amount_sum:300
start_ts:2022-05-09T00:00:00.000Z
end_ts:2022-05-10T00:00:00.000Z
Row:
user_id:user1
amount_sum:500
start_ts:2022-08-10T00:00:00.000Z
end_ts:2022-08-11T00:00:00.000Z
```
Output with 1 MONTH window:
```
Row:
user_id:user1
amount_sum:100
start_ts:2022-05-09T12:10:00.000Z
end_ts:2022-05-09T12:10:00.001Z
Row:
user_id:user1
amount_sum:500
start_ts:2022-08-10T11:40:00.000Z
end_ts:2022-08-10T11:40:00.001Z
Row:
user_id:user1
amount_sum:200
start_ts:2022-05-09T12:50:00.000Z
end_ts:2022-05-09T12:50:00.001Z
```
### Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
### Issue Components
- [ ] Component: Python SDK
- [X] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [ ] Component: IO connector
- [ ] Component: Beam YAML
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Infrastructure
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner
--
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: github-unsubscribe@beam.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug]: Incorrect Output for Beam SQL MONTH and YEAR window queries [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #32458: [Bug]: Incorrect Output for Beam SQL MONTH and YEAR window queries
URL: https://github.com/apache/beam/issues/32458
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug]: Incorrect Output for Beam SQL MONTH and YEAR window queries [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #32458:
URL: https://github.com/apache/beam/issues/32458#issuecomment-3167774173
This issue has been marked as stale due to 150 days of inactivity. It will be closed in 30 days if no further activity occurs. If you think that’s incorrect or this issue still needs to be addressed, please simply write any comment. If closed, you can reopen the issue at any time. Thank you for your contributions.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug]: Incorrect Output for Beam SQL MONTH and YEAR window queries [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #32458:
URL: https://github.com/apache/beam/issues/32458#issuecomment-3266141270
This issue has been closed due to lack of activity. If you think that is incorrect, you can reopen the issue at any time.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org