Skip to content

Simplify athena partition projection code#19807

Merged
dain merged 18 commits intotrinodb:masterfrom
dain:simplify-athena-partition-projection
Nov 18, 2023
Merged

Simplify athena partition projection code#19807
dain merged 18 commits intotrinodb:masterfrom
dain:simplify-athena-partition-projection

Conversation

@dain
Copy link
Copy Markdown
Member

@dain dain commented Nov 17, 2023

Description

This is a large clean up of the partition projection codebase, but does not change the behavior. This change removes unnecessary abstractions and utility methods. and simplifies the codebase by removing complex uses of streaming api. Additionally, the entry point is moved from a metastore decorator to the Hive metastore closure.

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

dain added 4 commits November 17, 2023 15:24
ProjectionFactory implementations are simple stateless classes, and new
implementations can not be added due to the mapping to a Java enum, so
the multibinder it not needed.
@dain dain requested a review from electrum November 17, 2023 23:27
@cla-bot cla-bot bot added the cla-signed label Nov 17, 2023
@github-actions github-actions bot added tests:hive hive Hive connector labels Nov 17, 2023
@dain dain force-pushed the simplify-athena-partition-projection branch from ff1dfae to f3705cd Compare November 18, 2023 00:42
package io.trino.plugin.hive;

import com.google.common.collect.ImmutableList;
import io.trino.plugin.hive.aws.athena.projection.ProjectionType;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We could move this to a top level io.trino.plugin.hive.projection package. The two classes in aws need to be moved to the metastore.glue package anyway.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could use .formatted() for all of these

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The formatting seems off when doing that due to the long error messages in this code base

@dain dain force-pushed the simplify-athena-partition-projection branch from f3705cd to 8725617 Compare November 18, 2023 08:05
@dain dain merged commit c3e1475 into trinodb:master Nov 18, 2023
@dain dain deleted the simplify-athena-partition-projection branch November 18, 2023 17:13
@github-actions github-actions bot added this to the 434 milestone Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed hive Hive connector

Development

Successfully merging this pull request may close these issues.

2 participants