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


##########
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:
   On an empty result, searching for a missing column returns table=[] and 
schema=[]. This return leaves isLoadingResult=true, so the spinner never stops 
and the old headers remain. Reproduced through the search input. Please handle 
this successful empty response.



-- 
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