Path: redb/redb.Tests.Integration/Tests/PostgresPro/PostgresProElementLeafProbeTests.cs Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Tests.Integration/Tests/PostgresPro/PostgresProElementLeafProbeTests.cs ---- using redb.Tests.Integration.Fixtures; using redb.Tests.Integration.Models; namespace redb.Tests.Integration.Tests.PostgresPro; /// /// With the planner on, a page whose narrow condition is a Contains over an array of simple values reads the element rows /// of the value through the capped probe: fewer than the cap seed the streams, the cap reached keeps the form the query has /// without the probe. The answers are held equal to the other form by PvtPrefilterEquivalenceTestsBase. /// [Collection("PostgresPro")] public class PostgresProElementLeafProbeTests { private readonly redb.Core.IRedbService _redb; public PostgresProElementLeafProbeTests(PostgresProFixture fixture) => _redb = fixture.Redb; [Fact] public async Task Contains_IsProbedOnItsElementRows_UpToTheCap() { var restore = _redb.Configuration.EnablePvtPrefilter; try { _redb.UpdateConfiguration(c => c.EnablePvtPrefilter = true); var sql = await _redb.Query().Where(e => e.Skills!.Contains("Azure")).Take(10).ToSqlStringAsync(); sql.Should().Contain("pvt_probe AS MATERIALIZED", "the element rows are probed:\n{0}", sql) .And.Contain("v._array_index IS NOT NULL LIMIT 5000", "up to the cap, on the element rows:\n{0}", sql); } finally { _redb.UpdateConfiguration(c => c.EnablePvtPrefilter = restore); } } }