Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[sql] Upgrade PrestoSQL to the first Trino version #16683

Merged
merged 19 commits into from
Aug 8, 2022

Conversation

tisonkun
Copy link
Member

@tisonkun tisonkun commented Jul 19, 2022

Motivation

See also previous discussion at https://lists.apache.org/thread/mflm0pb5235jjk80vol0vs7v0hvowkq8.

Instead of firstly create a pulsar-sql repository and highly possibly leave it uncompleted, the original pain points of maintaining Pulsar SQL (a.k.a. Pulsar Presto Connector) are:

  1. Pulsar (All) docker image is too large.
  2. PrestoSQL version is too old and pollutes old dependencies.

Thus, I'd suggest we continuously kaizen the situation by upgrading version and decouple modules. When moving out the codebase to another repository a trivial step, we consider to do it.

This patch is a small step to upgrade PrestoSQL to the first Trino version which supports Apple M1, and it contains most of the renaming work.

After this change, if users running sql worker with pulsar provided scripts, the experience should be as usual. But people directly depend on pulsar-presto-connector will find the dependency is switched to Trino. I'm unsure whether or not I should write a PIP of this kaizen way.

I'll treat this change at the earliest in 2.12 release train and don't rush things.

Modifications

  1. Update dependencies in pom.xml from io.prestosql to io.trino.
  2. Update prestosql in code to trino.

Fortunately, the breaking changes mentioned in #16494 aren't included in this version bump.

  1. Fix timestamp breaking changes in trinodb/trino@21e3ddf and trinodb/trino@19811d3. This exists in the first Trino version (351).
  2. Update joda-time to 2.10.10 to catch up Trino 363's requirement, see 848e66f in details.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests. We should keep all existing test passed.

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

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes)

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed

It should be required. But leave it as is to verify CI first.

tisonkun added 3 commits July 19, 2022 21:05
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jul 19, 2022
tisonkun added 6 commits July 19, 2022 23:40
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Otherwise trino-testing will throw Exception before running test cases.

Signed-off-by: tison <wander4096@gmail.com>
See also:

* trinodb/trino@21e3ddf
* trinodb/trino@19811d3

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Get America/Nuuk alike timezone. This version is required by trino.

See also https://twitter.com/raphaelschaad/status/1488584437197586432.

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun tisonkun force-pushed the prestosql-to-trino branch from db164cc to 848e66f Compare July 21, 2022 00:31
@tisonkun tisonkun marked this pull request as ready for review July 21, 2022 03:30
@tisonkun
Copy link
Member Author

tisonkun commented Jul 21, 2022

This patch should be technically completed.

cc @merlimat @lhotari @MarvinCai if you have spare time, please read the description above and see what direction is good to go. Or if we should go back to the mailing list to continue the discussion.

@tisonkun
Copy link
Member Author

/pulsarbot run-failure-checks

1 similar comment
@tisonkun
Copy link
Member Author

/pulsarbot run-failure-checks

@tisonkun
Copy link
Member Author

tisonkun commented Jul 23, 2022

If we can upgrade prestosql to trino, we may have an opportunity to move conf/presto to trino/conf and lib/presto/* to trino/*, so that we can later smoothly move out the Pulsar SQL components.

Copy link
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

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

👍 Great work!

@merlimat merlimat added this to the 2.11.0 milestone Jul 23, 2022
tisonkun added 2 commits July 25, 2022 17:50
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Member Author

Thank @merlimat for review! I push a new commit to fix license issues. Our CI doesn't check binary licenses of Pulsar SQL, though. It can be a separated issue to resolve and here is #16783.

cc @MarvinCai @lhotari @codelipenghui perhaps you can also give a review on this patch and decide how to move forward?

@tisonkun

This comment was marked as outdated.

@codelipenghui codelipenghui removed this from the 2.11.0 milestone Jul 26, 2022
@codelipenghui codelipenghui added this to the 2.12.0 milestone Jul 26, 2022
@tisonkun
Copy link
Member Author

/pulsarbot run-failure-checks

1 similar comment
@tisonkun
Copy link
Member Author

/pulsarbot run-failure-checks

@tisonkun
Copy link
Member Author

I think all required tasks have passed.

tisonkun added 4 commits July 27, 2022 17:14
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Member Author

/pulsarbot run-failure-checks

1 similar comment
@tisonkun
Copy link
Member Author

/pulsarbot run-failure-checks

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area/sql Pulsar SQL related features doc-not-needed Your PR changes do not impact docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants