From 547e504c8383b2822329050dc9bebbda3b213220 Mon Sep 17 00:00:00 2001 From: Idan Sheinberg Date: Sat, 26 Aug 2023 18:15:44 +0300 Subject: [PATCH] Dependency upgrades and amendments --- .idea/kotlinc.xml | 2 +- detekt.yml | 9 +- pom.xml | 85 +++---------------- .../dremio/udf/gis/util/GeometryHelpers.java | 11 --- .../udf/gis/spec/GeometryInputFunSpec.kt | 4 +- .../udf/gis/spec/GeometryRelationFunSpec.kt | 6 +- 6 files changed, 19 insertions(+), 98 deletions(-) diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index 0e65cea..fdf8d99 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/detekt.yml b/detekt.yml index 30577dd..8c4dd48 100644 --- a/detekt.yml +++ b/detekt.yml @@ -304,13 +304,11 @@ naming: excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$' excludeClassPattern: '$^' - ignoreOverridden: true FunctionParameterNaming: active: true excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" parameterPattern: '[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' - ignoreOverridden: true InvalidPackageDeclaration: active: false rootPackage: '' @@ -349,7 +347,6 @@ naming: variablePattern: '[a-z][A-Za-z0-9]*' privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' - ignoreOverridden: true performance: active: true @@ -421,7 +418,7 @@ style: includeLineWrapping: false ForbiddenComment: active: true - values: [ 'FIXME:','STOPSHIP:' ] + comments: [ 'FIXME:','STOPSHIP:' ] ForbiddenImport: active: false imports: [ ] @@ -448,8 +445,6 @@ style: ignoreNamedArgument: true ignoreEnums: false ignoreRanges: false - MandatoryBracesIfStatements: - active: false MaxLineLength: active: true excludes: "**/*Configuration.kt" @@ -471,8 +466,6 @@ style: active: true OptionalUnit: active: false - OptionalWhenBraces: - active: false PreferToOverPairSyntax: active: false ProtectedMemberInFinalClass: diff --git a/pom.xml b/pom.xml index f324baa..6c383df 100644 --- a/pom.xml +++ b/pom.xml @@ -8,20 +8,20 @@ 9.3 23.0.1-202210141019030815-c1de8bcc 9.0.0-20220922165652-3a8c29faef-dremio - 1.2.3 + 1.3.0 1.19.0 1.19.0 2.11.0 4.13.2 5.9.1 - 1.7.21 - 5.5.4 + 1.9.0 + 5.6.2 2.9 - 1.22.0 + 1.23.1 0.7.0 9.0.0 - 0.7.14-SNAPSHOT + 0.7.16-SNAPSHOT jar dremio-udf-gis GIS UDF extensions for Dremio @@ -250,7 +250,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.12 + 1.6.13 true ossrh @@ -261,7 +261,7 @@ org.apache.maven.plugins maven-source-plugin - 2.2.1 + 3.2.1 attach-sources @@ -311,7 +311,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + 3.11.0 1.8 1.8 @@ -388,77 +388,12 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M7 + 3.0.0-M9 org.jacoco jacoco-maven-plugin - 0.8.8 - - - prepare-agent - - prepare-agent - - - - report - test - - report - - - - - - org.eluder.coveralls - coveralls-maven-plugin - 4.3.0 - - UTF-8 - ${env.COVERALLS_TOKEN} - - - - javax.xml.bind - jaxb-api - 2.3.1 - - - - - org.jetbrains.kotlin - kotlin-maven-plugin - ${kotlin.version} - - - test-compile - process-test-sources - - test-compile - - - - compile - process-sources - - compile - - - - - 1.8 - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M7 - - - org.jacoco - jacoco-maven-plugin - 0.8.8 + 0.8.10 prepare-agent diff --git a/src/main/java/org/sheinbergon/dremio/udf/gis/util/GeometryHelpers.java b/src/main/java/org/sheinbergon/dremio/udf/gis/util/GeometryHelpers.java index cf4b534..46050d9 100644 --- a/src/main/java/org/sheinbergon/dremio/udf/gis/util/GeometryHelpers.java +++ b/src/main/java/org/sheinbergon/dremio/udf/gis/util/GeometryHelpers.java @@ -66,13 +66,6 @@ public static Geometry emptyGeometry() { return factory.createEmpty(GEOMETRY_DIMENSIONS); } - public static String toUTF8String(final @Nonnull VarCharHolder holder) { - return StringFunctionHelpers.toStringFromUTF8( - holder.start, - holder.end, - holder.buffer); - } - public static String toUTF8String(final @Nonnull NullableVarCharHolder holder) { return StringFunctionHelpers.toStringFromUTF8( holder.start, @@ -221,10 +214,6 @@ public static Geometry toGeometry( } } - public static int toBitValue(final boolean value) { - return value ? BIT_TRUE : BIT_FALSE; - } - public static void populate( final @Nonnull byte[] bytes, final @Nonnull ArrowBuf buffer, diff --git a/src/test/kotlin/org/sheinbergon/dremio/udf/gis/spec/GeometryInputFunSpec.kt b/src/test/kotlin/org/sheinbergon/dremio/udf/gis/spec/GeometryInputFunSpec.kt index 60f073e..e40229f 100644 --- a/src/test/kotlin/org/sheinbergon/dremio/udf/gis/spec/GeometryInputFunSpec.kt +++ b/src/test/kotlin/org/sheinbergon/dremio/udf/gis/spec/GeometryInputFunSpec.kt @@ -44,7 +44,9 @@ abstract class GeometryInputFunSpec : Fu this.isSet shouldBeExactly 1 } - override fun NullableVarCharHolder.valueIsNotSet() = + override fun NullableVarCharHolder.valueIsNotSet() { this.isSet shouldBe 0 + } } abstract class NullableBitOutput : GeometryRelationFunSpec() { @@ -91,8 +92,9 @@ abstract class GeometryRelationFunSpec : Fu } } - override fun NullableBitHolder.valueIsNotSet() = + override fun NullableBitHolder.valueIsNotSet() { this.isSet shouldBe 0 + } } protected fun testNullGeometryRelation(