Skip to content

Conversation

@haoyuan
Copy link
Contributor

@haoyuan haoyuan commented Jan 27, 2020

Co-authored-by: David Zhu david@alluxio.com

Please make sure your submission complies with our Development, Formatting, and Commit Message guidelines.

Fill in the release notes towards the bottom of the PR description.
See Release Notes Guidelines for details.

== RELEASE NOTES ==

Hive Changes
*  Add statistics handling to the Alluxio metastore support

@haoyuan haoyuan requested a review from highker January 27, 2020 20:33
Copy link

@highker highker left a comment

Choose a reason for hiding this comment

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

nits

Copy link

Choose a reason for hiding this comment

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

statisticsObj -> statisticsInfo

Copy link

Choose a reason for hiding this comment

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

nit

Table table = getTable(databaseName, tableName).orElseThrow(() -> new TableNotFoundException(new SchemaTableName(databaseName, tableName)));

Copy link

Choose a reason for hiding this comment

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

  • spell out colStatsMap
  • null assignment is useless

Copy link

Choose a reason for hiding this comment

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

one param per line

Copy link

Choose a reason for hiding this comment

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

break a line

@yuzhu
Copy link
Contributor

yuzhu commented Jan 28, 2020

@highker comments addressed. Thanks!

@haoyuan haoyuan requested a review from highker January 28, 2020 00:58
Copy link

@highker highker left a comment

Choose a reason for hiding this comment

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

some comments

Copy link

Choose a reason for hiding this comment

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

No need to have this. Use makePartName from MetastoreUtil instead of FileUtils.makePartName

Copy link

Choose a reason for hiding this comment

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

move this closer to where it is used.

Copy link

Choose a reason for hiding this comment

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

break line after this

Copy link

Choose a reason for hiding this comment

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

columnStatistics

Copy link

Choose a reason for hiding this comment

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

basicStatistics

Copy link

Choose a reason for hiding this comment

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

the formatting is not aligned

            columnStats = client.getPartitionColumnStatistics(
                    table.getDatabaseName(),
                    table.getTableName(),
                    partitionBasicStatistics.keySet().stream().collect(toImmutableList()),
                    dataColumns);

Copy link

Choose a reason for hiding this comment

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

Is alluxio metastore a thrift-based metastore? If not, shall we restructure the util classes so that this class does not depend on ThriftMetastoreUtil? MetastoreUtil might be the right place to host some helpers.

Copy link

Choose a reason for hiding this comment

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

Move private functions to the end of a class. Move public ones to the beginning.

Copy link

Choose a reason for hiding this comment

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

redundant

Copy link

Choose a reason for hiding this comment

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

move to metastoreutil

@haoyuan haoyuan requested a review from rongrong January 28, 2020 18:34
@haoyuan haoyuan requested a review from highker January 31, 2020 00:44
@yuzhu yuzhu force-pushed the stats branch 3 times, most recently from 22684d1 to 819acc4 Compare January 31, 2020 15:56
Copy link

@highker highker left a comment

Choose a reason for hiding this comment

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

one minor comment; otherwise lgtm

Copy link

Choose a reason for hiding this comment

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

Same, it's better not to depend on thrift utils for non-thrift metastore.

Co-authored-by: David Zhu <david@alluxio.com>
Copy link

@highker highker left a comment

Choose a reason for hiding this comment

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

lgtm

@highker highker merged commit 05310b7 into prestodb:master Feb 2, 2020
@caithagoras caithagoras mentioned this pull request Feb 20, 2020
8 tasks
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.

3 participants