kz930 commented on code in PR #8766:
URL: https://github.com/apache/texera/pull/8766#discussion_r4252188772


##########
frontend/src/app/workspace/component/result-panel/result-table-frame/result-table-frame.component.ts:
##########
@@ -418,11 +419,18 @@ export class ResultTableFrameComponent implements OnInit, 
OnChanges {
    * @param resultData rows of the result (may not be all rows if displaying 
result for workflow completed event)
    * @param totalRowCount
    */
-  setupResultTable(resultData: ReadonlyArray<IndexableObject>, totalRowCount: 
number) {
+  setupResultTable(
+    resultData: ReadonlyArray<IndexableObject>,
+    totalRowCount: number,
+    schema: ReadonlyArray<SchemaAttribute> = []
+  ) {
     if (!this.operatorId) {
       return;
     }
-    if (resultData.length < 1) {
+    // A result with no rows still has columns, and showing them tells the 
user what the
+    // operator would have produced. An empty page of a non-empty result is 
only a page index
+    // past the end, so the table already shown stays.
+    if (resultData.length < 1 && (totalRowCount > 0 || schema.length === 0)) {

Review Comment:
   Fixed in c66e6a22d. The spinner now stops for every page that arrives, and a 
0-row result shows its schema's columns even when there are none, so the old 
headers are cleared. Added a test that searches for a missing column through 
the input.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to