Skip to content

Commit fcd4aa0

Browse files
authored
Merge branch '9.0' into backport/9.0/pr-125250
2 parents 10e9c5f + 574de38 commit fcd4aa0

File tree

8 files changed

+113
-12
lines changed

8 files changed

+113
-12
lines changed

.buildkite/hooks/pre-command

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ if [[ "${USE_PROD_DOCKER_CREDENTIALS:-}" == "true" ]]; then
9494
fi
9595
fi
9696

97+
# Authenticate to the Docker Hub public read-only registry
98+
if which docker > /dev/null 2>&1; then
99+
DOCKERHUB_REGISTRY_USERNAME="$(vault read -field=username secret/ci/elastic-elasticsearch/docker_hub_public_ro_credentials)"
100+
DOCKERHUB_REGISTRY_PASSWORD="$(vault read -field=password secret/ci/elastic-elasticsearch/docker_hub_public_ro_credentials)"
101+
102+
echo "$DOCKERHUB_REGISTRY_PASSWORD" | docker login --username "$DOCKERHUB_REGISTRY_USERNAME" --password-stdin docker.io
103+
fi
104+
97105
if [[ "$BUILDKITE_AGENT_META_DATA_PROVIDER" != *"k8s"* ]]; then
98106
# Run in the background, while the job continues
99107
nohup .buildkite/scripts/setup-monitoring.sh </dev/null >/dev/null 2>&1 &

docs/changelog/122250.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 122250
2+
summary: "ESQL: Align `RENAME` behavior with `EVAL` for sequential processing"
3+
area: ES|QL
4+
type: enhancement
5+
issues:
6+
- 121739

docs/changelog/124669.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pr: 124669
2+
summary: Release semantic_text as a GA feature
3+
area: Mapping
4+
type: feature
5+
issues: []
6+
highlight:
7+
title: Release semantic_text as a GA feature
8+
body: semantic_text is now an official GA (generally available) feature!
9+
This field type allows you to easily set up and perform semantic search with minimal ramp up time.
10+
notable: true

docs/reference/elasticsearch/mapping-reference/semantic-text.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ mapped_pages:
66

77
# Semantic text field type [semantic-text]
88

9-
10-
::::{warning}
11-
This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
12-
::::
13-
14-
159
The `semantic_text` field type automatically generates embeddings for text content using an inference endpoint. Long passages are [automatically chunked](#auto-text-chunking) to smaller sections to enable the processing of larger corpuses of text.
1610

1711
The `semantic_text` field type specifies an inference endpoint identifier that will be used to generate embeddings. You can create the inference endpoint by using the [Create {{infer}} API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put). This field type and the [`semantic` query](/reference/query-languages/query-dsl/query-dsl-semantic-query.md) type make it simpler to perform semantic search on your data. The `semantic_text` field type may also be queried with [match](/reference/query-languages/query-dsl/query-dsl-match-query.md), [sparse_vector](/reference/query-languages/query-dsl/query-dsl-sparse-vector-query.md) or [knn](/reference/query-languages/query-dsl/query-dsl-knn-query.md) queries.

docs/reference/query-languages/query-dsl/query-dsl-semantic-query.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ mapped_pages:
66

77
# Semantic query [query-dsl-semantic-query]
88

9-
10-
::::{warning}
11-
This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
12-
::::
13-
14-
159
The `semantic` query type enables you to perform [semantic search](docs-content://solutions/search/semantic-search.md) on data stored in a [`semantic_text`](/reference/elasticsearch/mapping-reference/semantic-text.md) field.
1610

1711

x-pack/plugin/esql/qa/testFixtures/src/main/resources/rename.csv-spec

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,85 @@ x:keyword
213213
Facello
214214
Simmel
215215
;
216+
217+
swappingNames
218+
required_capability: rename_sequential_processing
219+
FROM employees
220+
| SORT emp_no ASC
221+
| KEEP first_name, last_name
222+
| RENAME first_name AS last_name, last_name AS first_name, first_name as name
223+
| LIMIT 2
224+
;
225+
226+
name:keyword
227+
Georgi
228+
Bezalel
229+
;
230+
231+
complexSwappingNames
232+
required_capability: rename_sequential_processing
233+
FROM employees
234+
| SORT emp_no ASC
235+
| KEEP first_name, last_name, emp_no
236+
| RENAME first_name AS last_name, last_name AS first_name, first_name as emp_no, emp_no AS first_name
237+
| LIMIT 2
238+
;
239+
240+
first_name:keyword
241+
Georgi
242+
Bezalel
243+
;
244+
245+
246+
reuseRenamedAlias
247+
required_capability: rename_sequential_processing
248+
FROM employees
249+
| SORT emp_no ASC
250+
| KEEP first_name, last_name
251+
| LIMIT 2
252+
| RENAME first_name AS x, x AS y, last_name as x
253+
;
254+
255+
y:keyword | x:keyword
256+
Georgi | Facello
257+
Bezalel | Simmel
258+
;
259+
260+
261+
multipleRenamesToSameAliasLastOnePrevails
262+
required_capability: rename_sequential_processing
263+
FROM employees
264+
| SORT emp_no ASC
265+
| KEEP first_name, last_name
266+
| LIMIT 2
267+
| RENAME first_name AS x, last_name as x
268+
;
269+
270+
x:keyword
271+
Facello
272+
Simmel
273+
;
274+
275+
276+
swapNames
277+
required_capability: rename_sequential_processing
278+
ROW a="keyword", b=5
279+
| RENAME a AS temp, b AS a, temp AS b
280+
;
281+
282+
b:keyword | a:integer
283+
keyword | 5
284+
;
285+
286+
287+
multipleRenames
288+
required_capability: rename_sequential_processing
289+
ROW a="keyword", b=5, c=null
290+
| RENAME a AS c, b AS a
291+
| RENAME c AS b
292+
| RENAME a AS b, b AS a
293+
;
294+
295+
a:integer
296+
5
297+
;

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,12 @@ public enum Cap {
397397
*/
398398
UNION_TYPES_FIX_RENAME_RESOLUTION,
399399

400+
/**
401+
* Execute `RENAME` operations sequentially from left to right,
402+
* see <a href="https://github.com/elastic/elasticsearch/issues/122250"> ESQL: Align RENAME behavior with EVAL for sequential processing #122250 </a>
403+
*/
404+
RENAME_SEQUENTIAL_PROCESSING,
405+
400406
/**
401407
* Fix for union-types when some indexes are missing the required field. Done in #111932.
402408
*/

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/analysis/Analyzer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,7 @@ public static List<NamedExpression> projectionsForRename(Rename rename, List<Att
905905
if (alias.child() instanceof UnresolvedAttribute ua && alias.name().equals(ua.name()) == false) {
906906
// remove attributes overwritten by a renaming: `| keep a, b, c | rename a as b`
907907
projections.removeIf(x -> x.name().equals(alias.name()));
908+
childrenOutput.removeIf(x -> x.name().equals(alias.name()));
908909

909910
var resolved = maybeResolveAttribute(ua, childrenOutput, logger);
910911
if (resolved instanceof UnsupportedAttribute || resolved.resolved()) {

0 commit comments

Comments
 (0)