Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Feature] Support statistics system table for paimon #3172

Merged
merged 27 commits into from
Apr 10, 2024

Conversation

xuzifu666
Copy link
Member

Support table statistics system table for paimon

Linked issue: #3169

Tests

API and Format

Documentation

@xuzifu666
Copy link
Member Author

xuzifu666 commented Apr 8, 2024

@JingsongLi Add a statistic system table for user query, PTAL

@xuzifu666 xuzifu666 changed the title [Feature] Support table statistics system table for paimon [Feature] Support statistics system table for paimon Apr 8, 2024
@Zouxxyy
Copy link
Contributor

Zouxxyy commented Apr 9, 2024

@xuzifu666 Thanks for the contribution, can you add test cases?

@xuzifu666
Copy link
Member Author

xuzifu666 commented Apr 9, 2024

@xuzifu666 Thanks for the contribution, can you add test cases?
OK,had add a ut for it @Zouxxyy

@xuzifu666
Copy link
Member Author

xuzifu666 commented Apr 9, 2024

With the pr user can query like select * from T$statistic and result as
1712663690500.png


val table = "`T$statistics`"
val df = spark.sql(s"select * from $table")
Assertions.assertEquals(df.collect().size, 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why just assert size?

Copy link
Member Author

@xuzifu666 xuzifu666 Apr 10, 2024

Choose a reason for hiding this comment

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

Had added assert details in ut, Thanks @JingsongLi


spark.sql(s"ANALYZE TABLE T COMPUTE STATISTICS")

val table = "`T$statistics`"
Copy link
Contributor

Choose a reason for hiding this comment

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

Just inline this

Copy link
Member Author

Choose a reason for hiding this comment

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

addressed

@JingsongLi
Copy link
Contributor

+1

@JingsongLi JingsongLi merged commit 82144ef into apache:master Apr 10, 2024
9 checks passed
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