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

Ccs exclude cluster/highlight changelog #98616

Closed
wants to merge 1,387 commits into from

Conversation

quux00
Copy link
Contributor

@quux00 quux00 commented Aug 17, 2023

Relates #97865

elasticsearchmachine and others added 30 commits June 29, 2023 13:32
This change makes the agg intermediate state explicit, and requires each
agg to declare it.

The local execution planner now determines the agg intermediate state.

The `AggregatorFunction` and `GroupingAggregatorFunction` interfaces get
a method that exposes the number of blocks used by the intermediate
state.
```
  /** The number of blocks used by intermediate state. */
  int intermediateBlockCount();
```

Each concrete agg implementation has to explicitly declare its
intermediate states e.g.

``` 
@Aggregator({
        @IntermediateState(name = "value", type = "DOUBLE"),
        @IntermediateState(name = "delta", type = "DOUBLE"),
        @IntermediateState(name = "nonnull", type = "BOOLEAN") })
@GroupingAggregator
class SumDoubleAggregator { .. }
```

The grouping and non-grouping states can be different, but if not the
grouping will defer to the non-grouping - thus we only need to declare
it once in many cases.
This adds support for metadata fields `_index` and `_version`. These are
exported through a (newly added) function, `metadata()`; ex. `| eval
_index = metadata("_index")`.

The function's resolution checks if the defined field is supported. It's
then substituted with a newly introduced attribute, `MetadataAttribute`.
Some optimiser rules have been changed to allow the `Eval`s be pushed
down past the `Limit`, so that these are part of the fragments
dispatched to the data nodes.
The extraction is currently done through the same mechanism as the
`FieldAttribute`s.
The fields aren't accessible "directly" (i.e. `from idx | where _index >
0`) and aren't projected implicitly (i.e. just by `from index`).
Update asserts in _testSingleValueSparseXXX_ to allow for the
possibility, albeit rare, that the randomisation will create dense
blocks, e.g. small block with say 2 positions can easily be dense,
though this is quite rare.
This commit adds Boolean, Int, Long, and Double Vector views over
BigArray backed data.

The Vectors are Releasable, so one must be careful to release them.
This adds support for multivalued fields the `PackedValuesHash` it does
so by encoding batches of values for each column into bytes and then
reading converted values row-wise. This works while also not causing
per-row megamorphic calls. There are megamorphic calls when the batch is
used up, but that should only hit a few times per block.
If some target shards are unavailable during the planning, ESQL may
return partial results without any indication. While we plan to support
retrying and handling partial results in the future, it is currently
most appropriate to fail them.
This adds support for the `unsigned_long` type.
The type can be now used with the defined math function, both scalar and
MV'ed, arithmetic and binary comparison ones.
The `to_unsigned_long()` conversion function is also added.
Fix deprecated api usage in gradle build scripts
Ideally, we should allow users to select the T-digest mode: fast or
accuracy; but the default should be the fast mode.
Adds functions for the constants `PI` and it's big brother `TAU`.
This PR adds support for loading `text` fields which can not be stored
as doc_values.

If text values are stored in the index (set `"store": true` in the field
mapping) the text value will be loaded directly from the index.
Otherwise, the value will be loaded by extracting the text from _source.
Our base class for `UnaryScalarFunction` only takes one argument because
it's, well, unary. But it was reporting type errors on that argument as
though it were the first of many. That's silly.

I also added some tests for the `Abs` function which extends our
`UnaryScalarFunction` that would have caught this error. While I was
there I ported `Length` from QL's `UnaryScalarFunction` to ours. Let's
use our stuff. Even if it's wrong we can change it without bothing QL.

Finally I added some javadocs and removed some unused code.
…s (ESQL-1375)

This commit moves aggs whose internal state is one of the primitives,
over to the new intermediate agg state mechanism.

We can then remove quite a bit of the internal serialization logic.
Introduces a unary scalar function for base 10 log, which is a thin
wrapper over the Java.Math implementation

---------

Co-authored-by: Abdon Pijpelink <[email protected]>
thecoop and others added 16 commits August 17, 2023 11:38
The replacement wasn't actually doing anything due to different JSON types
Tests have started failing in 8.11 as they are missing an appropriate value for the ML_CONFIG_VERSION_NODE_ATTR node attribute
Use TransformConfigVersion string throughout.

Relates elastic#98577
Update test nodes with an appropriate value for the TRANSFORM_CONFIG_VERSION_NODE_ATTR attribute

Relates elastic#98564
If FLS/DLS is enabled (this is the case when trial/licence is active and
security is enabled) then invoking the downsample API results in
immediate failure.

The downsample shard persistent task executor opens a searcher, but
security didn't set indices permissions in the thread local (this
happens via SecurityActionFilter). This will only happen on indices
actions (which are actions with a request that implement IndicesRequest.
This change does this by delegating to a transport action that executes
always locally, and this way security prepares thread local headers
correctly.

This adds another layer of indirection, but without doing this FLS/DLS
wouldn't work.

Closes elastic#98569

(Marking as a non-issue, because this a bug in not released code)
* First version

* Spotless, I liked my version better

* Fix param default values

* Add a supplier for default value to ensure it's calculated correctly

* Can't improve this without breaking tests

* Added checks for not specifying a body in PUT requests

* Fix default provider for enum params

* Added yaml test

* Changed docs and fix TODO

* Removing synonyms changes

* Added separate methods for providing default value as suppliers in enums

* Fixed test

* Add a supplier for default value to ensure it's calculated correctly

* Added checks for not specifying a body in PUT requests

* Remove synonyms changes

* Remove some supplier changes

* Better call enumParam with supplier version

* Fix compiler error on supplier

* Apply validators or requires depending on index version

* Solved BWC tests that involved using validators instead of requiresParameters

* Add tests

* Spotless

* Update docs/changelog/98268.yaml

* Update changelog

* Update docs/changelog/98268.yaml

* PR comments

* PR feedback

* Serialize index only for new index versions

---------

Co-authored-by: Elastic Machine <[email protected]>
* Query rules docs clarification

* Update docs/reference/search/search-your-data/search-using-query-rules.asciidoc

* Update docs/reference/search/search-your-data/search-using-query-rules.asciidoc
Here we add support for the following two ESQL functions:
* LTRIM: remove leading spaces from a string
* RTRIM: remove trailing spaces from a string

We also fix an issue with the handling of unicode white spaces. We
make use of unicode code points to identify unicode whitespace
characters instead of relying on ASCII codes.

Moreover, iterating bytes in a Unicode string needs to consider
that some Unicode characters are encoded using multiple bytes.
@quux00 quux00 added >non-issue :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team auto-backport Automatically create backport pull requests when merged v8.10.0 labels Aug 17, 2023
@quux00 quux00 requested review from javanna and tylerperk August 17, 2023 17:03
@github-actions
Copy link
Contributor

Documentation preview:

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged >non-issue :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.