[Analytics] Add optional liquid cache seam for indexed parquet scans (cargo feature) - #22553
[Analytics] Add optional liquid cache seam for indexed parquet scans (cargo feature)#22553cocosz wants to merge 1 commit into
Conversation
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit a09b338. ⛔ Hard block: Issues at Medium severity or above will block this PR from merging.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
alchemist51
left a comment
There was a problem hiding this comment.
Can we remove the plugin and verify if the changes are still compiling? The whole idea is to move the liquid cache to a separate plugin without taking the direct dependency here.
| // Pull in plugin rlibs — forces linker to include all #[no_mangle] symbols. | ||
| extern crate native_bridge_common; | ||
| extern crate opensearch_datafusion; | ||
| extern crate opensearch_liquid_cache; |
There was a problem hiding this comment.
This actually creates the dependency on the liquid cache. How will this work without the liquid cache plugin?
There was a problem hiding this comment.
Addressed. Liquid cache is now an optional, off-by-default cargo dependency of the native lib, so the default build takes no dependency on it and the execution backend never names it.
| opensearch-repository-azure = { workspace = true } | ||
| opensearch-repository-fs = { workspace = true } | ||
| opensearch-block-cache = { path = "../../../../plugins/block-cache-foyer/src/main/rust" } | ||
| opensearch-liquid-cache = { workspace = true } |
There was a problem hiding this comment.
We need a config option which should enable this, it should not be default be present.
There was a problem hiding this comment.
Done — it's now optional behind a cargo feature that's off by default.
d91dc86 to
b997304
Compare
| # Internal | ||
| native-bridge-common = { path = "common" } | ||
| opensearch-query-spi = { path = "query-spi" } | ||
| opensearch-liquid-cache-core = { path = "../../../plugins/liquid-cache/src/main/rust/core" } |
There was a problem hiding this comment.
liquid cache is still here?
1a00334 to
2c46ce7
Compare
In-memory decoded-batch cache for DataFusion Parquet scans, shipped as a standalone plugin (sandbox/plugins/liquid-cache) that plugs into the native query-optimizer provider seam. Gated behind the experimental feature flag opensearch.experimental.feature.liquid_cache.enabled and off by default. Builds on the seam PR (opensearch-project#22553). Signed-off-by: Tanvir Alam <tanvralm@amazon.com>
f9b00ca to
b5b7c2b
Compare
In-memory decoded-batch cache for DataFusion Parquet scans, shipped as a standalone plugin (sandbox/plugins/liquid-cache) that plugs into the native query-optimizer provider seam. Gated behind the experimental feature flag opensearch.experimental.feature.liquid_cache.enabled and off by default. Builds on the seam PR (opensearch-project#22553). Signed-off-by: Tanvir Alam <tanvralm@amazon.com>
b5b7c2b to
88c300a
Compare
In-memory decoded-batch cache for DataFusion Parquet scans, shipped as a standalone plugin (sandbox/plugins/liquid-cache) that plugs into the native query-optimizer provider seam. Gated behind the experimental feature flag opensearch.experimental.feature.liquid_cache.enabled and off by default. Builds on the seam PR (opensearch-project#22553). Signed-off-by: Tanvir Alam <tanvralm@amazon.com>
88c300a to
6582eda
Compare
In-memory decoded-batch cache for DataFusion Parquet scans, shipped as a standalone plugin (sandbox/plugins/liquid-cache) that plugs into the native query-optimizer provider seam. Gated behind the experimental feature flag opensearch.experimental.feature.liquid_cache.enabled and off by default. Builds on the seam PR (opensearch-project#22553). Signed-off-by: Tanvir Alam <tanvralm@amazon.com>
6582eda to
581a75e
Compare
In-memory decoded-batch cache for DataFusion Parquet scans, shipped as a standalone plugin (sandbox/plugins/liquid-cache) that plugs into the native query-optimizer provider seam. Gated behind the experimental feature flag opensearch.experimental.feature.liquid_cache.enabled and off by default. Builds on the seam PR (opensearch-project#22553). Signed-off-by: Tanvir Alam <tanvralm@amazon.com>
581a75e to
74a4862
Compare
In-memory decoded-batch cache for DataFusion Parquet scans, shipped as a standalone plugin (sandbox/plugins/liquid-cache) that plugs into the native query-optimizer provider seam. Gated behind the experimental feature flag opensearch.experimental.feature.liquid_cache.enabled and off by default. Builds on the seam PR (opensearch-project#22553). Signed-off-by: Tanvir Alam <tanvralm@amazon.com>
ed0c9fe to
41a2c7a
Compare
41a2c7a to
d4c9d40
Compare
d4c9d40 to
b4e7524
Compare
PR Reviewer Guide 🔍(Review updated until commit 600387b)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 600387b
Previous suggestionsSuggestions up to commit b4e7524
|
9bfad85 to
600387b
Compare
|
Persistent review updated to latest commit 600387b |
Adds an opt-in, in-memory decoded-batch cache (liquid cache) for the DataFusion analytics backend, wired behind a cargo feature so it is absent from the default build. When the `liquid_cache` feature is off (the default), the integration is an inlined no-op: eligible scans use the plain ParquetSource unchanged. When on, an eligible indexed row-group scan — all projected columns numeric/date/timestamp/boolean, within a column budget, and no string or binary predicate column — is wrapped with LiquidParquetSource so decoded batches are served from and populated into the process-global cache. Enabling is a single-file edit plus a build flag: the liquid cache dependency is a commented placeholder in the analytics-backend-datafusion crate (uncomment it, set the git repo/branch, and uncomment the matching `dep:` feature entries), then build with -PliquidCache (or LIQUID_CACHE=1). The default build declares no liquid cache source, so it resolves and compiles exactly as before. Signed-off-by: Tanvir Alam <tanvralm@amazon.com>
600387b to
a09b338
Compare
Description
Adds an opt-in, in-memory decoded-batch cache ("liquid cache") for the DataFusion analytics backend, wired behind a cargo feature so it is completely absent from the default build.
ParquetSourceunchanged, and the build declares no liquid cache dependency, so it resolves and compiles exactly as before.-PliquidCache/LIQUID_CACHE=1): an eligible indexed row-group scan is wrapped withLiquidParquetSource, so decoded batches are served from and populated into the process-global cache.The hook (
liquid_cache.rs) is already in its final form: when the feature is on it delegates to theopensearch-liquid-cachecrate. That crate is provided by the liquid-cache plugin later in the stack, so here the dependency is left commented inCargo.toml(Cargo resolves every declared path dependency even when its feature is off, which would otherwise break this build). The integration PR only flips the dependency on — it does not modify this hook.This is the first PR in a 3-part stack that keeps each change small and independently reviewable. The stack is a straight split of the final code, not an evolution — each file lands in its final shape:
Changes
sandbox/libs/dataformat-native/build.gradle-PliquidCache/LIQUID_CACHE=1build flag that forwards the cargo feature.../analytics-backend-datafusion/rust/Cargo.tomlopensearch-liquid-cachedep + bareliquid_cache = []feature (default build resolves no dep).../rust/src/indexed_table/parquet_bridge.rsmaybe_wrap_parquet_sourcehook (no-op when feature off).../rust/src/lib.rspub mod liquid_cache.../rust/src/liquid_cache.rsopensearch-liquid-cacheto wrap eligible scans5 files changed, +95 / -3.
Check List