This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit 458f3ce60a5214edb8d33b49b1a703c2974b5b4d Author: Martin Desruisseaux <[email protected]> AuthorDate: Sat Dec 7 17:25:09 2019 +0100 Move the microbenchmarks to test directory for avoiding to introduce dependencies at runtime. Fix also some javadoc errors for allowing the project to build with checks enabled. --- .../src/main/java/org/apache/sis/filter/BinaryFunction.java | 2 -- .../src/main/java/org/apache/sis/internal/filter/NamedFunction.java | 6 ++++-- storage/sis-sqlstore/pom.xml | 4 +++- .../src/main/java/org/apache/sis/internal/sql/feature/Features.java | 1 - .../java/org/apache/sis/internal/sql/feature/QueryFeatureSet.java | 3 ++- .../org/apache/sis/internal/sql/feature/QuerySpliteratorsBench.java | 0 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/BinaryFunction.java b/core/sis-feature/src/main/java/org/apache/sis/filter/BinaryFunction.java index a8a0e1c..4050c83 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/filter/BinaryFunction.java +++ b/core/sis-feature/src/main/java/org/apache/sis/filter/BinaryFunction.java @@ -29,8 +29,6 @@ import org.apache.sis.math.Fraction; import org.apache.sis.util.ArgumentChecks; import org.apache.sis.util.Numbers; -// Branch-dependent imports - /** * Base class for expressions, comparators or filters performing operations on two expressions. diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/filter/NamedFunction.java b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/NamedFunction.java index bd2d7bc..6672afb 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/internal/filter/NamedFunction.java +++ b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/NamedFunction.java @@ -38,7 +38,8 @@ import org.apache.sis.filter.InvalidExpressionException; /** * Base class of functions having a name and receiving an arbitrary amount of parameters. - * This class differs from {@link UnaryFunction} and {@link BinaryFunction} in two ways: + * This class differs from {@link org.apache.sis.filter.UnaryFunction} and + * {@link org.apache.sis.filter.BinaryFunction} in two ways: * * <ul> * <li>It has a name used for invoking this function. By contrast, the unary and binary functions @@ -73,7 +74,8 @@ public abstract class NamedFunction extends Node implements Function { /** * Creates a new function with the given parameters. This constructor wraps the given array in a list directly * (without defensive copy). it is caller's responsibility to ensure that the given array is non-null, has been - * cloned and does not contain null elements. Those steps are done by {@link SQLMM#create(String, Expression...)}. + * cloned and does not contain null elements. Those steps are done by + * {@link org.apache.sis.internal.filter.sqlmm.SQLMM#create(String, Expression...)}. * * @param parameters the sub-expressions that will be evaluated to provide the parameters to the function. */ diff --git a/storage/sis-sqlstore/pom.xml b/storage/sis-sqlstore/pom.xml index 92de060..5d5dd15 100644 --- a/storage/sis-sqlstore/pom.xml +++ b/storage/sis-sqlstore/pom.xml @@ -140,7 +140,7 @@ <dependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> - <scope>compile</scope> + <scope>test</scope> </dependency> <dependency> <groupId>org.hsqldb</groupId> @@ -162,11 +162,13 @@ <groupId>org.openjdk.jmh</groupId> <artifactId>jmh-core</artifactId> <version>1.21</version> + <scope>test</scope> </dependency> <dependency> <groupId>org.openjdk.jmh</groupId> <artifactId>jmh-generator-annprocess</artifactId> <version>1.21</version> + <scope>test</scope> </dependency> </dependencies> diff --git a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Features.java b/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Features.java index dcd0269..0e4e29e 100644 --- a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Features.java +++ b/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Features.java @@ -644,7 +644,6 @@ final class Features implements Spliterator<Feature> { * Warning : This does not work with relations. It is only a rough estimation of the parameterized query. * @param count True if a count query must be generated. False for a simple selection. * @return A text representing (roughly) the SQL query which will be posted. - * @throws SQLException If we cannot initialize an sql statement builder. */ public String estimateStatement(final boolean count) { final SQLBuilder sql = source.parent.createStatement().append("SELECT "); diff --git a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/QueryFeatureSet.java b/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/QueryFeatureSet.java index ab08467..883e4b1 100644 --- a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/QueryFeatureSet.java +++ b/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/QueryFeatureSet.java @@ -366,8 +366,9 @@ public class QueryFeatureSet extends AbstractFeatureSet { * <li>Parallelizable batch streaming: {@link PrefetchSpliterator}</li> * </ul> * - * {@link QuerySpliteratorsBench A benchmark is available} to compare both implementations, which could be useful in + * A benchmark is available in the test directory to compare both implementations, which could be useful in * the future to determine which implementation to priorize. For now results does not show much difference. + * The benchmark class is {@code QuerySpliteratorsBench}. */ private abstract class QuerySpliterator implements java.util.Spliterator<Feature> { diff --git a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/QuerySpliteratorsBench.java b/storage/sis-sqlstore/src/test/java/org/apache/sis/internal/sql/feature/QuerySpliteratorsBench.java similarity index 100% rename from storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/QuerySpliteratorsBench.java rename to storage/sis-sqlstore/src/test/java/org/apache/sis/internal/sql/feature/QuerySpliteratorsBench.java
