-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
ESQL: Validate unique plan attribute names #110488
Changes from 37 commits
134a3e8
9d9c70f
0d4e1df
6f36c29
cd48514
3a5dab7
f71ef42
42be4eb
2a0d630
11da00c
0d6758e
0e13eaf
878eb99
e8609f2
5b4be72
2f1778a
73a9736
e3531ff
2cb23f5
222698c
1a648e4
658bebc
e2760a5
6ac0fa9
0f3c274
091c099
f478d59
6f00534
535c954
fb85e16
6f98cde
fdcc40e
3779900
07e9584
32f76a0
94737ff
ea9b9a9
f5d9568
a387165
233d68d
d0723b0
fb17126
bc354f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 110488 | ||
summary: "ESQL: Validate unique plan attribute names" | ||
area: ES|QL | ||
type: bug | ||
issues: | ||
- 110541 |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -31,11 +31,16 @@ name as the `match_field` defined in the <<esql-enrich-policy,enrich policy>>. | |||||||||
The enrich fields from the enrich index that are added to the result as new | ||||||||||
columns. If a column with the same name as the enrich field already exists, the | ||||||||||
existing column will be replaced by the new column. If not specified, each of | ||||||||||
the enrich fields defined in the policy is added | ||||||||||
the enrich fields defined in the policy is added. | ||||||||||
If a column has the same name as the enrich field, it will be discarded unless | ||||||||||
that field is given a new name. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
`new_nameX`:: | ||||||||||
Enables you to change the name of the column that's added for each of the enrich | ||||||||||
fields. Defaults to the enrich field name. | ||||||||||
If a column has the same name as the new name, it will be discarded. | ||||||||||
If a name (new or original) occurs more than once, only the rightmost duplicate | ||||||||||
creates a new column. | ||||||||||
|
||||||||||
*Description* | ||||||||||
|
||||||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -16,10 +16,12 @@ EVAL [column1 =] value1[, ..., [columnN =] valueN] | |||||
|
||||||
`columnX`:: | ||||||
The column name. | ||||||
In case a column name coincides with an existing column, the existing column is discarded. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll go for |
||||||
If a column name is used more than once, only the rightmost duplicate creates a column. | ||||||
|
||||||
`valueX`:: | ||||||
The value for the column. Can be a literal, an expression, or a | ||||||
<<esql-functions,function>>. | ||||||
<<esql-functions,function>>. Can use columns defined left of this one. | ||||||
|
||||||
*Description* | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -20,6 +20,9 @@ multiple values, `GROK` will process each value. | |||||
|
||||||
`pattern`:: | ||||||
A grok pattern. | ||||||
In case a field name coincides with an existing column, the existing column is discarded. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
If a field name is used more than once, a multi-valued column will be created with one value | ||||||
per each occurrence of the field name. | ||||||
|
||||||
*Description* | ||||||
|
||||||
|
@@ -67,4 +70,16 @@ include::{esql-specs}/docs.csv-spec[tag=grokWithToDatetime] | |||||
|=== | ||||||
include::{esql-specs}/docs.csv-spec[tag=grokWithToDatetime-result] | ||||||
|=== | ||||||
|
||||||
In case a field name is used more than once, `GROK` creates a multi-valued | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
column: | ||||||
|
||||||
[source.merge.styled,esql] | ||||||
---- | ||||||
include::{esql-specs}/docs.csv-spec[tag=grokWithDuplicateFieldNames] | ||||||
---- | ||||||
[%header.monospaced.styled,format=dsv,separator=|] | ||||||
|=== | ||||||
include::{esql-specs}/docs.csv-spec[tag=grokWithDuplicateFieldNames-result] | ||||||
|=== | ||||||
// end::examples[] |
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -16,6 +16,10 @@ KEEP columns | |||||||||||||||||
|
||||||||||||||||||
`columns`:: | ||||||||||||||||||
A comma-separated list of columns to keep. Supports wildcards. | ||||||||||||||||||
In case a column name without wildcards occurs multiple times, the column is placed at the | ||||||||||||||||||
position of the rightmost duplicate. The same is true if a column name matches multiple | ||||||||||||||||||
wildcards. If a column name matches both a wildcard and also a column name without wildcards, | ||||||||||||||||||
the position of the latter is used. | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
*Description* | ||||||||||||||||||
|
||||||||||||||||||
|
@@ -29,7 +33,7 @@ Fields are added in the order they appear. If one field matches multiple express | |||||||||||||||||
2. Partial wildcard expressions (for example: `fieldNam*`) | ||||||||||||||||||
3. Wildcard only (`*`) | ||||||||||||||||||
|
||||||||||||||||||
If a field matches two expressions with the same precedence, the right-most expression wins. | ||||||||||||||||||
If a field matches two expressions with the same precedence, the rightmost expression wins. | ||||||||||||||||||
|
||||||||||||||||||
Refer to the examples for illustrations of these precedence rules. | ||||||||||||||||||
|
||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -18,6 +18,8 @@ LOOKUP table ON match_field1[, match_field2, ...] | |||||
|
||||||
`table`:: | ||||||
The name of the `table` provided in the request to match. | ||||||
If it has column names that conflict with existing columns, the table's columns replace the | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
existing ones. | ||||||
|
||||||
`match_field`:: | ||||||
The fields in the input to match against the table. | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
street:keyword,number:keyword,zip_code:keyword,city.name:keyword,city.country.name:keyword,city.country.continent.name:keyword,city.country.continent.planet.name:keyword,city.country.continent.planet.galaxy:keyword | ||
Keizersgracht,281,1016 ED,Amsterdam,Netherlands,Europe,Earth,Milky Way | ||
Kearny St,88,CA 94108,San Francisco,United States of America,North America,Earth,Milky Way | ||
Marunouchi,2-7-2,100-7014,Tokyo,Japan,Asia,Earth,Milky Way |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.