-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Conversation
@JingsongLi Add a statistic system table for user query, PTAL |
@xuzifu666 Thanks for the contribution, can you add test cases? |
|
paimon-core/src/main/java/org/apache/paimon/table/system/StatisticTable.java
Outdated
Show resolved
Hide resolved
paimon-core/src/main/java/org/apache/paimon/table/system/StatisticTable.java
Outdated
Show resolved
Hide resolved
paimon-core/src/main/java/org/apache/paimon/table/system/StatisticTable.java
Outdated
Show resolved
Hide resolved
|
||
val table = "`T$statistics`" | ||
val df = spark.sql(s"select * from $table") | ||
Assertions.assertEquals(df.collect().size, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why just assert size?
There was a problem hiding this comment.
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`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just inline this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed
+1 |
Support table statistics system table for paimon
Linked issue: #3169
Tests
API and Format
Documentation