Skip to content

[BEAM-12853] VALUES produces a UNION, window can't be set afterwards#15469

Merged
apilloud merged 1 commit intoapache:masterfrom
apilloud:12853
Sep 7, 2021
Merged

[BEAM-12853] VALUES produces a UNION, window can't be set afterwards#15469
apilloud merged 1 commit intoapache:masterfrom
apilloud:12853

Conversation

@apilloud
Copy link
Member

@apilloud apilloud commented Sep 7, 2021

This mitigates a bug in the PubSubTableProvider exposed by the calcite upgrade.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • 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.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

ValidatesRunner compliance status (on master branch)

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- Build Status Build Status Build Status Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Python --- Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status ---
XLang Build Status Build Status Build Status Build Status Build Status ---

Examples testing status on various runners

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- --- --- --- --- --- ---
Java --- Build Status
Build Status
Build Status
--- --- --- --- ---
Python --- --- --- --- --- --- ---
XLang --- --- --- --- --- --- ---

Post-Commit SDK/Transform Integration Tests Status (on master branch)

Go Java Python
Build Status Build Status Build Status
Build Status
Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status Build Status --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

@apilloud
Copy link
Member Author

apilloud commented Sep 7, 2021

R: @ibzib

Copy link

@ibzib ibzib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea why this test passed before?

@apilloud
Copy link
Member Author

apilloud commented Sep 7, 2021

Before the calcite upgrade this plan was produced:

    BeamIOSinkRel(table=[[beam, message]], operation=[INSERT], flattened=[true])
      LogicalValues(tuples=[[{ 1970-01-01 00:00:00.001, 'person1', 80, true }, { 1970-01-01 00:00:00.002, 'person2', 70, false }]])

After the calcite upgrade this plan was produced:

    BeamIOSinkRel(table=[[beam, message]], operation=[INSERT], flattened=[true])
      LogicalUnion(all=[true])
        LogicalProject(EXPR$0=[1970-01-01 00:00:00.001:TIMESTAMP(6)], EXPR$1=['person1'], EXPR$2=[80], EXPR$3=[true])
          LogicalValues(tuples=[[{ 0 }]])
        LogicalProject(EXPR$0=[1970-01-01 00:00:00.002:TIMESTAMP(6)], EXPR$1=['person2'], EXPR$2=[70], EXPR$3=[false])
          LogicalValues(tuples=[[{ 0 }]])

The LogicalUnion gets turned into BeamUnionRel, which eventually becomes a CoGroup. Calcite could probably produce a simpler plan (we'd need to write or enable some more optimizer rules) but PubSubTableProvider is also broken here (it shouldn't depend on the pipeline not containing a CoGroup).

Copy link

@ibzib ibzib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@apilloud apilloud merged commit 0fc4ffd into apache:master Sep 7, 2021
@apilloud apilloud deleted the 12853 branch September 7, 2021 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants