-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Added a query param to /tables for getting sorted table names based on time metadata #7142
Added a query param to /tables for getting sorted table names based on time metadata #7142
Conversation
Made the PR ready for Review :) |
f01d7b5
to
ed2adf4
Compare
I have a java specific question 😅
|
...oller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
Outdated
Show resolved
Hide resolved
...oller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
Outdated
Show resolved
Hide resolved
3785188
to
96d57aa
Compare
You can only import one of them, and use the full class path for the other one when accessing it |
...oller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
Outdated
Show resolved
Hide resolved
...oller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #7142 +/- ##
============================================
+ Coverage 73.53% 73.55% +0.02%
Complexity 92 92
============================================
Files 1506 1506
Lines 73801 73832 +31
Branches 10644 10655 +11
============================================
+ Hits 54266 54308 +42
+ Misses 15997 15990 -7
+ Partials 3538 3534 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
...oller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
Outdated
Show resolved
Hide resolved
...oller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
Outdated
Show resolved
Hide resolved
...oller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
Outdated
Show resolved
Hide resolved
...oller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
Outdated
Show resolved
Hide resolved
...oller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
Outdated
Show resolved
Hide resolved
...oller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
Outdated
Show resolved
Hide resolved
...oller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
Outdated
Show resolved
Hide resolved
pinot-spi/src/main/java/org/apache/pinot/spi/config/table/TableStats.java
Outdated
Show resolved
Hide resolved
...oller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
Show resolved
Hide resolved
38c9f87
to
40b6819
Compare
Why should sorting be the function of the API? There are external tools available to sort the results and parse them in various ways. If we need to sort by retention and then by table name, would you then extend the API? I am not in favor of adding more complexity to the API when there is more flexibility doing such operations outside of Pinot. |
@mcvsubbu What external tool are you referring to? IMO listing tables in a cluster sorted with creation time/last modified time is quite common request, and currently there is no easy way to get this info. This is similar to list files within a directory sorted with creation time/last modified time. |
A combination of |
I agree:
|
I still don't see why adding sort type a bad thing to the list table api. If not provided, it will just work as is. Adding it can save lots of effort on the user side |
@Jackie-Jiang Sorry for the confusing, I was assuming there is a
Does it sounds good? |
@mqliang I think it is good to add the list stats API, and I agree it can solve the sorting problem, but I still suggest adding an option in list tables API to sort on common fields because that will be much easier to use. |
Hi @Jackie-Jiang! |
…n time metadata Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
8644ee7
to
1db76ce
Compare
Signed-off-by: Yash Sharma yashrsharma44@gmail.com
Description
Adds a query parameter -
sortType
- for sorting based on name or creation time of table.sortAsc
- sort ascending/descending order - use boolean valuesFixes #6865
Upgrade Notes
Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)
backward-incompat
, and complete the section below on Release Notes)Does this PR fix a zero-downtime upgrade introduced earlier?
backward-incompat
, and complete the section below on Release Notes)Does this PR otherwise need attention when creating release notes? Things to consider:
release-notes
and complete the section on Release Notes)Release Notes
Documentation