sparopt: Avoid join reordering in SERVICE

This is done better by the remote endpoint and avoids harmful transformation like LATERAL insertion
pull/845/head
Tpt 9 months ago committed by Thomas Tanon
parent 58699f36f3
commit cbb72c7be6
  1. 12
      Cargo.lock
  2. 8
      Cargo.toml
  3. 2
      lib/sparopt/Cargo.toml
  4. 9
      lib/sparopt/src/optimizer.rs

12
Cargo.lock generated

@ -1037,7 +1037,7 @@ dependencies = [
[[package]] [[package]]
name = "oxigraph" name = "oxigraph"
version = "0.4.0-alpha.6" version = "0.4.0-alpha.7-dev"
dependencies = [ dependencies = [
"codspeed-criterion-compat", "codspeed-criterion-compat",
"digest", "digest",
@ -1068,7 +1068,7 @@ dependencies = [
[[package]] [[package]]
name = "oxigraph-cli" name = "oxigraph-cli"
version = "0.4.0-alpha.6" version = "0.4.0-alpha.7-dev"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"assert_cmd", "assert_cmd",
@ -1086,7 +1086,7 @@ dependencies = [
[[package]] [[package]]
name = "oxigraph-js" name = "oxigraph-js"
version = "0.4.0-alpha.6" version = "0.4.0-alpha.7-dev"
dependencies = [ dependencies = [
"console_error_panic_hook", "console_error_panic_hook",
"js-sys", "js-sys",
@ -1160,7 +1160,7 @@ dependencies = [
[[package]] [[package]]
name = "oxrocksdb-sys" name = "oxrocksdb-sys"
version = "0.4.0-alpha.6" version = "0.4.0-alpha.7-dev"
dependencies = [ dependencies = [
"bindgen", "bindgen",
"cc", "cc",
@ -1416,7 +1416,7 @@ dependencies = [
[[package]] [[package]]
name = "pyoxigraph" name = "pyoxigraph"
version = "0.4.0-alpha.6" version = "0.4.0-alpha.7-dev"
dependencies = [ dependencies = [
"oxigraph", "oxigraph",
"pyo3", "pyo3",
@ -1773,7 +1773,7 @@ dependencies = [
[[package]] [[package]]
name = "sparopt" name = "sparopt"
version = "0.1.0-alpha.4" version = "0.1.0-alpha.5-dev"
dependencies = [ dependencies = [
"oxrdf", "oxrdf",
"rand", "rand",

@ -19,7 +19,7 @@ members = [
resolver = "2" resolver = "2"
[workspace.package] [workspace.package]
version = "0.4.0-alpha.6" version = "0.4.0-alpha.7-dev"
authors = ["Tpt <thomas@pellissier-tanon.fr>"] authors = ["Tpt <thomas@pellissier-tanon.fr>"]
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
edition = "2021" edition = "2021"
@ -67,16 +67,16 @@ wasm-bindgen = "0.2.83"
zstd = ">=0.12, <0.14" zstd = ">=0.12, <0.14"
# Internal dependencies # Internal dependencies
oxigraph = { version = "=0.4.0-alpha.6", path = "lib/oxigraph" } oxigraph = { version = "=0.4.0-alpha.7-dev", path = "lib/oxigraph" }
oxrdf = { version = "=0.2.0-alpha.4", path = "lib/oxrdf" } oxrdf = { version = "=0.2.0-alpha.4", path = "lib/oxrdf" }
oxrdfio = { version = "=0.1.0-alpha.5", path = "lib/oxrdfio" } oxrdfio = { version = "=0.1.0-alpha.5", path = "lib/oxrdfio" }
oxrdfxml = { version = "=0.1.0-alpha.5", path = "lib/oxrdfxml" } oxrdfxml = { version = "=0.1.0-alpha.5", path = "lib/oxrdfxml" }
oxrocksdb-sys = { version = "=0.4.0-alpha.6", path = "./oxrocksdb-sys" } oxrocksdb-sys = { version = "=0.4.0-alpha.7-dev", path = "./oxrocksdb-sys" }
oxsdatatypes = { version = "=0.2.0-alpha.1", path = "lib/oxsdatatypes" } oxsdatatypes = { version = "=0.2.0-alpha.1", path = "lib/oxsdatatypes" }
oxttl = { version = "=0.1.0-alpha.5", path = "lib/oxttl" } oxttl = { version = "=0.1.0-alpha.5", path = "lib/oxttl" }
sparesults = { version = "=0.2.0-alpha.4", path = "lib/sparesults" } sparesults = { version = "=0.2.0-alpha.4", path = "lib/sparesults" }
spargebra = { version = "=0.3.0-alpha.4", path = "lib/spargebra" } spargebra = { version = "=0.3.0-alpha.4", path = "lib/spargebra" }
sparopt = { version = "=0.1.0-alpha.4", path = "lib/sparopt" } sparopt = { version = "=0.1.0-alpha.5-dev", path = "lib/sparopt" }
[workspace.lints.rust] [workspace.lints.rust]
absolute_paths_not_starting_with_crate = "warn" absolute_paths_not_starting_with_crate = "warn"

@ -1,6 +1,6 @@
[package] [package]
name = "sparopt" name = "sparopt"
version = "0.1.0-alpha.4" version = "0.1.0-alpha.5-dev"
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
readme = "README.md" readme = "README.md"

@ -712,11 +712,10 @@ impl Optimizer {
GraphPattern::OrderBy { inner, expression } => { GraphPattern::OrderBy { inner, expression } => {
GraphPattern::order_by(Self::reorder_joins(*inner, input_types), expression) GraphPattern::order_by(Self::reorder_joins(*inner, input_types), expression)
} }
GraphPattern::Service { service @ GraphPattern::Service { .. } => {
inner, // We don't do join reordering inside of SERVICE calls, we don't know about cardinalities
name, service
silent, }
} => GraphPattern::service(Self::reorder_joins(*inner, input_types), name, silent),
GraphPattern::Group { GraphPattern::Group {
inner, inner,
variables, variables,

Loading…
Cancel
Save