Skip to content
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

[ES|QL] Improve suggestions based on previous function arguments and date suggestions for bucket #190828

Merged
merged 27 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d95562a
Improve function arg suggestions
qn895 Aug 9, 2024
767e253
TODo: Improve suggestions
qn895 Aug 14, 2024
b8e2089
Merge remote-tracking branch 'upstream/main' into esql-improve-func-s…
qn895 Aug 15, 2024
de8435f
Add new test file
qn895 Aug 16, 2024
47e7160
Fix tests
qn895 Aug 19, 2024
496952c
Update logic
qn895 Aug 19, 2024
7a160b5
Update logic
qn895 Aug 20, 2024
f8ccdec
Update
qn895 Aug 20, 2024
01a8fb1
Merge remote-tracking branch 'upstream/main' into esql-improve-func-s…
qn895 Aug 20, 2024
2780de7
Revert cookieAuth change
qn895 Aug 20, 2024
928f8aa
Add better suggestion for named parameters
qn895 Aug 20, 2024
b291d1a
Update tests
qn895 Aug 20, 2024
347ab09
Move around imports
qn895 Aug 20, 2024
4c31d01
Merge branch 'main' into esql-improve-func-signatures-suggestions
elasticmachine Aug 22, 2024
4918185
Merge upstream/main into branch
qn895 Aug 23, 2024
8a27505
Update tests
qn895 Aug 23, 2024
f22827f
Merge branch 'main' into esql-improve-func-signatures-suggestions
elasticmachine Aug 27, 2024
abe8c3e
Fix date picker string
qn895 Aug 28, 2024
a0a67d8
Update types, comments, add clarity
qn895 Aug 28, 2024
d0378f0
Merge remote-tracking branch 'upstream/main' into esql-improve-func-s…
qn895 Aug 28, 2024
3f5fa25
Merge branch 'main' into esql-improve-func-signatures-suggestions
elasticmachine Aug 29, 2024
4e3aa27
Add date histogram
qn895 Aug 29, 2024
cfa7363
Update tests
qn895 Aug 29, 2024
abcaab4
Make it so it doesn't add comma when completing an arg from a snippet
qn895 Aug 30, 2024
558cb4e
Fix not opening suggestions for snippets
qn895 Aug 30, 2024
ca2d8e7
Update tests and bucket number
qn895 Aug 30, 2024
f252c14
Merge remote-tracking branch 'upstream/main' into esql-improve-func-s…
qn895 Aug 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ScopedCookieSessionStorage<T extends object> implements SessionStorage<T>
}

public clear() {
return this.request.cookieAuth.clear();
return this.request.cookieAuth?.clear();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

import { ESQL_COMMON_NUMERIC_TYPES, ESQL_NUMBER_TYPES } from '../../shared/esql_types';
import { roundParameterTypes } from './constants';
import { setup, getFunctionSignaturesByReturnType, getFieldNamesByType } from './helpers';

const allAggFunctions = getFunctionSignaturesByReturnType('stats', 'any', {
Expand Down Expand Up @@ -82,7 +83,6 @@ describe('autocomplete.suggest', () => {
scalar: true,
}).map((s) => ({ ...s, text: `${s.text},` })),
]);
const roundParameterTypes = ['double', 'integer', 'long', 'unsigned_long'] as const;
await assertSuggestions('from a | stats round(/', [
...getFunctionSignaturesByReturnType('stats', roundParameterTypes, {
agg: true,
Expand Down
Loading