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] Add automated script to sync operators and add support for MATCH operators #205565

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

qn895
Copy link
Member

@qn895 qn895 commented Jan 4, 2025

This PR adds automated script to sync operators and add support for MATCH operators

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 4, 2025

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!

@qn895
Copy link
Member Author

qn895 commented Jan 4, 2025

/ci

@qn895
Copy link
Member Author

qn895 commented Jan 5, 2025

/ci

@qn895 qn895 self-assigned this Jan 6, 2025
@qn895 qn895 added v9.0.0 Team:ESQL ES|QL related features in Kibana labels Jan 6, 2025
@qn895 qn895 requested a review from stratoula January 7, 2025 15:37
@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 8, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #5 / WHERE within the expression suggestions after IN
  • [job] [logs] Jest Tests #5 / WHERE within the expression suggestions after IN

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
lists 427 428 +1
securitySolution 6533 6534 +1
unifiedSearch 366 367 +1
total +3

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 22.2MB 22.2MB +38.7KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
kbnUiSharedDeps-srcJs 3.5MB 3.6MB +39.0KB

History

cc @qn895

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanx Quynh! I didnt test it but I have some questions to understand better the code. Also why do I see changes in the validation tests?

@@ -112,14 +112,17 @@ export function removeQuoteForSuggestedSources(suggestions: SuggestionRawDefinit
}));
}

const leftHandSideParamName = new Set(['left', 'field', 'lhs']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't we mapped in the script above as left? Why do we need them here?

@@ -117,56 +123,58 @@ export const isReturnType = (str: string | FunctionParameterType): str is Functi
str !== 'unsupported' &&
(dataTypes.includes(str as SupportedDataType) || str === 'unknown' || str === 'any');

export interface Signature {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@@ -1060,7 +1068,7 @@
{
"query": "row 1 years + 1 year",
"error": [
"Argument of [+] must be [date], found value [1 years] type [duration]"
"Argument of [+] must be [date], found value [1 year] type [duration]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So now we start the validation from the end and not from the beginning?

extraSignatures?: Signature[];
}
> = {
add: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So every time a new operator is being added we need to add an entry here? Can this info be given by ES? Have we talked with them?

@@ -384,7 +384,7 @@ export const comparisonFunctions: FunctionDefinition[] = [
},
].map((op): FunctionDefinition => createComparisonDefinition(op));

const likeFunctions: FunctionDefinition[] = [
const notLikeFunctions: FunctionDefinition[] = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont understand this change, the not_like is not being returned from ES?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:ESQL ES|QL related features in Kibana v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants