sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [sis] 03/07: fix(Feature): Workaround to prevent optimisation shorting
Date Fri, 30 Jul 2021 16:49:39 GMT
This is an automated email from the ASF dual-hosted git repository.

amanin pushed a commit to branch geoapi-4.0
in repository

commit ccb433e35bdfc45c7bccfd7aa927fba33b50319b
Author: Alexis Manin <>
AuthorDate: Wed Jul 28 16:27:14 2021 +0200

    fix(Feature): Workaround to prevent optimisation shorting
    Some third-party implementation of filters use a different name for value reference expressions.
Without support for it, the SQL filter conversion were stopped and the entire filter were
delegated to java fallback. Such shorting cause a full scan of the dataset instead of delegating
processing to database engine (that can use indices AND reduce IO amount by evaluating itself
the filter).
 .../main/java/org/apache/sis/internal/sql/feature/  | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/
index fc40e82..77a148d 100644
--- a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/
+++ b/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/
@@ -145,6 +145,8 @@ class ANSIInterpreter extends Visitor<Feature,StringBuilder> {
         setExpressionHandler(FunctionNames.Multiply, new Join(" * "));
         setExpressionHandler(FunctionNames.Literal, (e,sb) -> writeLiteral(sb, (Literal<Feature,?>)
         setExpressionHandler(FunctionNames.ValueReference, (e,sb) -> writeColumnName(sb,
(ValueReference<Feature,?>) e));
+        // Temporary workaround. Filters created from Filter Encoding XML can specify "PropertyName"
instead of "Value reference".
+        setExpressionHandler("PropertyName", (e,sb) -> writeColumnName(sb, (ValueReference<Feature,?>)

View raw message