Skip to content

[FLINK-12288] [table-planner-blink] Bump Calcite dependency to 1.19.0 in blink planner#8234

Closed
wuchong wants to merge 2 commits intoapache:masterfrom
wuchong:bump-calcite
Closed

[FLINK-12288] [table-planner-blink] Bump Calcite dependency to 1.19.0 in blink planner#8234
wuchong wants to merge 2 commits intoapache:masterfrom
wuchong:bump-calcite

Conversation

@wuchong
Copy link
Member

@wuchong wuchong commented Apr 22, 2019

What is the purpose of the change

Bump Calcite dependency to 1.19.0 in flink-table-planner-blink module.

Brief change log

  • Upgrade version in flink-table-planner-blink/pom.xml
  • Update FlinkRelOptTable to implement new interface method.
  • Update plan tests to adapt to CALCITE-2454 changes.

Verifying this change

no new tests added.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable)

@flinkbot
Copy link
Collaborator

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.

Details
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

+- LogicalProject(i=[$0], k=[$1])
+- LogicalTableScan(table=[[MyTable4, source: [TestTableSource(i, k)]]])
+- LogicalProject(i=[$0], k=[$1])
+- LogicalTableScan(table=[[MyTable4, source: [TestTableSource(i, k)]]])
Copy link
Member Author

Choose a reason for hiding this comment

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

It seems that Calcite removes LogicalSort in the initial RelNode tree. And it makes sense.

@godfreyhe
Copy link
Contributor

Didn't any plans be changed in flink-planner? I note all changed plans are in blink-planner.

@wuchong
Copy link
Member Author

wuchong commented Apr 23, 2019

Hi @godfreyhe , I only changed Calcite version in blink planner. Flink planner is still using 1.18.0.

<artifactId>calcite-core</artifactId>
<!-- When updating the Calcite version, make sure to update the dependency exclusions -->
<version>1.18.0</version>
<version>1.19.0</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

@wuchong Has Calcite changed any dependencies in the last release? Please verify if the shading/exclusions are still correct. Thanks.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I have verified it. mvn dependency:tree outputs the same tree as before.

@twalthr
Copy link
Contributor

twalthr commented Apr 23, 2019

@walterddr fyi: this might be useful for the Flink planner Calcite upgrade as well.

Copy link
Contributor

@walterddr walterddr left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @wuchong . this would definitely also help on the table-planner side calcite upgrade.

Just left one comment regarding timestamp type. otherwise lgtm

<Resource name="planAfter">
<![CDATA[
Calc(select=[a, CAST(1984-07-12) AS b, CAST(14:34:24) AS c, CAST(1984-07-12 14:34:24) AS d], where=[AND(=(b, 1984-07-12), =(c, 14:34:24), =(d, 1984-07-12 14:34:24))])
Calc(select=[a, CAST(1984-07-12) AS b, CAST(14:34:24) AS c, CAST(1984-07-12 14:34:24:TIMESTAMP(3)) AS d], where=[AND(=(b, 1984-07-12), =(c, 14:34:24), =(d, 1984-07-12 14:34:24:TIMESTAMP(3)))])
Copy link
Contributor

Choose a reason for hiding this comment

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

I observe something weird upon comparing calcite 1.16/17/18/19 on this (not yet on 19) seems like the timestamp type representation is bouncing here and there a lot. do you think this is solely just the serialization (print string) changes or actually there's some changes to the underlying type? as this might be problematic.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @walterddr , what do you mean "timestamp type representation is bouncing here and there a lot"?

Copy link
Contributor

Choose a reason for hiding this comment

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

@walterddr I think the reason is the modify of RexLiteral.toJavaString in apache/calcite#1002 , The Timestamp default precision is 3, I think it hasn't changed.

Copy link
Contributor

Choose a reason for hiding this comment

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

looks like it. what I meant is that I've been changing the test cases string literals back and forth for some of the pass calcite upgrades. Seems like not an issue then.

@godfreyhe
Copy link
Contributor

LGTM, +1 to merge

@wuchong
Copy link
Member Author

wuchong commented Apr 24, 2019

Thanks @godfreyhe .

Hi @walterddr @twalthr @KurtYoung , I will merge this if you have no other comments.

@wuchong
Copy link
Member Author

wuchong commented Apr 24, 2019

Merging...

@asfgit asfgit closed this in b4a3738 Apr 24, 2019
@wuchong wuchong deleted the bump-calcite branch April 24, 2019 08:59
tianchen92 pushed a commit to tianchen92/flink that referenced this pull request May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants