-
Notifications
You must be signed in to change notification settings - Fork 4
fix: NaN rows in dataframe output renderer #156
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: NaN rows in dataframe output renderer #156
Conversation
📝 WalkthroughWalkthroughThe DataframeRenderer prop type and the DataFrameObject interface were changed so Sequence Diagram(s)sequenceDiagram
autonumber
participant UI as DataframeRenderer
participant Data as Input Data
participant Calc as RowCountCalc
participant Render as Renderer
Note right of UI #DDEBF7: New flow for determining row count
UI->>Data: receive data (row_count, preview_row_count?)
UI->>Calc: compute numberOfRows
alt preview_row_count defined and finite
Calc-->>UI: return preview_row_count
else preview_row_count undefined or non-finite
Calc-->>UI: return row_count
end
UI->>Render: render numberOfRows rows
Render-->>UI: rendered output
sequenceDiagram
autonumber
participant OldUI as Old DataframeRenderer
participant Data as Input Data
participant CalcOld as OldCalc
participant Render as Renderer
Note right of OldUI #FBE4D6: Previous flow used min(row_count, preview_row_count)
OldUI->>Data: receive data (row_count, preview_row_count)
OldUI->>CalcOld: compute numberOfRows = min(row_count, preview_row_count)
CalcOld-->>OldUI: return numberOfRows
OldUI->>Render: render numberOfRows rows
Render-->>OldUI: rendered output
Suggested reviewers
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (2)**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/!(*.node|*.web).ts📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #156 +/- ##
=====================================
Coverage 73% 73%
=====================================
Files 550 550
Lines 44004 44004
Branches 5312 5312
=====================================
Hits 32189 32189
Misses 10048 10048
Partials 1767 1767
🚀 New features to boost your workflow:
|
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.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx (2)
1-10: Missing Microsoft copyright header.Coding guidelines require the Microsoft copyright header in source files.
As per coding guidelines.
65-69: Replaceconsole.logwithILoggerservice.Multiple
console.logcalls throughout (lines 65, 88, 96, 104, 112, 118, 129) violate coding guidelines.As per coding guidelines.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Inject interfaces, not concrete classes
Avoid circular dependencies
Usel10n.t()for user-facing strings
Use typed error classes fromsrc/platform/errors/when throwing or handling errors
Use theILoggerservice instead ofconsole.log
Preserve error details while scrubbing PII in messages and telemetry
Include the Microsoft copyright header in source files
Prefer async/await and handle cancellation withCancellationToken
Files:
src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx
🔇 Additional comments (1)
src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx (1)
81-81: Verify pagination uses correct row count.
totalPagesusesdata.row_countwhile display showsnumberOfRows. Confirm this is intentional.
src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx
Outdated
Show resolved
Hide resolved
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.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Inject interfaces, not concrete classes
Avoid circular dependencies
Usel10n.t()for user-facing strings
Use typed error classes fromsrc/platform/errors/when throwing or handling errors
Use theILoggerservice instead ofconsole.log
Preserve error details while scrubbing PII in messages and telemetry
Include the Microsoft copyright header in source files
Prefer async/await and handle cancellation withCancellationToken
Files:
src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx
src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx
Outdated
Show resolved
Hide resolved
|
@coderabbitai i addressed your comments, can you check now? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 5672 🏁 Script executed: Length of output: 11215 🏁 Script executed: Length of output: 12342 @saltenasl The core NaN fix looks good—making However, three items from my previous review remain unaddressed:
Would you like to address these, or should we defer them? |
Artmann
left a comment
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.
Can you add a test to reproduce? 🙏
Open Snowflake-in-Deepnote.deepnote.txt(rm the .txt, github cached this and won't let me re-upload) - the dataframe outputs for the blocks shouldn't say NaN rows (e.g. the one that starts with
SELECT row_number() over (ORDER)Summary by CodeRabbit