Skip to content

Commit

Permalink
[8.16] [ES|QL] Replace the comments with multiline ones (#197391) (#1…
Browse files Browse the repository at this point in the history
…97441)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[ES|QL] Replace the comments with multiline ones
(#197391)](#197391)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2024-10-23T13:31:53Z","message":"[ES|QL]
Replace the comments with multiline ones (#197391)\n\n##
Summary\r\n\r\nDue to this bug
#191866 and for\r\nbetter user
experience i am changing the comments to multiline
ones","sha":"0a0c3fa796ad8d046c2cbc08a7553d5547cd1f6b","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Feature:ES|QL","Team:ESQL","v8.16.0","backport:version","v8.17.0"],"title":"[ES|QL]
Replace the comments with multiline
ones","number":197391,"url":"https://github.com/elastic/kibana/pull/197391","mergeCommit":{"message":"[ES|QL]
Replace the comments with multiline ones (#197391)\n\n##
Summary\r\n\r\nDue to this bug
#191866 and for\r\nbetter user
experience i am changing the comments to multiline
ones","sha":"0a0c3fa796ad8d046c2cbc08a7553d5547cd1f6b"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197391","number":197391,"mergeCommit":{"message":"[ES|QL]
Replace the comments with multiline ones (#197391)\n\n##
Summary\r\n\r\nDue to this bug
#191866 and for\r\nbetter user
experience i am changing the comments to multiline
ones","sha":"0a0c3fa796ad8d046c2cbc08a7553d5547cd1f6b"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
  • Loading branch information
kibanamachine and stratoula authored Oct 23, 2024
1 parent 8d52bde commit 3cc87c2
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const getRecommendedQueries = ({
defaultMessage: 'Count aggregation',
}
),
queryString: `${fromCommand}\n | STATS count = COUNT(*) // you can group by a field using the BY operator`,
queryString: `${fromCommand}\n | STATS count = COUNT(*) /* you can group by a field using the BY operator */`,
},
...(timeField
? [
Expand All @@ -49,7 +49,7 @@ export const getRecommendedQueries = ({
defaultMessage: 'Sort by time',
}
),
queryString: `${fromCommand}\n | SORT ${timeField} // Data is not sorted by default`,
queryString: `${fromCommand}\n | SORT ${timeField} /* Data is not sorted by default */`,
},
{
label: i18n.translate(
Expand All @@ -64,7 +64,7 @@ export const getRecommendedQueries = ({
defaultMessage: 'Count aggregation over time',
}
),
queryString: `${fromCommand}\n | EVAL buckets = DATE_TRUNC(5 minute, ${timeField}) | STATS count = COUNT(*) BY buckets // try out different intervals`,
queryString: `${fromCommand}\n | EVAL buckets = DATE_TRUNC(5 minute, ${timeField}) | STATS count = COUNT(*) BY buckets /* try out different intervals */`,
},
]
: []),
Expand Down Expand Up @@ -98,7 +98,7 @@ export const getRecommendedQueries = ({
defaultMessage: 'Count aggregation over time',
}
),
queryString: `${fromCommand}\n | WHERE ${timeField} <=?_tend and ${timeField} >?_tstart\n | STATS count = COUNT(*) BY \`Over time\` = BUCKET(${timeField}, 50, ?_tstart, ?_tend) // ?_tstart and ?_tend take the values of the time picker`,
queryString: `${fromCommand}\n | WHERE ${timeField} <=?_tend and ${timeField} >?_tstart\n | STATS count = COUNT(*) BY \`Over time\` = BUCKET(${timeField}, 50, ?_tstart, ?_tend) /* ?_tstart and ?_tend take the values of the time picker */`,
},
{
label: i18n.translate(
Expand All @@ -113,7 +113,7 @@ export const getRecommendedQueries = ({
defaultMessage: 'Event rate over time',
}
),
queryString: `${fromCommand}\n | STATS count = COUNT(*), min_timestamp = MIN(${timeField}) // MIN(dateField) finds the earliest timestamp in the dataset.\n | EVAL event_rate = count / DATE_DIFF("seconds", min_timestamp, NOW()) // Calculates the event rate by dividing the total count of events by the time difference (in seconds) between the earliest event and the current time.\n | KEEP event_rate`,
queryString: `${fromCommand}\n | STATS count = COUNT(*), min_timestamp = MIN(${timeField}) /* MIN(dateField) finds the earliest timestamp in the dataset. */ \n | EVAL event_rate = count / DATE_DIFF("seconds", min_timestamp, NOW()) /* Calculates the event rate by dividing the total count of events by the time difference (in seconds) between the earliest event and the current time. */\n | KEEP event_rate`,
},
{
label: i18n.translate(
Expand Down

0 comments on commit 3cc87c2

Please sign in to comment.