[
https://issues.apache.org/jira/browse/BEAM-6632?focusedWorklogId=196236&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-196236
]
ASF GitHub Bot logged work on BEAM-6632:
----------------------------------------
Author: ASF GitHub Bot
Created on: 08/Feb/19 14:29
Start Date: 08/Feb/19 14:29
Worklog Time Spent: 10m
Work Description: LesTR commented on pull request #7785: [BEAM-6632]
Fixes integer overflow for interval >= 25
URL: https://github.com/apache/beam/pull/7785
Fixed interger oveflow for fixed window interval with interval value >= 25
@akedin @apilloud @amaliujia Guys, can you please take a look on this? Thanks
------------------------
Follow this checklist to help us incorporate your contribution quickly and
easily:
- [X ] Format the pull request title like `[BEAM-XXX] Fixes bug in
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA
issue, if applicable. This will automatically link the pull request to the
issue.
- [X ] If this contribution is large, please file an Apache [Individual
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
It will help us expedite review of your Pull Request if you tag someone
(e.g. `@username`) to look at it.
Post-Commit Tests Status (on master branch)
------------------------------------------------------------------------------------------------
Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark
--- | --- | --- | --- | --- | --- | --- | ---
Go | [](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/)
| --- | --- | --- | --- | --- | ---
Java | [](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/)
Python | [](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/)
| --- | [](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/)
</br> [](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PreCommit_Python_PVR_Flink_Cron/lastCompletedBuild/)
| --- | --- | ---
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 196236)
Time Spent: 10m
Remaining Estimate: 0h
> Unable to run Query with TUMBLE interval >= 25 DAY
> --------------------------------------------------
>
> Key: BEAM-6632
> URL: https://issues.apache.org/jira/browse/BEAM-6632
> Project: Beam
> Issue Type: Bug
> Components: dsl-sql
> Affects Versions: 2.9.0
> Reporter: Lukas Drbal
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> I am not able to run query with interval DAY >= 25.
> Example:
> {code:java}
> SELECT f_int2, COUNT(*) AS `getFieldCount`,
> TUMBLE_START(f_timestamp, INTERVAL '31' DAY) AS `window_start`,
> TUMBLE_END(f_timestamp, INTERVAL '31' DAY) AS `window_end`
> FROM TABLE_A
> GROUP BY f_int2, TUMBLE(f_timestamp, INTERVAL '31' DAY)
> {code}
> It result to IllegalArgumentException: FixedWindows WindowingStrategies must
> have 0 <= offset < size
>
> {noformat}
> Caused by: java.lang.IllegalArgumentException: FixedWindows
> WindowingStrategies must have 0 <= offset < size
> at
> org.apache.beam.sdk.transforms.windowing.FixedWindows.<init>(FixedWindows.java:65)
> at
> org.apache.beam.sdk.transforms.windowing.FixedWindows.of(FixedWindows.java:50)
> at
> org.apache.beam.sdk.extensions.sql.impl.rule.BeamAggregationRule.createWindowFn(BeamAggregationRule.java:137)
> at
> org.apache.beam.sdk.extensions.sql.impl.rule.BeamAggregationRule.updateWindow(BeamAggregationRule.java:77)
> at
> org.apache.beam.sdk.extensions.sql.impl.rule.BeamAggregationRule.onMatch(BeamAggregationRule.java:59)
> at
> org.apache.beam.repackaged.beam_sdks_java_extensions_sql.org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:212){noformat}
> Looks like Integer overflow in
> [BeamAggregationRule.java#L184|[https://github.com/apache/beam/blob/master/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rule/BeamAggregationRule.java#L184].]
> Solution should be simple: getting long value from RexNode.
>
> I can create PR and TestCase for this bug.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)