-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
fix: row limits & row count labels are confusing #27700
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #27700 +/- ##
==========================================
+ Coverage 67.38% 69.82% +2.43%
==========================================
Files 1920 1920
Lines 75242 75247 +5
Branches 8423 8423
==========================================
+ Hits 50705 52544 +1839
+ Misses 22476 20642 -1834
Partials 2061 2061
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
8031451
to
58cee23
Compare
This has definitely caused confusion over the years. Great initiative @mistercrunch ! |
6a1f175
to
ac1d5f7
Compare
ac1d5f7
to
5a5151c
Compare
c73f320
to
1e3153f
Compare
/testenv up |
@eschutho Ephemeral environment spinning up at http://35.162.20.252:8080. Credentials are |
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.
Looks good and it's a great improvement!
I wonder if we should standardize the name, though, using sql_rowcount
in the backend and something like sqlRowCount
in the frontend? (instead of just rowcount
)
Yeah I wasn't sure either and there was not clear pattern established for me to follow. Looked that the person who wrote the code before went out of their way to go flat-case (coltypes, colnames, rowcount, ....). I'm not sure what best practices are and what the most common on our repo is. If I was to take on more refactoring I think i'd tackle something around grouping objects under say a |
Currently, in explore & dashboard, we usually apply a row limit on the query we issue against the database. Following this, some visualization backend code does some post-processing on data frames using pandas, typically pivoting some things, which affects the result set's row count in intricate capacities. Now from a UX standpoint the user is exposed with: - row limits in the control panels - row count in various areas of the UI where visualiztion, preview, samples and raw results are shown Currently we show the rowcount that's from row-processing. So maybe a hard limit was applied at 1000 rows on the database, but we pivot and it goes does to say 532, and we show the user that we haven't hit the limit when we actually did. Also note that the component that shows rowcount is supposed to turn red if limit is hit, letting the user know they are looking at truncated data.
e5de7e1
to
d4a2598
Compare
Ephemeral environment shutdown and build artifacts deleted. |
(cherry picked from commit 12fe292)
SUMMARY
Currently, in explore & dashboard, we usually apply a row limit
on the query we issue against the database.
Following this, some visualization backend code does some
post-processing on data frames using pandas, typically pivoting
some things, which affects the result set's row count in
intricate capacities.
Now from a UX standpoint the user is exposed with:
samples and raw results are shown
Currently we show the rowcount that's from row-processing. So maybe
a hard limit was applied at 1000 rows on the database, but we
pivot and it goes does to say 532, and we show the user that
we haven't hit the limit when we actually did.
Also note that the component that shows rowcount is supposed
to turn red if limit is hit, letting the user know they are looking at
truncated data.
This PR carries the right row count to the
RowCountLabel
above the visualization in explore so that it can turn red if the limit is reached reliably.For now, this PR does not do anything new around the other RowCountLabel located in the
RESULTS
(south) pane. This area show the post-processed rows from cache, and seem like is has to show its matching post-processed row count. Note that the row count here is not guaranteed to match the one above.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Passing the actual row count returned from the database and using it to surface the [improved] tooltip
![Screenshot 2024-03-28 at 5 43 43 PM](https://private-user-images.githubusercontent.com/487433/317922415-d648f807-5f48-4413-be92-2f9f829c52eb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTg1MjYsIm5iZiI6MTczOTI1ODIyNiwicGF0aCI6Ii80ODc0MzMvMzE3OTIyNDE1LWQ2NDhmODA3LTVmNDgtNDQxMy1iZTkyLTJmOWY4MjljNTJlYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQwNzE3MDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xZmE1YzQ0OGVhODVjNDFlYjczMzBlZGJhMzA4NjdmNzUyYTFhOGQwOWJjMDQwYmUwYjYwMGUyNzAxYmFkY2Q0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.2tK7zOfmkacj28IRQoBaxJlMOi0-3YRII4Jq_YnPbB0)
TESTING INSTRUCTIONS