Skip to content

Commit

Permalink
[ES|QL] Set drop null columns param correctly for partial results (#1…
Browse files Browse the repository at this point in the history
…92666)

## Summary

Closes #192595

We were not setting the `drop_null_columns ` queryString for partial
results and as a result it was returning the empty columns only for the
initial request, resulting in the weirdness that is being described in
the issue.

(cherry picked from commit 708a96c)
  • Loading branch information
stratoula committed Sep 16, 2024
1 parent 5f8e564 commit 753a70b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const esqlAsyncSearchStrategyProvider = (
{
method: 'GET',
path: `/_query/async/${id}`,
querystring: { ...params },
querystring: { ...params, drop_null_columns: dropNullColumns },
},
{ ...options.transport, signal: options.abortSignal, meta: true }
)
Expand Down
17 changes: 13 additions & 4 deletions test/functional/apps/discover/group6/_sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
options = await find.allByCssSelector('[data-test-subj*="typeFilter"]');
expect(options).to.have.length(6);

expect(await unifiedFieldList.getSidebarAriaDescription()).to.be('82 available fields.');
expect(await unifiedFieldList.getSidebarAriaDescription()).to.be(
'76 available fields. 6 empty fields.'
);

await testSubjects.click('typeFilter-number');

await retry.waitFor('updates', async () => {
return (await unifiedFieldList.getSidebarAriaDescription()) === '6 available fields.';
return (
(await unifiedFieldList.getSidebarAriaDescription()) ===
'4 available fields. 2 empty fields.'
);
});
});

Expand Down Expand Up @@ -446,12 +451,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await header.waitUntilLoadingHasFinished();
await unifiedFieldList.waitUntilSidebarHasLoaded();

expect(await unifiedFieldList.getSidebarAriaDescription()).to.be('82 available fields.');
expect(await unifiedFieldList.getSidebarAriaDescription()).to.be(
'76 available fields. 6 empty fields.'
);

await unifiedFieldList.clickFieldListItemRemove('extension');
await unifiedFieldList.waitUntilSidebarHasLoaded();

expect(await unifiedFieldList.getSidebarAriaDescription()).to.be('82 available fields.');
expect(await unifiedFieldList.getSidebarAriaDescription()).to.be(
'76 available fields. 6 empty fields.'
);

const testQuery = `from logstash-* | limit 10 | stats countB = count(bytes) by geo.dest | sort countB`;

Expand Down

0 comments on commit 753a70b

Please sign in to comment.