21 Commits

Author SHA1 Message Date
Ashwanth
73961f18a3 chore(xcap): leaner xcap API (#20771) 2026-02-17 19:42:33 +05:30
Trevor Whitney
5acb96abbd ci: add drilldown and case insensitive queries to correctness tests (#20603)
Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>
2026-02-04 18:57:08 +00:00
Stas Spiridonov
514a142859 fix(thor): Fix error filtering before range aggregations (#20560) 2026-01-26 14:14:52 -07:00
Stas Spiridonov
efdb1f5a37 chore: Reducing waste on processing empty records (#20562) 2026-01-23 15:58:41 -05:00
Stas Spiridonov
bedfb78378 chore: Thor query engine memory improvements, part 2 (#20473) 2026-01-21 09:22:39 -05:00
Ashwanth
11b1dcb2a3 chore(engine): introduce execution capture (#19821) 2025-11-19 10:34:25 +05:30
renovate-sh-app[bot]
d76b3bf495 fix(deps): update module github.com/apache/arrow-go/v18 to v18.4.1 (main) (#19750)
Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
Co-authored-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
Co-authored-by: Paul Rogers <paul.rogers@grafana.com>
2025-11-09 11:53:00 -05:00
Trevor Whitney
dd6b31473e fix: errors in parse pipeline (#19667)
Co-authored-by: Ashwanth Goli <iamashwanth@gmail.com>
2025-10-31 13:36:55 -04:00
Stas Spiridonov
7eda6749a4 feat(engine): basic math expressions (#19407) 2025-10-24 14:27:21 -07:00
Christian Haudum
9e76f1d251 chore(engine): Refactor ColumnVector (#19549)
This PR removes the need of the ColumnVector as a result of expression evaluation and instead returns an arrow.Array.

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
2025-10-24 05:45:23 +00:00
Stas Spiridonov
160dc2c493 chore: removed arrow-go allocators/retain/release (#19569) 2025-10-22 15:41:12 -04:00
Trevor Whitney
13429aa1ea refactor: move allocator into execution Context (#19550) 2025-10-21 08:38:52 -06:00
Trevor Whitney
3ce6fa2946 feat: implement unwrap as a projection (#19409) 2025-10-17 14:27:23 -06:00
Christian Haudum
290d1b711f chore(engine): Add support for drop stage (drop projection) (#19533)
This PR add support for dropping columns from the schema.
The drop projection only supports dropping column by name, not by matcher.
2025-10-17 14:59:13 +02:00
Robert Fratto
cfd07c3683 chore(engine): simplify Pipeline interface (#19518) 2025-10-16 08:28:01 -04:00
Christian Haudum
849a9214fa chore: Release column vectors and their arrays correctly (#19496)
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
2025-10-15 11:30:02 +02:00
Christian Haudum
8b7ef09e69 chore(engine): Cleanup: remove state from pipelines (#19495)
* Do not pass `state` in `genericPipeline` but instead return `(arrow.Record, error)` in `readFunc`
* Remove unused `state` fields from pipelines.
2025-10-14 19:21:08 +05:30
Christian Haudum
2214a700b3 chore(engine): Implement new semantic column naming (#19415)
This PR implements the column naming convention introduced in https://github.com/grafana/loki/pull/19396

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
2025-10-09 16:06:16 +00:00
Stas Spiridonov
16dab82593 chore: consistent expressionEvaluator.eval result memory ownership (#19438) 2025-10-09 11:43:19 -04:00
Christian Haudum
119275aab7 chore(engine): Column naming conventions (#19396)
In the new engine, we need fully qualified column names, since columns from different sources can have the same name.

Right now, the distinction between columns with the same name is implemented using the `Metadata` field on the `arrow.Field`. However, it is quite cumbersome to parse the column type and data type from this generic map.

This PR introduces package with naming conventions for columns, defined by name, data type, and column type. So, this information can be encoded into the `Name` field of the `arrow.Field`. The convention is defined as 

```
[DATA_TYPE].[COLUMN_TYPE].[COLUMN_NAME]
```

#### Examples:
* `utf8.label.service_name`
* `timestamp_ns.builtin.timestamp`

The column type can easily be converted into a `Scope`, which is defined by an origin and type.

The mapping is as follows:

```
ColumnTypeBuiltin   -> Scope{Record, Attribute}
ColumnTypeMetadata  -> Scope{Record, Builtin}
ColumnTypeLabel     -> Scope{Resource, Attribute}
ColumnTypeParsed    -> Scope{Generated, Attribute}
ColumnTypeGenerated -> Scope{Generated, Builtin}
ColumnTypeAmbiguous -> Scope{Unscoped, Attribute}
```

---
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
2025-10-08 09:06:24 +02:00
Robert Fratto
2e418b13fd chore(engine): unexport subpackages (#19384)
This moves packages around to reduce the surface area of the public engine API:

* `pkg/engine/planner` moves to `pkg/engine/internal/planner` 
* `pkg/engine/executor` moves to `pkg/engine/internal/executor` 

These packages were only used from `pkg/engine` and did not need to be public.
We may make them public again in the future if we want to expose subcomponents
of the engine. 

This move means that `pkg/engine/planner/internal/tree` became
`pkg/engine/internal/planner/internal/tree`. To reduce the import path, I also
moved that package to `pkg/engine/internal/util/tree`. 

Other than moving files and updating import paths, no code changes are made. 

Signed-off-by: Robert Fratto <robertfratto@gmail.com>
2025-10-07 17:05:51 +00:00