From 5b60730934cafef899e60fda15cd4c4ad9f0549a Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Thu, 28 Dec 2023 10:37:14 -0800 Subject: [PATCH 01/12] Refactor TypedFunction, ObjectProcessor, and ObjectProcessorFunctions * io.deephaven.functions: extensions/protobuf -> java/functions * io.deephaven.processor: extensions/kafka -> java/processor * io.deephaven.processor.functions: extensions/kafka -> java/processor-functions Introduced top-level directory `java/`, with the hopes of having it become the directory for new projects ala #4991 --- extensions/kafka/build.gradle | 2 + extensions/protobuf/build.gradle | 1 + java/functions/build.gradle | 19 +++ java/functions/gradle.properties | 1 + .../deephaven/functions/BooleanFunctions.java | 0 .../io/deephaven/functions/ByteFunctions.java | 0 .../io/deephaven/functions/CharFunctions.java | 0 .../deephaven/functions/DoubleFunctions.java | 0 .../deephaven/functions/FloatFunctions.java | 0 .../io/deephaven/functions/IntFunctions.java | 0 .../io/deephaven/functions/LongFunctions.java | 0 .../deephaven/functions/ObjectFunctions.java | 0 .../functions/PrimitiveFunctions.java | 0 .../deephaven/functions/ShortFunctions.java | 0 .../functions/ToBooleanFunction.java | 0 .../deephaven/functions/ToByteFunction.java | 0 .../deephaven/functions/ToCharFunction.java | 0 .../deephaven/functions/ToDoubleFunction.java | 0 .../deephaven/functions/ToFloatFunction.java | 0 .../io/deephaven/functions/ToIntFunction.java | 0 .../deephaven/functions/ToLongFunction.java | 0 .../deephaven/functions/ToObjectFunction.java | 0 .../functions/ToPrimitiveFunction.java | 0 .../deephaven/functions/ToShortFunction.java | 0 .../io/deephaven/functions/TypedFunction.java | 0 .../deephaven/functions/TypedFunctions.java | 0 .../functions/ToBooleanFunctionTest.java | 0 .../functions/ToByteFunctionTest.java | 0 .../functions/ToCharFunctionTest.java | 0 .../functions/ToDoubleFunctionTest.java | 0 .../functions/ToFloatFunctionTest.java | 0 .../functions/ToIntFunctionTest.java | 0 .../functions/ToLongFunctionTest.java | 0 .../functions/ToObjectFunctionTest.java | 0 .../functions/ToShortFunctionTest.java | 0 java/processor-functions/build.gradle | 16 ++ java/processor-functions/gradle.properties | 1 + .../processor/functions/ChunkUtils.java | 138 ++++++++++++++++++ .../functions/ObjectProcessorFunctions.java | 0 .../ObjectProcessorFunctionsImpl.java | 1 - .../ObjectProcessorFunctionsTest.java | 0 java/processor/build.gradle | 16 ++ java/processor/gradle.properties | 1 + .../deephaven/processor/ObjectProcessor.java | 2 +- .../processor/ObjectProcessorNoop.java | 0 .../processor/ObjectProcessorRowLimited.java | 0 .../processor/ObjectProcessorStrict.java | 0 .../processor/ObjectProcessorTypes.java | 0 .../processor/ObjectProcessorNoopTest.java | 0 .../ObjectProcessorRowLimitedTest.java | 0 .../processor/ObjectProcessorStrictTest.java | 0 .../processor/ObjectProcessorTest.java | 0 settings.gradle | 9 ++ 53 files changed, 205 insertions(+), 2 deletions(-) create mode 100644 java/functions/build.gradle create mode 100644 java/functions/gradle.properties rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/BooleanFunctions.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/ByteFunctions.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/CharFunctions.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/DoubleFunctions.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/FloatFunctions.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/IntFunctions.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/LongFunctions.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/ObjectFunctions.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/PrimitiveFunctions.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/ShortFunctions.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/ToBooleanFunction.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/ToByteFunction.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/ToCharFunction.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/ToDoubleFunction.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/ToFloatFunction.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/ToIntFunction.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/ToLongFunction.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/ToObjectFunction.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/ToPrimitiveFunction.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/ToShortFunction.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/TypedFunction.java (100%) rename {extensions/protobuf => java/functions}/src/main/java/io/deephaven/functions/TypedFunctions.java (100%) rename {extensions/protobuf => java/functions}/src/test/java/io/deephaven/functions/ToBooleanFunctionTest.java (100%) rename {extensions/protobuf => java/functions}/src/test/java/io/deephaven/functions/ToByteFunctionTest.java (100%) rename {extensions/protobuf => java/functions}/src/test/java/io/deephaven/functions/ToCharFunctionTest.java (100%) rename {extensions/protobuf => java/functions}/src/test/java/io/deephaven/functions/ToDoubleFunctionTest.java (100%) rename {extensions/protobuf => java/functions}/src/test/java/io/deephaven/functions/ToFloatFunctionTest.java (100%) rename {extensions/protobuf => java/functions}/src/test/java/io/deephaven/functions/ToIntFunctionTest.java (100%) rename {extensions/protobuf => java/functions}/src/test/java/io/deephaven/functions/ToLongFunctionTest.java (100%) rename {extensions/protobuf => java/functions}/src/test/java/io/deephaven/functions/ToObjectFunctionTest.java (100%) rename {extensions/protobuf => java/functions}/src/test/java/io/deephaven/functions/ToShortFunctionTest.java (100%) create mode 100644 java/processor-functions/build.gradle create mode 100644 java/processor-functions/gradle.properties create mode 100644 java/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java rename {extensions/kafka => java/processor-functions}/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java (100%) rename {extensions/kafka => java/processor-functions}/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java (99%) rename {extensions/kafka => java/processor-functions}/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java (100%) create mode 100644 java/processor/build.gradle create mode 100644 java/processor/gradle.properties rename {extensions/kafka => java/processor}/src/main/java/io/deephaven/processor/ObjectProcessor.java (98%) rename {extensions/kafka => java/processor}/src/main/java/io/deephaven/processor/ObjectProcessorNoop.java (100%) rename {extensions/kafka => java/processor}/src/main/java/io/deephaven/processor/ObjectProcessorRowLimited.java (100%) rename {extensions/kafka => java/processor}/src/main/java/io/deephaven/processor/ObjectProcessorStrict.java (100%) rename {extensions/kafka => java/processor}/src/main/java/io/deephaven/processor/ObjectProcessorTypes.java (100%) rename {extensions/kafka => java/processor}/src/test/java/io/deephaven/processor/ObjectProcessorNoopTest.java (100%) rename {extensions/kafka => java/processor}/src/test/java/io/deephaven/processor/ObjectProcessorRowLimitedTest.java (100%) rename {extensions/kafka => java/processor}/src/test/java/io/deephaven/processor/ObjectProcessorStrictTest.java (100%) rename {extensions/kafka => java/processor}/src/test/java/io/deephaven/processor/ObjectProcessorTest.java (100%) diff --git a/extensions/kafka/build.gradle b/extensions/kafka/build.gradle index 0543ed01a0b..91501af62de 100644 --- a/extensions/kafka/build.gradle +++ b/extensions/kafka/build.gradle @@ -8,6 +8,8 @@ description 'Kafka: Integrating Engine tables with Kafka' dependencies { api project(':engine-table') + api project(':processor') + api 'org.apache.avro:avro:1.11.2' // Using io.confluent dependencies requires code in the toplevel build.gradle to add their maven repository. diff --git a/extensions/protobuf/build.gradle b/extensions/protobuf/build.gradle index 5216aea91e2..61552cf1dea 100644 --- a/extensions/protobuf/build.gradle +++ b/extensions/protobuf/build.gradle @@ -6,6 +6,7 @@ plugins { dependencies { api project(':qst') + api project(':functions') api 'com.google.protobuf:protobuf-java:3.24.1' implementation project(':engine-query-constants') diff --git a/java/functions/build.gradle b/java/functions/build.gradle new file mode 100644 index 00000000000..1cd76588868 --- /dev/null +++ b/java/functions/build.gradle @@ -0,0 +1,19 @@ +plugins { + id 'java-library' + id 'io.deephaven.project.register' +} + +dependencies { + api project(':qst') + + compileOnly depAnnotations + + Classpaths.inheritJUnitPlatform(project) + Classpaths.inheritAssertJ(project) + testImplementation 'org.junit.jupiter:junit-jupiter' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' +} + +test { + useJUnitPlatform() +} diff --git a/java/functions/gradle.properties b/java/functions/gradle.properties new file mode 100644 index 00000000000..c186bbfdde1 --- /dev/null +++ b/java/functions/gradle.properties @@ -0,0 +1 @@ +io.deephaven.project.ProjectType=JAVA_PUBLIC diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/BooleanFunctions.java b/java/functions/src/main/java/io/deephaven/functions/BooleanFunctions.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/BooleanFunctions.java rename to java/functions/src/main/java/io/deephaven/functions/BooleanFunctions.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/ByteFunctions.java b/java/functions/src/main/java/io/deephaven/functions/ByteFunctions.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/ByteFunctions.java rename to java/functions/src/main/java/io/deephaven/functions/ByteFunctions.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/CharFunctions.java b/java/functions/src/main/java/io/deephaven/functions/CharFunctions.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/CharFunctions.java rename to java/functions/src/main/java/io/deephaven/functions/CharFunctions.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/DoubleFunctions.java b/java/functions/src/main/java/io/deephaven/functions/DoubleFunctions.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/DoubleFunctions.java rename to java/functions/src/main/java/io/deephaven/functions/DoubleFunctions.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/FloatFunctions.java b/java/functions/src/main/java/io/deephaven/functions/FloatFunctions.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/FloatFunctions.java rename to java/functions/src/main/java/io/deephaven/functions/FloatFunctions.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/IntFunctions.java b/java/functions/src/main/java/io/deephaven/functions/IntFunctions.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/IntFunctions.java rename to java/functions/src/main/java/io/deephaven/functions/IntFunctions.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/LongFunctions.java b/java/functions/src/main/java/io/deephaven/functions/LongFunctions.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/LongFunctions.java rename to java/functions/src/main/java/io/deephaven/functions/LongFunctions.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/ObjectFunctions.java b/java/functions/src/main/java/io/deephaven/functions/ObjectFunctions.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/ObjectFunctions.java rename to java/functions/src/main/java/io/deephaven/functions/ObjectFunctions.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/PrimitiveFunctions.java b/java/functions/src/main/java/io/deephaven/functions/PrimitiveFunctions.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/PrimitiveFunctions.java rename to java/functions/src/main/java/io/deephaven/functions/PrimitiveFunctions.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/ShortFunctions.java b/java/functions/src/main/java/io/deephaven/functions/ShortFunctions.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/ShortFunctions.java rename to java/functions/src/main/java/io/deephaven/functions/ShortFunctions.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/ToBooleanFunction.java b/java/functions/src/main/java/io/deephaven/functions/ToBooleanFunction.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/ToBooleanFunction.java rename to java/functions/src/main/java/io/deephaven/functions/ToBooleanFunction.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/ToByteFunction.java b/java/functions/src/main/java/io/deephaven/functions/ToByteFunction.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/ToByteFunction.java rename to java/functions/src/main/java/io/deephaven/functions/ToByteFunction.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/ToCharFunction.java b/java/functions/src/main/java/io/deephaven/functions/ToCharFunction.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/ToCharFunction.java rename to java/functions/src/main/java/io/deephaven/functions/ToCharFunction.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/ToDoubleFunction.java b/java/functions/src/main/java/io/deephaven/functions/ToDoubleFunction.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/ToDoubleFunction.java rename to java/functions/src/main/java/io/deephaven/functions/ToDoubleFunction.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/ToFloatFunction.java b/java/functions/src/main/java/io/deephaven/functions/ToFloatFunction.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/ToFloatFunction.java rename to java/functions/src/main/java/io/deephaven/functions/ToFloatFunction.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/ToIntFunction.java b/java/functions/src/main/java/io/deephaven/functions/ToIntFunction.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/ToIntFunction.java rename to java/functions/src/main/java/io/deephaven/functions/ToIntFunction.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/ToLongFunction.java b/java/functions/src/main/java/io/deephaven/functions/ToLongFunction.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/ToLongFunction.java rename to java/functions/src/main/java/io/deephaven/functions/ToLongFunction.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/ToObjectFunction.java b/java/functions/src/main/java/io/deephaven/functions/ToObjectFunction.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/ToObjectFunction.java rename to java/functions/src/main/java/io/deephaven/functions/ToObjectFunction.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/ToPrimitiveFunction.java b/java/functions/src/main/java/io/deephaven/functions/ToPrimitiveFunction.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/ToPrimitiveFunction.java rename to java/functions/src/main/java/io/deephaven/functions/ToPrimitiveFunction.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/ToShortFunction.java b/java/functions/src/main/java/io/deephaven/functions/ToShortFunction.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/ToShortFunction.java rename to java/functions/src/main/java/io/deephaven/functions/ToShortFunction.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/TypedFunction.java b/java/functions/src/main/java/io/deephaven/functions/TypedFunction.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/TypedFunction.java rename to java/functions/src/main/java/io/deephaven/functions/TypedFunction.java diff --git a/extensions/protobuf/src/main/java/io/deephaven/functions/TypedFunctions.java b/java/functions/src/main/java/io/deephaven/functions/TypedFunctions.java similarity index 100% rename from extensions/protobuf/src/main/java/io/deephaven/functions/TypedFunctions.java rename to java/functions/src/main/java/io/deephaven/functions/TypedFunctions.java diff --git a/extensions/protobuf/src/test/java/io/deephaven/functions/ToBooleanFunctionTest.java b/java/functions/src/test/java/io/deephaven/functions/ToBooleanFunctionTest.java similarity index 100% rename from extensions/protobuf/src/test/java/io/deephaven/functions/ToBooleanFunctionTest.java rename to java/functions/src/test/java/io/deephaven/functions/ToBooleanFunctionTest.java diff --git a/extensions/protobuf/src/test/java/io/deephaven/functions/ToByteFunctionTest.java b/java/functions/src/test/java/io/deephaven/functions/ToByteFunctionTest.java similarity index 100% rename from extensions/protobuf/src/test/java/io/deephaven/functions/ToByteFunctionTest.java rename to java/functions/src/test/java/io/deephaven/functions/ToByteFunctionTest.java diff --git a/extensions/protobuf/src/test/java/io/deephaven/functions/ToCharFunctionTest.java b/java/functions/src/test/java/io/deephaven/functions/ToCharFunctionTest.java similarity index 100% rename from extensions/protobuf/src/test/java/io/deephaven/functions/ToCharFunctionTest.java rename to java/functions/src/test/java/io/deephaven/functions/ToCharFunctionTest.java diff --git a/extensions/protobuf/src/test/java/io/deephaven/functions/ToDoubleFunctionTest.java b/java/functions/src/test/java/io/deephaven/functions/ToDoubleFunctionTest.java similarity index 100% rename from extensions/protobuf/src/test/java/io/deephaven/functions/ToDoubleFunctionTest.java rename to java/functions/src/test/java/io/deephaven/functions/ToDoubleFunctionTest.java diff --git a/extensions/protobuf/src/test/java/io/deephaven/functions/ToFloatFunctionTest.java b/java/functions/src/test/java/io/deephaven/functions/ToFloatFunctionTest.java similarity index 100% rename from extensions/protobuf/src/test/java/io/deephaven/functions/ToFloatFunctionTest.java rename to java/functions/src/test/java/io/deephaven/functions/ToFloatFunctionTest.java diff --git a/extensions/protobuf/src/test/java/io/deephaven/functions/ToIntFunctionTest.java b/java/functions/src/test/java/io/deephaven/functions/ToIntFunctionTest.java similarity index 100% rename from extensions/protobuf/src/test/java/io/deephaven/functions/ToIntFunctionTest.java rename to java/functions/src/test/java/io/deephaven/functions/ToIntFunctionTest.java diff --git a/extensions/protobuf/src/test/java/io/deephaven/functions/ToLongFunctionTest.java b/java/functions/src/test/java/io/deephaven/functions/ToLongFunctionTest.java similarity index 100% rename from extensions/protobuf/src/test/java/io/deephaven/functions/ToLongFunctionTest.java rename to java/functions/src/test/java/io/deephaven/functions/ToLongFunctionTest.java diff --git a/extensions/protobuf/src/test/java/io/deephaven/functions/ToObjectFunctionTest.java b/java/functions/src/test/java/io/deephaven/functions/ToObjectFunctionTest.java similarity index 100% rename from extensions/protobuf/src/test/java/io/deephaven/functions/ToObjectFunctionTest.java rename to java/functions/src/test/java/io/deephaven/functions/ToObjectFunctionTest.java diff --git a/extensions/protobuf/src/test/java/io/deephaven/functions/ToShortFunctionTest.java b/java/functions/src/test/java/io/deephaven/functions/ToShortFunctionTest.java similarity index 100% rename from extensions/protobuf/src/test/java/io/deephaven/functions/ToShortFunctionTest.java rename to java/functions/src/test/java/io/deephaven/functions/ToShortFunctionTest.java diff --git a/java/processor-functions/build.gradle b/java/processor-functions/build.gradle new file mode 100644 index 00000000000..aed95d07f3f --- /dev/null +++ b/java/processor-functions/build.gradle @@ -0,0 +1,16 @@ +plugins { + id 'java-library' + id 'io.deephaven.project.register' +} + + +dependencies { + api project(':processor') + api project(':functions') + + implementation project(':engine-time') + + Classpaths.inheritJUnitClassic(project, 'testImplementation') + Classpaths.inheritSlf4j(project, 'slf4j-simple', 'testRuntimeOnly') + Classpaths.inheritAssertJ(project) +} diff --git a/java/processor-functions/gradle.properties b/java/processor-functions/gradle.properties new file mode 100644 index 00000000000..c186bbfdde1 --- /dev/null +++ b/java/processor-functions/gradle.properties @@ -0,0 +1 @@ +io.deephaven.project.ProjectType=JAVA_PUBLIC diff --git a/java/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java b/java/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java new file mode 100644 index 00000000000..31e6f5efbe6 --- /dev/null +++ b/java/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending + */ +package io.deephaven.processor.functions; + +import io.deephaven.chunk.ObjectChunk; +import io.deephaven.chunk.WritableBooleanChunk; +import io.deephaven.chunk.WritableByteChunk; +import io.deephaven.chunk.WritableCharChunk; +import io.deephaven.chunk.WritableDoubleChunk; +import io.deephaven.chunk.WritableFloatChunk; +import io.deephaven.chunk.WritableIntChunk; +import io.deephaven.chunk.WritableLongChunk; +import io.deephaven.chunk.WritableObjectChunk; +import io.deephaven.chunk.WritableShortChunk; +import io.deephaven.functions.ToByteFunction; +import io.deephaven.functions.ToCharFunction; +import io.deephaven.functions.ToFloatFunction; +import io.deephaven.functions.ToShortFunction; + +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.function.ToDoubleFunction; +import java.util.function.ToIntFunction; +import java.util.function.ToLongFunction; + +final class ChunkUtils { + + // Copy from io.deephaven.kafka.ingest.ChunkUtils + + public static void applyInto( + Predicate booleanFunction, + ObjectChunk src, + int srcOffset, + WritableBooleanChunk dest, + int destOffset, + int length) { + for (int i = 0; i < length; ++i) { + dest.set(destOffset + i, booleanFunction.test(src.get(i + srcOffset))); + } + } + + public static void applyInto( + ToByteFunction byteFunction, + ObjectChunk src, + int srcOffset, + WritableByteChunk dest, + int destOffset, + int length) { + for (int i = 0; i < length; ++i) { + dest.set(destOffset + i, byteFunction.applyAsByte(src.get(srcOffset + i))); + } + } + + public static void applyInto( + ToCharFunction charFunction, + ObjectChunk src, + int srcOffset, + WritableCharChunk dest, + int destOffset, + int length) { + for (int i = 0; i < length; ++i) { + dest.set(destOffset + i, charFunction.applyAsChar(src.get(srcOffset + i))); + } + } + + public static void applyInto( + ToShortFunction shortFunction, + ObjectChunk src, + int srcOffset, + WritableShortChunk dest, + int destOffset, + int length) { + for (int i = 0; i < length; ++i) { + dest.set(destOffset + i, shortFunction.applyAsShort(src.get(srcOffset + i))); + } + } + + public static void applyInto( + ToIntFunction intFunction, + ObjectChunk src, + int srcOffset, + WritableIntChunk dest, + int destOffset, + int length) { + for (int i = 0; i < length; ++i) { + dest.set(destOffset + i, intFunction.applyAsInt(src.get(srcOffset + i))); + } + } + + public static void applyInto( + ToLongFunction longFunction, + ObjectChunk src, + int srcOffset, + WritableLongChunk dest, + int destOffset, + int length) { + for (int i = 0; i < length; ++i) { + dest.set(destOffset + i, longFunction.applyAsLong(src.get(srcOffset + i))); + } + } + + public static void applyInto( + ToFloatFunction floatFunction, + ObjectChunk src, + int srcOffset, + WritableFloatChunk dest, + int destOffset, + int length) { + for (int i = 0; i < length; ++i) { + dest.set(destOffset + i, floatFunction.applyAsFloat(src.get(srcOffset + i))); + } + } + + public static void applyInto( + ToDoubleFunction doubleFunction, + ObjectChunk src, + int srcOffset, + WritableDoubleChunk dest, + int destOffset, + int length) { + for (int i = 0; i < length; ++i) { + dest.set(destOffset + i, doubleFunction.applyAsDouble(src.get(srcOffset + i))); + } + } + + public static void applyInto( + Function objFunction, + ObjectChunk src, + int srcOffset, + WritableObjectChunk dest, + int destOffset, + int length) { + for (int i = 0; i < length; ++i) { + dest.set(destOffset + i, objFunction.apply(src.get(srcOffset + i))); + } + } +} diff --git a/extensions/kafka/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java b/java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java similarity index 100% rename from extensions/kafka/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java rename to java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java diff --git a/extensions/kafka/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java b/java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java similarity index 99% rename from extensions/kafka/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java rename to java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java index afa4763c204..cd3655ab710 100644 --- a/extensions/kafka/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java +++ b/java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java @@ -24,7 +24,6 @@ import io.deephaven.functions.ToPrimitiveFunction; import io.deephaven.functions.ToShortFunction; import io.deephaven.functions.TypedFunction; -import io.deephaven.kafka.ingest.ChunkUtils; import io.deephaven.processor.ObjectProcessor; import io.deephaven.qst.type.ArrayType; import io.deephaven.qst.type.BoxedBooleanType; diff --git a/extensions/kafka/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java b/java/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java similarity index 100% rename from extensions/kafka/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java rename to java/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java diff --git a/java/processor/build.gradle b/java/processor/build.gradle new file mode 100644 index 00000000000..911942c33e3 --- /dev/null +++ b/java/processor/build.gradle @@ -0,0 +1,16 @@ +plugins { + id 'java-library' + id 'io.deephaven.project.register' +} + + +dependencies { + api project(':qst') + api project(':engine-chunk') + + implementation project(':engine-time') + + Classpaths.inheritJUnitClassic(project, 'testImplementation') + Classpaths.inheritSlf4j(project, 'slf4j-simple', 'testRuntimeOnly') + Classpaths.inheritAssertJ(project) +} diff --git a/java/processor/gradle.properties b/java/processor/gradle.properties new file mode 100644 index 00000000000..c186bbfdde1 --- /dev/null +++ b/java/processor/gradle.properties @@ -0,0 +1 @@ +io.deephaven.project.ProjectType=JAVA_PUBLIC diff --git a/extensions/kafka/src/main/java/io/deephaven/processor/ObjectProcessor.java b/java/processor/src/main/java/io/deephaven/processor/ObjectProcessor.java similarity index 98% rename from extensions/kafka/src/main/java/io/deephaven/processor/ObjectProcessor.java rename to java/processor/src/main/java/io/deephaven/processor/ObjectProcessor.java index 3a5b46c6253..6128ec0536b 100644 --- a/extensions/kafka/src/main/java/io/deephaven/processor/ObjectProcessor.java +++ b/java/processor/src/main/java/io/deephaven/processor/ObjectProcessor.java @@ -129,7 +129,7 @@ static ObjectProcessor noop(List> outputTypes, boolean fillWithNu * * * {@link InstantType} - * {@link ChunkType#Long} ({@link io.deephaven.time.DateTimeUtils#epochNanos(Instant)}) + * {@link ChunkType#Long} (io.deephaven.time.DateTimeUtils#epochNanos(Instant)) * * * All other {@link GenericType} diff --git a/extensions/kafka/src/main/java/io/deephaven/processor/ObjectProcessorNoop.java b/java/processor/src/main/java/io/deephaven/processor/ObjectProcessorNoop.java similarity index 100% rename from extensions/kafka/src/main/java/io/deephaven/processor/ObjectProcessorNoop.java rename to java/processor/src/main/java/io/deephaven/processor/ObjectProcessorNoop.java diff --git a/extensions/kafka/src/main/java/io/deephaven/processor/ObjectProcessorRowLimited.java b/java/processor/src/main/java/io/deephaven/processor/ObjectProcessorRowLimited.java similarity index 100% rename from extensions/kafka/src/main/java/io/deephaven/processor/ObjectProcessorRowLimited.java rename to java/processor/src/main/java/io/deephaven/processor/ObjectProcessorRowLimited.java diff --git a/extensions/kafka/src/main/java/io/deephaven/processor/ObjectProcessorStrict.java b/java/processor/src/main/java/io/deephaven/processor/ObjectProcessorStrict.java similarity index 100% rename from extensions/kafka/src/main/java/io/deephaven/processor/ObjectProcessorStrict.java rename to java/processor/src/main/java/io/deephaven/processor/ObjectProcessorStrict.java diff --git a/extensions/kafka/src/main/java/io/deephaven/processor/ObjectProcessorTypes.java b/java/processor/src/main/java/io/deephaven/processor/ObjectProcessorTypes.java similarity index 100% rename from extensions/kafka/src/main/java/io/deephaven/processor/ObjectProcessorTypes.java rename to java/processor/src/main/java/io/deephaven/processor/ObjectProcessorTypes.java diff --git a/extensions/kafka/src/test/java/io/deephaven/processor/ObjectProcessorNoopTest.java b/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorNoopTest.java similarity index 100% rename from extensions/kafka/src/test/java/io/deephaven/processor/ObjectProcessorNoopTest.java rename to java/processor/src/test/java/io/deephaven/processor/ObjectProcessorNoopTest.java diff --git a/extensions/kafka/src/test/java/io/deephaven/processor/ObjectProcessorRowLimitedTest.java b/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorRowLimitedTest.java similarity index 100% rename from extensions/kafka/src/test/java/io/deephaven/processor/ObjectProcessorRowLimitedTest.java rename to java/processor/src/test/java/io/deephaven/processor/ObjectProcessorRowLimitedTest.java diff --git a/extensions/kafka/src/test/java/io/deephaven/processor/ObjectProcessorStrictTest.java b/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorStrictTest.java similarity index 100% rename from extensions/kafka/src/test/java/io/deephaven/processor/ObjectProcessorStrictTest.java rename to java/processor/src/test/java/io/deephaven/processor/ObjectProcessorStrictTest.java diff --git a/extensions/kafka/src/test/java/io/deephaven/processor/ObjectProcessorTest.java b/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorTest.java similarity index 100% rename from extensions/kafka/src/test/java/io/deephaven/processor/ObjectProcessorTest.java rename to java/processor/src/test/java/io/deephaven/processor/ObjectProcessorTest.java diff --git a/settings.gradle b/settings.gradle index fdd30f42cd8..5ffc2315821 100644 --- a/settings.gradle +++ b/settings.gradle @@ -377,6 +377,15 @@ include ':clock-impl' include ':sql' +include ':functions' +project(':functions').projectDir = file('java/functions') + +include ':processor' +project(':processor').projectDir = file('java/processor') + +include ':processor-functions' +project(':processor-functions').projectDir = file('java/processor-functions') + file("${rootDir}/docker/registry").list().each { name -> if (file("${rootDir}/docker/registry/${name}/build.gradle").exists()) { include(":docker-${name}") From aa0e4de03ff4bc4e54629679d7a9a1499bead6e3 Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Thu, 28 Dec 2023 10:48:28 -0800 Subject: [PATCH 02/12] Upgrade tests to JUnit platform --- java/processor-functions/build.gradle | 9 +++++++-- .../functions/ObjectProcessorFunctionsTest.java | 2 +- java/processor/build.gradle | 9 +++++++-- .../io/deephaven/processor/ObjectProcessorNoopTest.java | 2 +- .../processor/ObjectProcessorRowLimitedTest.java | 2 +- .../deephaven/processor/ObjectProcessorStrictTest.java | 2 +- .../java/io/deephaven/processor/ObjectProcessorTest.java | 2 +- 7 files changed, 19 insertions(+), 9 deletions(-) diff --git a/java/processor-functions/build.gradle b/java/processor-functions/build.gradle index aed95d07f3f..f1a13576ef6 100644 --- a/java/processor-functions/build.gradle +++ b/java/processor-functions/build.gradle @@ -10,7 +10,12 @@ dependencies { implementation project(':engine-time') - Classpaths.inheritJUnitClassic(project, 'testImplementation') - Classpaths.inheritSlf4j(project, 'slf4j-simple', 'testRuntimeOnly') + Classpaths.inheritJUnitPlatform(project) Classpaths.inheritAssertJ(project) + testImplementation 'org.junit.jupiter:junit-jupiter' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' +} + +test { + useJUnitPlatform() } diff --git a/java/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java b/java/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java index 66cf7fa1853..15c731ed839 100644 --- a/java/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java +++ b/java/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java @@ -23,7 +23,7 @@ import io.deephaven.processor.ObjectProcessor; import io.deephaven.qst.type.Type; import io.deephaven.util.BooleanUtils; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.List; diff --git a/java/processor/build.gradle b/java/processor/build.gradle index 911942c33e3..0e17a6301ee 100644 --- a/java/processor/build.gradle +++ b/java/processor/build.gradle @@ -10,7 +10,12 @@ dependencies { implementation project(':engine-time') - Classpaths.inheritJUnitClassic(project, 'testImplementation') - Classpaths.inheritSlf4j(project, 'slf4j-simple', 'testRuntimeOnly') + Classpaths.inheritJUnitPlatform(project) Classpaths.inheritAssertJ(project) + testImplementation 'org.junit.jupiter:junit-jupiter' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' +} + +test { + useJUnitPlatform() } diff --git a/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorNoopTest.java b/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorNoopTest.java index aa9ce50b2a3..3c76aa2efa0 100644 --- a/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorNoopTest.java +++ b/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorNoopTest.java @@ -14,7 +14,7 @@ import io.deephaven.chunk.WritableShortChunk; import io.deephaven.qst.type.Type; import io.deephaven.util.QueryConstants; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.List; diff --git a/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorRowLimitedTest.java b/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorRowLimitedTest.java index 89696c65bf2..338a2052ec1 100644 --- a/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorRowLimitedTest.java +++ b/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorRowLimitedTest.java @@ -8,7 +8,7 @@ import io.deephaven.chunk.WritableIntChunk; import io.deephaven.chunk.WritableObjectChunk; import io.deephaven.qst.type.Type; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.List; diff --git a/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorStrictTest.java b/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorStrictTest.java index 674ba8241ce..5f8c0760a87 100644 --- a/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorStrictTest.java +++ b/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorStrictTest.java @@ -12,7 +12,7 @@ import io.deephaven.chunk.attributes.Any; import io.deephaven.qst.type.Type; import io.deephaven.util.QueryConstants; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.List; diff --git a/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorTest.java b/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorTest.java index f87d9b10a68..4aebb796dd1 100644 --- a/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorTest.java +++ b/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorTest.java @@ -6,7 +6,7 @@ import io.deephaven.chunk.ChunkType; import io.deephaven.qst.type.PrimitiveType; import io.deephaven.qst.type.Type; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; From 6e940083e449f782442a3ef339ff95d3fa13a999 Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Fri, 19 Jan 2024 08:33:44 -0800 Subject: [PATCH 03/12] move to io.deephaven.function --- .../java/io/deephaven/kafka/BoxTransform.java | 22 ++++++++--------- .../kafka/DhNullableTypeTransform.java | 22 ++++++++--------- .../io/deephaven/kafka/NullFunctions.java | 22 ++++++++--------- .../java/io/deephaven/kafka/ProtobufImpl.java | 6 ++--- .../deephaven/kafka/ToChunkTypeTransform.java | 10 ++++---- .../io/deephaven/kafka/UnboxTransform.java | 20 ++++++++-------- .../kafka/ingest/BooleanFieldCopier.java | 2 +- .../kafka/ingest/ByteFieldCopier.java | 4 ++-- .../kafka/ingest/CharFieldCopier.java | 4 ++-- .../io/deephaven/kafka/ingest/ChunkUtils.java | 8 +++---- .../kafka/ingest/DoubleFieldCopier.java | 4 ++-- .../kafka/ingest/FieldCopierAdapter.java | 22 ++++++++--------- .../kafka/ingest/FloatFieldCopier.java | 4 ++-- .../kafka/ingest/IntFieldCopier.java | 4 ++-- .../kafka/ingest/LongFieldCopier.java | 4 ++-- .../kafka/ingest/ObjectFieldCopier.java | 2 +- .../kafka/ingest/ShortFieldCopier.java | 4 ++-- extensions/protobuf/build.gradle | 2 +- .../main/java/io/deephaven/protobuf/Box.java | 24 +++++++++---------- .../java/io/deephaven/protobuf/Builtin.java | 12 +++++----- .../io/deephaven/protobuf/BypassOnNull.java | 22 ++++++++--------- .../java/io/deephaven/protobuf/FieldPath.java | 2 +- .../io/deephaven/protobuf/MessageParser.java | 2 +- .../protobuf/MessageParserSingle.java | 2 +- .../ProtobufDescriptorParserImpl.java | 24 +++++++++---------- .../deephaven/protobuf/ProtobufFunction.java | 2 +- .../deephaven/protobuf/ProtobufFunctions.java | 2 +- .../protobuf/ByteWrapperCustomType.java | 6 ++--- .../io/deephaven/protobuf/FieldPathTest.java | 2 +- .../ProtobufDescriptorParserTest.java | 6 ++--- {java/functions => function}/build.gradle | 0 .../functions => function}/gradle.properties | 0 .../deephaven/function}/BooleanFunctions.java | 2 +- .../io/deephaven/function}/ByteFunctions.java | 2 +- .../io/deephaven/function}/CharFunctions.java | 2 +- .../deephaven/function}/DoubleFunctions.java | 2 +- .../deephaven/function}/FloatFunctions.java | 2 +- .../io/deephaven/function}/IntFunctions.java | 2 +- .../io/deephaven/function}/LongFunctions.java | 2 +- .../deephaven/function}/ObjectFunctions.java | 2 +- .../function}/PrimitiveFunctions.java | 2 +- .../deephaven/function}/ShortFunctions.java | 2 +- .../function}/ToBooleanFunction.java | 2 +- .../deephaven/function}/ToByteFunction.java | 2 +- .../deephaven/function}/ToCharFunction.java | 2 +- .../deephaven/function}/ToDoubleFunction.java | 2 +- .../deephaven/function}/ToFloatFunction.java | 2 +- .../io/deephaven/function}/ToIntFunction.java | 2 +- .../deephaven/function}/ToLongFunction.java | 2 +- .../deephaven/function}/ToObjectFunction.java | 2 +- .../function}/ToPrimitiveFunction.java | 2 +- .../deephaven/function}/ToShortFunction.java | 2 +- .../io/deephaven/function}/TypedFunction.java | 2 +- .../deephaven/function}/TypedFunctions.java | 2 +- .../function}/ToBooleanFunctionTest.java | 14 +++++------ .../function}/ToByteFunctionTest.java | 4 ++-- .../function}/ToCharFunctionTest.java | 4 ++-- .../function}/ToDoubleFunctionTest.java | 4 ++-- .../function}/ToFloatFunctionTest.java | 4 ++-- .../function}/ToIntFunctionTest.java | 4 ++-- .../function}/ToLongFunctionTest.java | 4 ++-- .../function}/ToObjectFunctionTest.java | 4 ++-- .../function}/ToShortFunctionTest.java | 4 ++-- java/processor-functions/build.gradle | 2 +- .../processor/functions/ChunkUtils.java | 8 +++---- .../functions/ObjectProcessorFunctions.java | 2 +- .../ObjectProcessorFunctionsImpl.java | 22 ++++++++--------- .../ObjectProcessorFunctionsTest.java | 16 ++++++------- settings.gradle | 4 ++-- 69 files changed, 208 insertions(+), 208 deletions(-) rename {java/functions => function}/build.gradle (100%) rename {java/functions => function}/gradle.properties (100%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/BooleanFunctions.java (99%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/ByteFunctions.java (97%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/CharFunctions.java (97%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/DoubleFunctions.java (98%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/FloatFunctions.java (97%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/IntFunctions.java (97%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/LongFunctions.java (97%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/ObjectFunctions.java (99%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/PrimitiveFunctions.java (98%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/ShortFunctions.java (97%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/ToBooleanFunction.java (99%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/ToByteFunction.java (97%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/ToCharFunction.java (97%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/ToDoubleFunction.java (97%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/ToFloatFunction.java (97%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/ToIntFunction.java (97%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/ToLongFunction.java (97%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/ToObjectFunction.java (99%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/ToPrimitiveFunction.java (97%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/ToShortFunction.java (97%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/TypedFunction.java (95%) rename {java/functions/src/main/java/io/deephaven/functions => function/src/main/java/io/deephaven/function}/TypedFunctions.java (97%) rename {java/functions/src/test/java/io/deephaven/functions => function/src/test/java/io/deephaven/function}/ToBooleanFunctionTest.java (92%) rename {java/functions/src/test/java/io/deephaven/functions => function/src/test/java/io/deephaven/function}/ToByteFunctionTest.java (84%) rename {java/functions/src/test/java/io/deephaven/functions => function/src/test/java/io/deephaven/function}/ToCharFunctionTest.java (84%) rename {java/functions/src/test/java/io/deephaven/functions => function/src/test/java/io/deephaven/function}/ToDoubleFunctionTest.java (81%) rename {java/functions/src/test/java/io/deephaven/functions => function/src/test/java/io/deephaven/function}/ToFloatFunctionTest.java (81%) rename {java/functions/src/test/java/io/deephaven/functions => function/src/test/java/io/deephaven/function}/ToIntFunctionTest.java (81%) rename {java/functions/src/test/java/io/deephaven/functions => function/src/test/java/io/deephaven/function}/ToLongFunctionTest.java (81%) rename {java/functions/src/test/java/io/deephaven/functions => function/src/test/java/io/deephaven/function}/ToObjectFunctionTest.java (88%) rename {java/functions/src/test/java/io/deephaven/functions => function/src/test/java/io/deephaven/function}/ToShortFunctionTest.java (82%) diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/BoxTransform.java b/extensions/kafka/src/main/java/io/deephaven/kafka/BoxTransform.java index 70ed02548c0..3bfe444f2e5 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/BoxTransform.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/BoxTransform.java @@ -3,17 +3,17 @@ */ package io.deephaven.kafka; -import io.deephaven.functions.ToBooleanFunction; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToCharFunction; -import io.deephaven.functions.ToDoubleFunction; -import io.deephaven.functions.ToFloatFunction; -import io.deephaven.functions.ToIntFunction; -import io.deephaven.functions.ToLongFunction; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.ToPrimitiveFunction; -import io.deephaven.functions.ToShortFunction; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.ToBooleanFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToCharFunction; +import io.deephaven.function.ToDoubleFunction; +import io.deephaven.function.ToFloatFunction; +import io.deephaven.function.ToIntFunction; +import io.deephaven.function.ToLongFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.ToPrimitiveFunction; +import io.deephaven.function.ToShortFunction; +import io.deephaven.function.TypedFunction; import io.deephaven.qst.type.BoxedBooleanType; import io.deephaven.qst.type.BoxedByteType; import io.deephaven.qst.type.BoxedCharType; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/DhNullableTypeTransform.java b/extensions/kafka/src/main/java/io/deephaven/kafka/DhNullableTypeTransform.java index 9132913f185..5a77aaac7df 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/DhNullableTypeTransform.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/DhNullableTypeTransform.java @@ -3,17 +3,17 @@ */ package io.deephaven.kafka; -import io.deephaven.functions.ToBooleanFunction; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToCharFunction; -import io.deephaven.functions.ToDoubleFunction; -import io.deephaven.functions.ToFloatFunction; -import io.deephaven.functions.ToIntFunction; -import io.deephaven.functions.ToLongFunction; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.ToPrimitiveFunction; -import io.deephaven.functions.ToShortFunction; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.ToBooleanFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToCharFunction; +import io.deephaven.function.ToDoubleFunction; +import io.deephaven.function.ToFloatFunction; +import io.deephaven.function.ToIntFunction; +import io.deephaven.function.ToLongFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.ToPrimitiveFunction; +import io.deephaven.function.ToShortFunction; +import io.deephaven.function.TypedFunction; class DhNullableTypeTransform { diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/NullFunctions.java b/extensions/kafka/src/main/java/io/deephaven/kafka/NullFunctions.java index 7e71c9ddae8..948d78430fc 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/NullFunctions.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/NullFunctions.java @@ -14,17 +14,17 @@ import io.deephaven.qst.type.PrimitiveType; import io.deephaven.qst.type.ShortType; import io.deephaven.qst.type.Type; -import io.deephaven.functions.ToBooleanFunction; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToCharFunction; -import io.deephaven.functions.ToDoubleFunction; -import io.deephaven.functions.ToFloatFunction; -import io.deephaven.functions.ToIntFunction; -import io.deephaven.functions.ToLongFunction; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.ToPrimitiveFunction; -import io.deephaven.functions.ToShortFunction; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.ToBooleanFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToCharFunction; +import io.deephaven.function.ToDoubleFunction; +import io.deephaven.function.ToFloatFunction; +import io.deephaven.function.ToIntFunction; +import io.deephaven.function.ToLongFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.ToPrimitiveFunction; +import io.deephaven.function.ToShortFunction; +import io.deephaven.function.TypedFunction; import io.deephaven.util.QueryConstants; import java.util.Optional; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ProtobufImpl.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ProtobufImpl.java index a545763f2b4..e59986ec2bf 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ProtobufImpl.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ProtobufImpl.java @@ -17,9 +17,9 @@ import io.deephaven.api.ColumnName; import io.deephaven.engine.table.ColumnDefinition; import io.deephaven.engine.table.TableDefinition; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.ToPrimitiveFunction; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.ToPrimitiveFunction; +import io.deephaven.function.TypedFunction; import io.deephaven.kafka.KafkaTools.Consume; import io.deephaven.kafka.KafkaTools.KeyOrValue; import io.deephaven.kafka.KafkaTools.KeyOrValueIngestData; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ToChunkTypeTransform.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ToChunkTypeTransform.java index 0e03f8dfd09..29c28eb8aa3 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ToChunkTypeTransform.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ToChunkTypeTransform.java @@ -3,11 +3,11 @@ */ package io.deephaven.kafka; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToLongFunction; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.ToPrimitiveFunction; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToLongFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.ToPrimitiveFunction; +import io.deephaven.function.TypedFunction; import io.deephaven.qst.type.ArrayType; import io.deephaven.qst.type.BoxedBooleanType; import io.deephaven.qst.type.BoxedByteType; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/UnboxTransform.java b/extensions/kafka/src/main/java/io/deephaven/kafka/UnboxTransform.java index 9fb4122891a..ba1c2a741f9 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/UnboxTransform.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/UnboxTransform.java @@ -3,16 +3,16 @@ */ package io.deephaven.kafka; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToCharFunction; -import io.deephaven.functions.ToDoubleFunction; -import io.deephaven.functions.ToFloatFunction; -import io.deephaven.functions.ToIntFunction; -import io.deephaven.functions.ToLongFunction; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.ToPrimitiveFunction; -import io.deephaven.functions.ToShortFunction; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToCharFunction; +import io.deephaven.function.ToDoubleFunction; +import io.deephaven.function.ToFloatFunction; +import io.deephaven.function.ToIntFunction; +import io.deephaven.function.ToLongFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.ToPrimitiveFunction; +import io.deephaven.function.ToShortFunction; +import io.deephaven.function.TypedFunction; import io.deephaven.qst.type.ArrayType; import io.deephaven.qst.type.BoxedBooleanType; import io.deephaven.qst.type.BoxedByteType; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/BooleanFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/BooleanFieldCopier.java index 96c3b69f025..fa39ef15ebf 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/BooleanFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/BooleanFieldCopier.java @@ -6,7 +6,7 @@ import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.WritableChunk; import io.deephaven.chunk.attributes.Values; -import io.deephaven.functions.ToBooleanFunction; +import io.deephaven.function.ToBooleanFunction; import java.util.Objects; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ByteFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ByteFieldCopier.java index 077d8646c9a..f2a9c53aedd 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ByteFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ByteFieldCopier.java @@ -6,8 +6,8 @@ import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.WritableChunk; import io.deephaven.chunk.attributes.Values; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToObjectFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToObjectFunction; import io.deephaven.util.BooleanUtils; import io.deephaven.util.type.TypeUtils; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/CharFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/CharFieldCopier.java index 0eb3b5b3f81..bea9677d6c8 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/CharFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/CharFieldCopier.java @@ -6,8 +6,8 @@ import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.WritableChunk; import io.deephaven.chunk.attributes.Values; -import io.deephaven.functions.ToCharFunction; -import io.deephaven.functions.ToObjectFunction; +import io.deephaven.function.ToCharFunction; +import io.deephaven.function.ToObjectFunction; import io.deephaven.util.type.TypeUtils; import java.util.Objects; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ChunkUtils.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ChunkUtils.java index f7bdb400b4d..fee2f0b39c3 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ChunkUtils.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ChunkUtils.java @@ -13,10 +13,10 @@ import io.deephaven.chunk.WritableLongChunk; import io.deephaven.chunk.WritableObjectChunk; import io.deephaven.chunk.WritableShortChunk; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToCharFunction; -import io.deephaven.functions.ToFloatFunction; -import io.deephaven.functions.ToShortFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToCharFunction; +import io.deephaven.function.ToFloatFunction; +import io.deephaven.function.ToShortFunction; import java.util.function.Function; import java.util.function.Predicate; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/DoubleFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/DoubleFieldCopier.java index 1b82518af52..f03e398fc1b 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/DoubleFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/DoubleFieldCopier.java @@ -6,8 +6,8 @@ import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.WritableChunk; import io.deephaven.chunk.attributes.Values; -import io.deephaven.functions.ToDoubleFunction; -import io.deephaven.functions.ToObjectFunction; +import io.deephaven.function.ToDoubleFunction; +import io.deephaven.function.ToObjectFunction; import io.deephaven.util.type.TypeUtils; import java.util.Objects; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java index 896dc8749e4..f4d3a9e6bab 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java @@ -4,17 +4,17 @@ package io.deephaven.kafka.ingest; import io.deephaven.qst.type.BoxedBooleanType; -import io.deephaven.functions.ToBooleanFunction; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToCharFunction; -import io.deephaven.functions.ToDoubleFunction; -import io.deephaven.functions.ToFloatFunction; -import io.deephaven.functions.ToIntFunction; -import io.deephaven.functions.ToLongFunction; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.ToPrimitiveFunction; -import io.deephaven.functions.ToShortFunction; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.ToBooleanFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToCharFunction; +import io.deephaven.function.ToDoubleFunction; +import io.deephaven.function.ToFloatFunction; +import io.deephaven.function.ToIntFunction; +import io.deephaven.function.ToLongFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.ToPrimitiveFunction; +import io.deephaven.function.ToShortFunction; +import io.deephaven.function.TypedFunction; public enum FieldCopierAdapter implements TypedFunction.Visitor, ToPrimitiveFunction.Visitor { diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FloatFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FloatFieldCopier.java index 8be6811daae..c9df34226f7 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FloatFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FloatFieldCopier.java @@ -6,8 +6,8 @@ import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.WritableChunk; import io.deephaven.chunk.attributes.Values; -import io.deephaven.functions.ToFloatFunction; -import io.deephaven.functions.ToObjectFunction; +import io.deephaven.function.ToFloatFunction; +import io.deephaven.function.ToObjectFunction; import io.deephaven.util.type.TypeUtils; import java.util.Objects; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/IntFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/IntFieldCopier.java index 6e73a805f5a..25e130dbc04 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/IntFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/IntFieldCopier.java @@ -6,8 +6,8 @@ import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.WritableChunk; import io.deephaven.chunk.attributes.Values; -import io.deephaven.functions.ToIntFunction; -import io.deephaven.functions.ToObjectFunction; +import io.deephaven.function.ToIntFunction; +import io.deephaven.function.ToObjectFunction; import io.deephaven.util.type.TypeUtils; import java.util.Objects; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/LongFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/LongFieldCopier.java index 78ccbd46051..7fd58551130 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/LongFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/LongFieldCopier.java @@ -6,8 +6,8 @@ import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.WritableChunk; import io.deephaven.chunk.attributes.Values; -import io.deephaven.functions.ToLongFunction; -import io.deephaven.functions.ToObjectFunction; +import io.deephaven.function.ToLongFunction; +import io.deephaven.function.ToObjectFunction; import io.deephaven.util.type.TypeUtils; import java.util.Objects; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ObjectFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ObjectFieldCopier.java index 7bdf39051d8..9ea7ae0a808 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ObjectFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ObjectFieldCopier.java @@ -6,7 +6,7 @@ import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.WritableChunk; import io.deephaven.chunk.attributes.Values; -import io.deephaven.functions.ToObjectFunction; +import io.deephaven.function.ToObjectFunction; import java.util.Objects; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ShortFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ShortFieldCopier.java index a14cab19ada..3e395e4c1ba 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ShortFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ShortFieldCopier.java @@ -6,8 +6,8 @@ import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.WritableChunk; import io.deephaven.chunk.attributes.Values; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.ToShortFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.ToShortFunction; import io.deephaven.util.type.TypeUtils; import java.util.Objects; diff --git a/extensions/protobuf/build.gradle b/extensions/protobuf/build.gradle index 61552cf1dea..39678a2438c 100644 --- a/extensions/protobuf/build.gradle +++ b/extensions/protobuf/build.gradle @@ -6,7 +6,7 @@ plugins { dependencies { api project(':qst') - api project(':functions') + api project(':function') api 'com.google.protobuf:protobuf-java:3.24.1' implementation project(':engine-query-constants') diff --git a/extensions/protobuf/src/main/java/io/deephaven/protobuf/Box.java b/extensions/protobuf/src/main/java/io/deephaven/protobuf/Box.java index 618374f1680..f146ef99eab 100644 --- a/extensions/protobuf/src/main/java/io/deephaven/protobuf/Box.java +++ b/extensions/protobuf/src/main/java/io/deephaven/protobuf/Box.java @@ -3,18 +3,18 @@ */ package io.deephaven.protobuf; -import io.deephaven.functions.ToBooleanFunction; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToCharFunction; -import io.deephaven.functions.ToDoubleFunction; -import io.deephaven.functions.ToFloatFunction; -import io.deephaven.functions.ToIntFunction; -import io.deephaven.functions.ToLongFunction; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.ToPrimitiveFunction; -import io.deephaven.functions.ToShortFunction; -import io.deephaven.functions.TypedFunction; -import io.deephaven.functions.TypedFunction.Visitor; +import io.deephaven.function.ToBooleanFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToCharFunction; +import io.deephaven.function.ToDoubleFunction; +import io.deephaven.function.ToFloatFunction; +import io.deephaven.function.ToIntFunction; +import io.deephaven.function.ToLongFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.ToPrimitiveFunction; +import io.deephaven.function.ToShortFunction; +import io.deephaven.function.TypedFunction; +import io.deephaven.function.TypedFunction.Visitor; class Box implements Visitor, ToPrimitiveFunction.Visitor { public static Object apply(TypedFunction f, T value) { diff --git a/extensions/protobuf/src/main/java/io/deephaven/protobuf/Builtin.java b/extensions/protobuf/src/main/java/io/deephaven/protobuf/Builtin.java index 4837d967c93..65794fa64c3 100644 --- a/extensions/protobuf/src/main/java/io/deephaven/protobuf/Builtin.java +++ b/extensions/protobuf/src/main/java/io/deephaven/protobuf/Builtin.java @@ -20,12 +20,12 @@ import com.google.protobuf.Timestamp; import com.google.protobuf.UInt32Value; import com.google.protobuf.UInt64Value; -import io.deephaven.functions.ToBooleanFunction; -import io.deephaven.functions.ToDoubleFunction; -import io.deephaven.functions.ToFloatFunction; -import io.deephaven.functions.ToIntFunction; -import io.deephaven.functions.ToLongFunction; -import io.deephaven.functions.ToObjectFunction; +import io.deephaven.function.ToBooleanFunction; +import io.deephaven.function.ToDoubleFunction; +import io.deephaven.function.ToFloatFunction; +import io.deephaven.function.ToIntFunction; +import io.deephaven.function.ToLongFunction; +import io.deephaven.function.ToObjectFunction; import io.deephaven.protobuf.FieldOptions.BytesBehavior; import io.deephaven.qst.type.CustomType; import io.deephaven.qst.type.GenericType; diff --git a/extensions/protobuf/src/main/java/io/deephaven/protobuf/BypassOnNull.java b/extensions/protobuf/src/main/java/io/deephaven/protobuf/BypassOnNull.java index 1286c35dd3b..e8f0226f629 100644 --- a/extensions/protobuf/src/main/java/io/deephaven/protobuf/BypassOnNull.java +++ b/extensions/protobuf/src/main/java/io/deephaven/protobuf/BypassOnNull.java @@ -3,17 +3,17 @@ */ package io.deephaven.protobuf; -import io.deephaven.functions.ToBooleanFunction; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToCharFunction; -import io.deephaven.functions.ToDoubleFunction; -import io.deephaven.functions.ToFloatFunction; -import io.deephaven.functions.ToIntFunction; -import io.deephaven.functions.ToLongFunction; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.ToPrimitiveFunction; -import io.deephaven.functions.ToShortFunction; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.ToBooleanFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToCharFunction; +import io.deephaven.function.ToDoubleFunction; +import io.deephaven.function.ToFloatFunction; +import io.deephaven.function.ToIntFunction; +import io.deephaven.function.ToLongFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.ToPrimitiveFunction; +import io.deephaven.function.ToShortFunction; +import io.deephaven.function.TypedFunction; import io.deephaven.qst.type.BoxedBooleanType; import io.deephaven.util.QueryConstants; diff --git a/extensions/protobuf/src/main/java/io/deephaven/protobuf/FieldPath.java b/extensions/protobuf/src/main/java/io/deephaven/protobuf/FieldPath.java index c7f1be54baa..4e80d4b629f 100644 --- a/extensions/protobuf/src/main/java/io/deephaven/protobuf/FieldPath.java +++ b/extensions/protobuf/src/main/java/io/deephaven/protobuf/FieldPath.java @@ -5,7 +5,7 @@ import com.google.protobuf.Descriptors.FieldDescriptor; import io.deephaven.annotations.SimpleStyle; -import io.deephaven.functions.ToBooleanFunction; +import io.deephaven.function.ToBooleanFunction; import org.immutables.value.Value.Immutable; import org.immutables.value.Value.Lazy; import org.immutables.value.Value.Parameter; diff --git a/extensions/protobuf/src/main/java/io/deephaven/protobuf/MessageParser.java b/extensions/protobuf/src/main/java/io/deephaven/protobuf/MessageParser.java index 521ea482d39..6b94d9a3615 100644 --- a/extensions/protobuf/src/main/java/io/deephaven/protobuf/MessageParser.java +++ b/extensions/protobuf/src/main/java/io/deephaven/protobuf/MessageParser.java @@ -5,7 +5,7 @@ import com.google.protobuf.Descriptors.Descriptor; import com.google.protobuf.Message; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.TypedFunction; import java.util.ArrayList; import java.util.List; diff --git a/extensions/protobuf/src/main/java/io/deephaven/protobuf/MessageParserSingle.java b/extensions/protobuf/src/main/java/io/deephaven/protobuf/MessageParserSingle.java index 9771721ec19..0516c31afaf 100644 --- a/extensions/protobuf/src/main/java/io/deephaven/protobuf/MessageParserSingle.java +++ b/extensions/protobuf/src/main/java/io/deephaven/protobuf/MessageParserSingle.java @@ -5,7 +5,7 @@ import com.google.protobuf.Descriptors.Descriptor; import com.google.protobuf.Message; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.TypedFunction; /** * A specialized / simplified version of {@link MessageParser} that produces a single unnamed function. diff --git a/extensions/protobuf/src/main/java/io/deephaven/protobuf/ProtobufDescriptorParserImpl.java b/extensions/protobuf/src/main/java/io/deephaven/protobuf/ProtobufDescriptorParserImpl.java index 2f404fbd442..a8528646917 100644 --- a/extensions/protobuf/src/main/java/io/deephaven/protobuf/ProtobufDescriptorParserImpl.java +++ b/extensions/protobuf/src/main/java/io/deephaven/protobuf/ProtobufDescriptorParserImpl.java @@ -20,18 +20,18 @@ import io.deephaven.qst.type.BoxedLongType; import io.deephaven.qst.type.GenericType; import io.deephaven.qst.type.Type; -import io.deephaven.functions.ToBooleanFunction; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToCharFunction; -import io.deephaven.functions.ToDoubleFunction; -import io.deephaven.functions.ToFloatFunction; -import io.deephaven.functions.ToIntFunction; -import io.deephaven.functions.ToLongFunction; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.ToPrimitiveFunction; -import io.deephaven.functions.ToShortFunction; -import io.deephaven.functions.TypedFunction; -import io.deephaven.functions.TypedFunction.Visitor; +import io.deephaven.function.ToBooleanFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToCharFunction; +import io.deephaven.function.ToDoubleFunction; +import io.deephaven.function.ToFloatFunction; +import io.deephaven.function.ToIntFunction; +import io.deephaven.function.ToLongFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.ToPrimitiveFunction; +import io.deephaven.function.ToShortFunction; +import io.deephaven.function.TypedFunction; +import io.deephaven.function.TypedFunction.Visitor; import io.deephaven.util.QueryConstants; import java.lang.reflect.Array; diff --git a/extensions/protobuf/src/main/java/io/deephaven/protobuf/ProtobufFunction.java b/extensions/protobuf/src/main/java/io/deephaven/protobuf/ProtobufFunction.java index 0fc8e95542f..71558061048 100644 --- a/extensions/protobuf/src/main/java/io/deephaven/protobuf/ProtobufFunction.java +++ b/extensions/protobuf/src/main/java/io/deephaven/protobuf/ProtobufFunction.java @@ -5,7 +5,7 @@ import com.google.protobuf.Message; import io.deephaven.annotations.SimpleStyle; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.TypedFunction; import org.immutables.value.Value.Immutable; import org.immutables.value.Value.Parameter; diff --git a/extensions/protobuf/src/main/java/io/deephaven/protobuf/ProtobufFunctions.java b/extensions/protobuf/src/main/java/io/deephaven/protobuf/ProtobufFunctions.java index 7529314853c..27cfff94662 100644 --- a/extensions/protobuf/src/main/java/io/deephaven/protobuf/ProtobufFunctions.java +++ b/extensions/protobuf/src/main/java/io/deephaven/protobuf/ProtobufFunctions.java @@ -5,7 +5,7 @@ import com.google.protobuf.Message; import io.deephaven.annotations.BuildableStyle; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.TypedFunction; import org.immutables.value.Value.Immutable; import java.util.List; diff --git a/extensions/protobuf/src/test/java/io/deephaven/protobuf/ByteWrapperCustomType.java b/extensions/protobuf/src/test/java/io/deephaven/protobuf/ByteWrapperCustomType.java index 3ca71a558d4..28269711953 100644 --- a/extensions/protobuf/src/test/java/io/deephaven/protobuf/ByteWrapperCustomType.java +++ b/extensions/protobuf/src/test/java/io/deephaven/protobuf/ByteWrapperCustomType.java @@ -3,9 +3,9 @@ import com.google.auto.service.AutoService; import com.google.protobuf.Descriptors.Descriptor; import com.google.protobuf.Message; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.TypedFunction; import io.deephaven.protobuf.test.ByteWrapper; import io.deephaven.qst.type.Type; diff --git a/extensions/protobuf/src/test/java/io/deephaven/protobuf/FieldPathTest.java b/extensions/protobuf/src/test/java/io/deephaven/protobuf/FieldPathTest.java index 858d008c384..92671c75f06 100644 --- a/extensions/protobuf/src/test/java/io/deephaven/protobuf/FieldPathTest.java +++ b/extensions/protobuf/src/test/java/io/deephaven/protobuf/FieldPathTest.java @@ -1,7 +1,7 @@ package io.deephaven.protobuf; import com.google.protobuf.Descriptors.FieldDescriptor; -import io.deephaven.functions.ToBooleanFunction; +import io.deephaven.function.ToBooleanFunction; import io.deephaven.protobuf.test.FieldPathTesting; import io.deephaven.protobuf.test.FieldPathTesting.Bar; import io.deephaven.protobuf.test.FieldPathTesting.Baz; diff --git a/extensions/protobuf/src/test/java/io/deephaven/protobuf/ProtobufDescriptorParserTest.java b/extensions/protobuf/src/test/java/io/deephaven/protobuf/ProtobufDescriptorParserTest.java index 47db6a87599..508b253078d 100644 --- a/extensions/protobuf/src/test/java/io/deephaven/protobuf/ProtobufDescriptorParserTest.java +++ b/extensions/protobuf/src/test/java/io/deephaven/protobuf/ProtobufDescriptorParserTest.java @@ -16,9 +16,9 @@ import com.google.protobuf.Timestamp; import com.google.protobuf.UInt32Value; import com.google.protobuf.UInt64Value; -import io.deephaven.functions.ToLongFunction; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.ToLongFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.TypedFunction; import io.deephaven.protobuf.FieldOptions.BytesBehavior; import io.deephaven.protobuf.FieldOptions.MapBehavior; import io.deephaven.protobuf.FieldOptions.WellKnownBehavior; diff --git a/java/functions/build.gradle b/function/build.gradle similarity index 100% rename from java/functions/build.gradle rename to function/build.gradle diff --git a/java/functions/gradle.properties b/function/gradle.properties similarity index 100% rename from java/functions/gradle.properties rename to function/gradle.properties diff --git a/java/functions/src/main/java/io/deephaven/functions/BooleanFunctions.java b/function/src/main/java/io/deephaven/function/BooleanFunctions.java similarity index 99% rename from java/functions/src/main/java/io/deephaven/functions/BooleanFunctions.java rename to function/src/main/java/io/deephaven/function/BooleanFunctions.java index f64cd61a474..7856b2fdabb 100644 --- a/java/functions/src/main/java/io/deephaven/functions/BooleanFunctions.java +++ b/function/src/main/java/io/deephaven/function/BooleanFunctions.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import org.jetbrains.annotations.NotNull; diff --git a/java/functions/src/main/java/io/deephaven/functions/ByteFunctions.java b/function/src/main/java/io/deephaven/function/ByteFunctions.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/ByteFunctions.java rename to function/src/main/java/io/deephaven/function/ByteFunctions.java index d44cef49b45..7aeb0aa5231 100644 --- a/java/functions/src/main/java/io/deephaven/functions/ByteFunctions.java +++ b/function/src/main/java/io/deephaven/function/ByteFunctions.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import java.util.Objects; import java.util.function.Function; diff --git a/java/functions/src/main/java/io/deephaven/functions/CharFunctions.java b/function/src/main/java/io/deephaven/function/CharFunctions.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/CharFunctions.java rename to function/src/main/java/io/deephaven/function/CharFunctions.java index 428465ff8e8..cff3d37d742 100644 --- a/java/functions/src/main/java/io/deephaven/functions/CharFunctions.java +++ b/function/src/main/java/io/deephaven/function/CharFunctions.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import java.util.Objects; import java.util.function.Function; diff --git a/java/functions/src/main/java/io/deephaven/functions/DoubleFunctions.java b/function/src/main/java/io/deephaven/function/DoubleFunctions.java similarity index 98% rename from java/functions/src/main/java/io/deephaven/functions/DoubleFunctions.java rename to function/src/main/java/io/deephaven/function/DoubleFunctions.java index f1fab905a14..2b18947fde1 100644 --- a/java/functions/src/main/java/io/deephaven/functions/DoubleFunctions.java +++ b/function/src/main/java/io/deephaven/function/DoubleFunctions.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import java.util.Objects; import java.util.function.Function; diff --git a/java/functions/src/main/java/io/deephaven/functions/FloatFunctions.java b/function/src/main/java/io/deephaven/function/FloatFunctions.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/FloatFunctions.java rename to function/src/main/java/io/deephaven/function/FloatFunctions.java index 5e8c6d35f03..9fbfa53260e 100644 --- a/java/functions/src/main/java/io/deephaven/functions/FloatFunctions.java +++ b/function/src/main/java/io/deephaven/function/FloatFunctions.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import java.util.Objects; import java.util.function.Function; diff --git a/java/functions/src/main/java/io/deephaven/functions/IntFunctions.java b/function/src/main/java/io/deephaven/function/IntFunctions.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/IntFunctions.java rename to function/src/main/java/io/deephaven/function/IntFunctions.java index f707d16f654..2b1f8b7d917 100644 --- a/java/functions/src/main/java/io/deephaven/functions/IntFunctions.java +++ b/function/src/main/java/io/deephaven/function/IntFunctions.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import java.util.Objects; import java.util.function.Function; diff --git a/java/functions/src/main/java/io/deephaven/functions/LongFunctions.java b/function/src/main/java/io/deephaven/function/LongFunctions.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/LongFunctions.java rename to function/src/main/java/io/deephaven/function/LongFunctions.java index 30ba0608f65..adce8bea481 100644 --- a/java/functions/src/main/java/io/deephaven/functions/LongFunctions.java +++ b/function/src/main/java/io/deephaven/function/LongFunctions.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import java.util.Objects; import java.util.function.Function; diff --git a/java/functions/src/main/java/io/deephaven/functions/ObjectFunctions.java b/function/src/main/java/io/deephaven/function/ObjectFunctions.java similarity index 99% rename from java/functions/src/main/java/io/deephaven/functions/ObjectFunctions.java rename to function/src/main/java/io/deephaven/function/ObjectFunctions.java index 951441a0e09..f2a18263a9f 100644 --- a/java/functions/src/main/java/io/deephaven/functions/ObjectFunctions.java +++ b/function/src/main/java/io/deephaven/function/ObjectFunctions.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import io.deephaven.qst.type.CustomType; import io.deephaven.qst.type.GenericType; diff --git a/java/functions/src/main/java/io/deephaven/functions/PrimitiveFunctions.java b/function/src/main/java/io/deephaven/function/PrimitiveFunctions.java similarity index 98% rename from java/functions/src/main/java/io/deephaven/functions/PrimitiveFunctions.java rename to function/src/main/java/io/deephaven/function/PrimitiveFunctions.java index c4ba0015685..7a00b4ef090 100644 --- a/java/functions/src/main/java/io/deephaven/functions/PrimitiveFunctions.java +++ b/function/src/main/java/io/deephaven/function/PrimitiveFunctions.java @@ -1,4 +1,4 @@ -package io.deephaven.functions; +package io.deephaven.function; import java.util.Objects; diff --git a/java/functions/src/main/java/io/deephaven/functions/ShortFunctions.java b/function/src/main/java/io/deephaven/function/ShortFunctions.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/ShortFunctions.java rename to function/src/main/java/io/deephaven/function/ShortFunctions.java index efe8543f915..75e1e6fb1e0 100644 --- a/java/functions/src/main/java/io/deephaven/functions/ShortFunctions.java +++ b/function/src/main/java/io/deephaven/function/ShortFunctions.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import java.util.Objects; import java.util.function.Function; diff --git a/java/functions/src/main/java/io/deephaven/functions/ToBooleanFunction.java b/function/src/main/java/io/deephaven/function/ToBooleanFunction.java similarity index 99% rename from java/functions/src/main/java/io/deephaven/functions/ToBooleanFunction.java rename to function/src/main/java/io/deephaven/function/ToBooleanFunction.java index 11c727a0398..cfbdc5c6f79 100644 --- a/java/functions/src/main/java/io/deephaven/functions/ToBooleanFunction.java +++ b/function/src/main/java/io/deephaven/function/ToBooleanFunction.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import io.deephaven.qst.type.BooleanType; import io.deephaven.qst.type.Type; diff --git a/java/functions/src/main/java/io/deephaven/functions/ToByteFunction.java b/function/src/main/java/io/deephaven/function/ToByteFunction.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/ToByteFunction.java rename to function/src/main/java/io/deephaven/function/ToByteFunction.java index 511938a68e2..3ce8b3f6d5b 100644 --- a/java/functions/src/main/java/io/deephaven/functions/ToByteFunction.java +++ b/function/src/main/java/io/deephaven/function/ToByteFunction.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import io.deephaven.qst.type.ByteType; import io.deephaven.qst.type.Type; diff --git a/java/functions/src/main/java/io/deephaven/functions/ToCharFunction.java b/function/src/main/java/io/deephaven/function/ToCharFunction.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/ToCharFunction.java rename to function/src/main/java/io/deephaven/function/ToCharFunction.java index 6e6cbc30bfb..e53aa3e7f39 100644 --- a/java/functions/src/main/java/io/deephaven/functions/ToCharFunction.java +++ b/function/src/main/java/io/deephaven/function/ToCharFunction.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import io.deephaven.qst.type.CharType; import io.deephaven.qst.type.Type; diff --git a/java/functions/src/main/java/io/deephaven/functions/ToDoubleFunction.java b/function/src/main/java/io/deephaven/function/ToDoubleFunction.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/ToDoubleFunction.java rename to function/src/main/java/io/deephaven/function/ToDoubleFunction.java index 46a20e0e2c9..e478a4d1fa0 100644 --- a/java/functions/src/main/java/io/deephaven/functions/ToDoubleFunction.java +++ b/function/src/main/java/io/deephaven/function/ToDoubleFunction.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import io.deephaven.qst.type.DoubleType; import io.deephaven.qst.type.Type; diff --git a/java/functions/src/main/java/io/deephaven/functions/ToFloatFunction.java b/function/src/main/java/io/deephaven/function/ToFloatFunction.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/ToFloatFunction.java rename to function/src/main/java/io/deephaven/function/ToFloatFunction.java index ad131d34105..cb5119ad423 100644 --- a/java/functions/src/main/java/io/deephaven/functions/ToFloatFunction.java +++ b/function/src/main/java/io/deephaven/function/ToFloatFunction.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import io.deephaven.qst.type.FloatType; import io.deephaven.qst.type.Type; diff --git a/java/functions/src/main/java/io/deephaven/functions/ToIntFunction.java b/function/src/main/java/io/deephaven/function/ToIntFunction.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/ToIntFunction.java rename to function/src/main/java/io/deephaven/function/ToIntFunction.java index 4bf7f603230..2daf02b18fa 100644 --- a/java/functions/src/main/java/io/deephaven/functions/ToIntFunction.java +++ b/function/src/main/java/io/deephaven/function/ToIntFunction.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import io.deephaven.qst.type.IntType; import io.deephaven.qst.type.Type; diff --git a/java/functions/src/main/java/io/deephaven/functions/ToLongFunction.java b/function/src/main/java/io/deephaven/function/ToLongFunction.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/ToLongFunction.java rename to function/src/main/java/io/deephaven/function/ToLongFunction.java index 674431642dc..73214f82fb2 100644 --- a/java/functions/src/main/java/io/deephaven/functions/ToLongFunction.java +++ b/function/src/main/java/io/deephaven/function/ToLongFunction.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import io.deephaven.qst.type.LongType; import io.deephaven.qst.type.Type; diff --git a/java/functions/src/main/java/io/deephaven/functions/ToObjectFunction.java b/function/src/main/java/io/deephaven/function/ToObjectFunction.java similarity index 99% rename from java/functions/src/main/java/io/deephaven/functions/ToObjectFunction.java rename to function/src/main/java/io/deephaven/function/ToObjectFunction.java index 80b61870ea9..79adadcb269 100644 --- a/java/functions/src/main/java/io/deephaven/functions/ToObjectFunction.java +++ b/function/src/main/java/io/deephaven/function/ToObjectFunction.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import io.deephaven.qst.type.GenericType; diff --git a/java/functions/src/main/java/io/deephaven/functions/ToPrimitiveFunction.java b/function/src/main/java/io/deephaven/function/ToPrimitiveFunction.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/ToPrimitiveFunction.java rename to function/src/main/java/io/deephaven/function/ToPrimitiveFunction.java index 6d0c6b6b8c9..b1450838532 100644 --- a/java/functions/src/main/java/io/deephaven/functions/ToPrimitiveFunction.java +++ b/function/src/main/java/io/deephaven/function/ToPrimitiveFunction.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import io.deephaven.qst.type.PrimitiveType; diff --git a/java/functions/src/main/java/io/deephaven/functions/ToShortFunction.java b/function/src/main/java/io/deephaven/function/ToShortFunction.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/ToShortFunction.java rename to function/src/main/java/io/deephaven/function/ToShortFunction.java index 7c4810a78ec..4ba6ab930f9 100644 --- a/java/functions/src/main/java/io/deephaven/functions/ToShortFunction.java +++ b/function/src/main/java/io/deephaven/function/ToShortFunction.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import io.deephaven.qst.type.ShortType; import io.deephaven.qst.type.Type; diff --git a/java/functions/src/main/java/io/deephaven/functions/TypedFunction.java b/function/src/main/java/io/deephaven/function/TypedFunction.java similarity index 95% rename from java/functions/src/main/java/io/deephaven/functions/TypedFunction.java rename to function/src/main/java/io/deephaven/function/TypedFunction.java index 71894b1266e..6a700dc3210 100644 --- a/java/functions/src/main/java/io/deephaven/functions/TypedFunction.java +++ b/function/src/main/java/io/deephaven/function/TypedFunction.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.functions; +package io.deephaven.function; import io.deephaven.qst.type.Type; diff --git a/java/functions/src/main/java/io/deephaven/functions/TypedFunctions.java b/function/src/main/java/io/deephaven/function/TypedFunctions.java similarity index 97% rename from java/functions/src/main/java/io/deephaven/functions/TypedFunctions.java rename to function/src/main/java/io/deephaven/function/TypedFunctions.java index 46d9bbeeb02..f2a9d0001a2 100644 --- a/java/functions/src/main/java/io/deephaven/functions/TypedFunctions.java +++ b/function/src/main/java/io/deephaven/function/TypedFunctions.java @@ -1,4 +1,4 @@ -package io.deephaven.functions; +package io.deephaven.function; import java.util.Objects; diff --git a/java/functions/src/test/java/io/deephaven/functions/ToBooleanFunctionTest.java b/function/src/test/java/io/deephaven/function/ToBooleanFunctionTest.java similarity index 92% rename from java/functions/src/test/java/io/deephaven/functions/ToBooleanFunctionTest.java rename to function/src/test/java/io/deephaven/function/ToBooleanFunctionTest.java index 316bf10dff0..1681527cffa 100644 --- a/java/functions/src/test/java/io/deephaven/functions/ToBooleanFunctionTest.java +++ b/function/src/test/java/io/deephaven/function/ToBooleanFunctionTest.java @@ -1,15 +1,15 @@ -package io.deephaven.functions; +package io.deephaven.function; import org.junit.jupiter.api.Test; import java.util.List; -import static io.deephaven.functions.ToBooleanFunction.and; -import static io.deephaven.functions.ToBooleanFunction.map; -import static io.deephaven.functions.ToBooleanFunction.not; -import static io.deephaven.functions.ToBooleanFunction.ofFalse; -import static io.deephaven.functions.ToBooleanFunction.ofTrue; -import static io.deephaven.functions.ToBooleanFunction.or; +import static io.deephaven.function.ToBooleanFunction.and; +import static io.deephaven.function.ToBooleanFunction.map; +import static io.deephaven.function.ToBooleanFunction.not; +import static io.deephaven.function.ToBooleanFunction.ofFalse; +import static io.deephaven.function.ToBooleanFunction.ofTrue; +import static io.deephaven.function.ToBooleanFunction.or; import static org.assertj.core.api.Assertions.assertThat; public class ToBooleanFunctionTest { diff --git a/java/functions/src/test/java/io/deephaven/functions/ToByteFunctionTest.java b/function/src/test/java/io/deephaven/function/ToByteFunctionTest.java similarity index 84% rename from java/functions/src/test/java/io/deephaven/functions/ToByteFunctionTest.java rename to function/src/test/java/io/deephaven/function/ToByteFunctionTest.java index 612e24fb0c6..cde2254fa2d 100644 --- a/java/functions/src/test/java/io/deephaven/functions/ToByteFunctionTest.java +++ b/function/src/test/java/io/deephaven/function/ToByteFunctionTest.java @@ -1,8 +1,8 @@ -package io.deephaven.functions; +package io.deephaven.function; import org.junit.jupiter.api.Test; -import static io.deephaven.functions.ToByteFunction.map; +import static io.deephaven.function.ToByteFunction.map; import static org.assertj.core.api.Assertions.assertThat; public class ToByteFunctionTest { diff --git a/java/functions/src/test/java/io/deephaven/functions/ToCharFunctionTest.java b/function/src/test/java/io/deephaven/function/ToCharFunctionTest.java similarity index 84% rename from java/functions/src/test/java/io/deephaven/functions/ToCharFunctionTest.java rename to function/src/test/java/io/deephaven/function/ToCharFunctionTest.java index 551ed87ce46..77b3d25a03f 100644 --- a/java/functions/src/test/java/io/deephaven/functions/ToCharFunctionTest.java +++ b/function/src/test/java/io/deephaven/function/ToCharFunctionTest.java @@ -1,8 +1,8 @@ -package io.deephaven.functions; +package io.deephaven.function; import org.junit.jupiter.api.Test; -import static io.deephaven.functions.ToCharFunction.map; +import static io.deephaven.function.ToCharFunction.map; import static org.assertj.core.api.Assertions.assertThat; public class ToCharFunctionTest { diff --git a/java/functions/src/test/java/io/deephaven/functions/ToDoubleFunctionTest.java b/function/src/test/java/io/deephaven/function/ToDoubleFunctionTest.java similarity index 81% rename from java/functions/src/test/java/io/deephaven/functions/ToDoubleFunctionTest.java rename to function/src/test/java/io/deephaven/function/ToDoubleFunctionTest.java index 40fdc738c09..7c6765f7855 100644 --- a/java/functions/src/test/java/io/deephaven/functions/ToDoubleFunctionTest.java +++ b/function/src/test/java/io/deephaven/function/ToDoubleFunctionTest.java @@ -1,8 +1,8 @@ -package io.deephaven.functions; +package io.deephaven.function; import org.junit.jupiter.api.Test; -import static io.deephaven.functions.ToDoubleFunction.map; +import static io.deephaven.function.ToDoubleFunction.map; import static org.assertj.core.api.Assertions.assertThat; public class ToDoubleFunctionTest { diff --git a/java/functions/src/test/java/io/deephaven/functions/ToFloatFunctionTest.java b/function/src/test/java/io/deephaven/function/ToFloatFunctionTest.java similarity index 81% rename from java/functions/src/test/java/io/deephaven/functions/ToFloatFunctionTest.java rename to function/src/test/java/io/deephaven/function/ToFloatFunctionTest.java index c408030d40b..36a887140a2 100644 --- a/java/functions/src/test/java/io/deephaven/functions/ToFloatFunctionTest.java +++ b/function/src/test/java/io/deephaven/function/ToFloatFunctionTest.java @@ -1,8 +1,8 @@ -package io.deephaven.functions; +package io.deephaven.function; import org.junit.jupiter.api.Test; -import static io.deephaven.functions.ToFloatFunction.map; +import static io.deephaven.function.ToFloatFunction.map; import static org.assertj.core.api.Assertions.assertThat; public class ToFloatFunctionTest { diff --git a/java/functions/src/test/java/io/deephaven/functions/ToIntFunctionTest.java b/function/src/test/java/io/deephaven/function/ToIntFunctionTest.java similarity index 81% rename from java/functions/src/test/java/io/deephaven/functions/ToIntFunctionTest.java rename to function/src/test/java/io/deephaven/function/ToIntFunctionTest.java index b2d2c80f314..55d4635eee5 100644 --- a/java/functions/src/test/java/io/deephaven/functions/ToIntFunctionTest.java +++ b/function/src/test/java/io/deephaven/function/ToIntFunctionTest.java @@ -1,8 +1,8 @@ -package io.deephaven.functions; +package io.deephaven.function; import org.junit.jupiter.api.Test; -import static io.deephaven.functions.ToIntFunction.map; +import static io.deephaven.function.ToIntFunction.map; import static org.assertj.core.api.Assertions.assertThat; public class ToIntFunctionTest { diff --git a/java/functions/src/test/java/io/deephaven/functions/ToLongFunctionTest.java b/function/src/test/java/io/deephaven/function/ToLongFunctionTest.java similarity index 81% rename from java/functions/src/test/java/io/deephaven/functions/ToLongFunctionTest.java rename to function/src/test/java/io/deephaven/function/ToLongFunctionTest.java index 10847dbd72c..9b846f6d0a6 100644 --- a/java/functions/src/test/java/io/deephaven/functions/ToLongFunctionTest.java +++ b/function/src/test/java/io/deephaven/function/ToLongFunctionTest.java @@ -1,8 +1,8 @@ -package io.deephaven.functions; +package io.deephaven.function; import org.junit.jupiter.api.Test; -import static io.deephaven.functions.ToLongFunction.map; +import static io.deephaven.function.ToLongFunction.map; import static org.assertj.core.api.Assertions.assertThat; public class ToLongFunctionTest { diff --git a/java/functions/src/test/java/io/deephaven/functions/ToObjectFunctionTest.java b/function/src/test/java/io/deephaven/function/ToObjectFunctionTest.java similarity index 88% rename from java/functions/src/test/java/io/deephaven/functions/ToObjectFunctionTest.java rename to function/src/test/java/io/deephaven/function/ToObjectFunctionTest.java index 4aac140c0ee..e341b3c1c9f 100644 --- a/java/functions/src/test/java/io/deephaven/functions/ToObjectFunctionTest.java +++ b/function/src/test/java/io/deephaven/function/ToObjectFunctionTest.java @@ -1,9 +1,9 @@ -package io.deephaven.functions; +package io.deephaven.function; import io.deephaven.qst.type.Type; import org.junit.jupiter.api.Test; -import static io.deephaven.functions.ToObjectFunction.map; +import static io.deephaven.function.ToObjectFunction.map; import static org.assertj.core.api.Assertions.assertThat; public class ToObjectFunctionTest { diff --git a/java/functions/src/test/java/io/deephaven/functions/ToShortFunctionTest.java b/function/src/test/java/io/deephaven/function/ToShortFunctionTest.java similarity index 82% rename from java/functions/src/test/java/io/deephaven/functions/ToShortFunctionTest.java rename to function/src/test/java/io/deephaven/function/ToShortFunctionTest.java index 9c70b949d11..9cf838ac17b 100644 --- a/java/functions/src/test/java/io/deephaven/functions/ToShortFunctionTest.java +++ b/function/src/test/java/io/deephaven/function/ToShortFunctionTest.java @@ -1,8 +1,8 @@ -package io.deephaven.functions; +package io.deephaven.function; import org.junit.jupiter.api.Test; -import static io.deephaven.functions.ToShortFunction.map; +import static io.deephaven.function.ToShortFunction.map; import static org.assertj.core.api.Assertions.assertThat; public class ToShortFunctionTest { diff --git a/java/processor-functions/build.gradle b/java/processor-functions/build.gradle index f1a13576ef6..eb059ee2dec 100644 --- a/java/processor-functions/build.gradle +++ b/java/processor-functions/build.gradle @@ -6,7 +6,7 @@ plugins { dependencies { api project(':processor') - api project(':functions') + api project(':function') implementation project(':engine-time') diff --git a/java/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java b/java/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java index 31e6f5efbe6..3a45f65f758 100644 --- a/java/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java +++ b/java/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java @@ -13,10 +13,10 @@ import io.deephaven.chunk.WritableLongChunk; import io.deephaven.chunk.WritableObjectChunk; import io.deephaven.chunk.WritableShortChunk; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToCharFunction; -import io.deephaven.functions.ToFloatFunction; -import io.deephaven.functions.ToShortFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToCharFunction; +import io.deephaven.function.ToFloatFunction; +import io.deephaven.function.ToShortFunction; import java.util.function.Function; import java.util.function.Predicate; diff --git a/java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java b/java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java index aa1539c3912..710735d65a3 100644 --- a/java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java +++ b/java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java @@ -4,7 +4,7 @@ package io.deephaven.processor.functions; import io.deephaven.chunk.ObjectChunk; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.TypedFunction; import io.deephaven.processor.ObjectProcessor; import java.util.List; diff --git a/java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java b/java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java index cd3655ab710..c04e6480455 100644 --- a/java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java +++ b/java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java @@ -13,17 +13,17 @@ import io.deephaven.chunk.WritableLongChunk; import io.deephaven.chunk.WritableObjectChunk; import io.deephaven.chunk.WritableShortChunk; -import io.deephaven.functions.ToBooleanFunction; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToCharFunction; -import io.deephaven.functions.ToDoubleFunction; -import io.deephaven.functions.ToFloatFunction; -import io.deephaven.functions.ToIntFunction; -import io.deephaven.functions.ToLongFunction; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.ToPrimitiveFunction; -import io.deephaven.functions.ToShortFunction; -import io.deephaven.functions.TypedFunction; +import io.deephaven.function.ToBooleanFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToCharFunction; +import io.deephaven.function.ToDoubleFunction; +import io.deephaven.function.ToFloatFunction; +import io.deephaven.function.ToIntFunction; +import io.deephaven.function.ToLongFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.ToPrimitiveFunction; +import io.deephaven.function.ToShortFunction; +import io.deephaven.function.TypedFunction; import io.deephaven.processor.ObjectProcessor; import io.deephaven.qst.type.ArrayType; import io.deephaven.qst.type.BoxedBooleanType; diff --git a/java/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java b/java/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java index 15c731ed839..4abbbb26557 100644 --- a/java/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java +++ b/java/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java @@ -12,14 +12,14 @@ import io.deephaven.chunk.WritableLongChunk; import io.deephaven.chunk.WritableObjectChunk; import io.deephaven.chunk.WritableShortChunk; -import io.deephaven.functions.ToByteFunction; -import io.deephaven.functions.ToCharFunction; -import io.deephaven.functions.ToDoubleFunction; -import io.deephaven.functions.ToFloatFunction; -import io.deephaven.functions.ToIntFunction; -import io.deephaven.functions.ToLongFunction; -import io.deephaven.functions.ToObjectFunction; -import io.deephaven.functions.ToShortFunction; +import io.deephaven.function.ToByteFunction; +import io.deephaven.function.ToCharFunction; +import io.deephaven.function.ToDoubleFunction; +import io.deephaven.function.ToFloatFunction; +import io.deephaven.function.ToIntFunction; +import io.deephaven.function.ToLongFunction; +import io.deephaven.function.ToObjectFunction; +import io.deephaven.function.ToShortFunction; import io.deephaven.processor.ObjectProcessor; import io.deephaven.qst.type.Type; import io.deephaven.util.BooleanUtils; diff --git a/settings.gradle b/settings.gradle index 5ffc2315821..b11f846e13e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -377,8 +377,8 @@ include ':clock-impl' include ':sql' -include ':functions' -project(':functions').projectDir = file('java/functions') +include ':function' +project(':function').projectDir = file('function') include ':processor' project(':processor').projectDir = file('java/processor') From aaaa83581eb9f89d96d73fd743db0228a49af2dc Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Fri, 19 Jan 2024 08:47:05 -0800 Subject: [PATCH 04/12] Move processor processor-functions to engine --- {java => engine}/processor-functions/build.gradle | 2 +- .../processor-functions/gradle.properties | 0 .../io/deephaven/processor/functions/ChunkUtils.java | 0 .../functions/ObjectProcessorFunctions.java | 0 .../functions/ObjectProcessorFunctionsImpl.java | 0 .../functions/ObjectProcessorFunctionsTest.java | 0 {java => engine}/processor/build.gradle | 0 {java => engine}/processor/gradle.properties | 0 .../java/io/deephaven/processor/ObjectProcessor.java | 0 .../io/deephaven/processor/ObjectProcessorNoop.java | 0 .../processor/ObjectProcessorRowLimited.java | 0 .../deephaven/processor/ObjectProcessorStrict.java | 0 .../io/deephaven/processor/ObjectProcessorTypes.java | 0 .../deephaven/processor/ObjectProcessorNoopTest.java | 0 .../processor/ObjectProcessorRowLimitedTest.java | 0 .../processor/ObjectProcessorStrictTest.java | 0 .../io/deephaven/processor/ObjectProcessorTest.java | 0 extensions/kafka/build.gradle | 2 +- settings.gradle | 12 ++++++------ 19 files changed, 8 insertions(+), 8 deletions(-) rename {java => engine}/processor-functions/build.gradle (91%) rename {java => engine}/processor-functions/gradle.properties (100%) rename {java => engine}/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java (100%) rename {java => engine}/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java (100%) rename {java => engine}/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java (100%) rename {java => engine}/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java (100%) rename {java => engine}/processor/build.gradle (100%) rename {java => engine}/processor/gradle.properties (100%) rename {java => engine}/processor/src/main/java/io/deephaven/processor/ObjectProcessor.java (100%) rename {java => engine}/processor/src/main/java/io/deephaven/processor/ObjectProcessorNoop.java (100%) rename {java => engine}/processor/src/main/java/io/deephaven/processor/ObjectProcessorRowLimited.java (100%) rename {java => engine}/processor/src/main/java/io/deephaven/processor/ObjectProcessorStrict.java (100%) rename {java => engine}/processor/src/main/java/io/deephaven/processor/ObjectProcessorTypes.java (100%) rename {java => engine}/processor/src/test/java/io/deephaven/processor/ObjectProcessorNoopTest.java (100%) rename {java => engine}/processor/src/test/java/io/deephaven/processor/ObjectProcessorRowLimitedTest.java (100%) rename {java => engine}/processor/src/test/java/io/deephaven/processor/ObjectProcessorStrictTest.java (100%) rename {java => engine}/processor/src/test/java/io/deephaven/processor/ObjectProcessorTest.java (100%) diff --git a/java/processor-functions/build.gradle b/engine/processor-functions/build.gradle similarity index 91% rename from java/processor-functions/build.gradle rename to engine/processor-functions/build.gradle index eb059ee2dec..95e35b19ef4 100644 --- a/java/processor-functions/build.gradle +++ b/engine/processor-functions/build.gradle @@ -5,7 +5,7 @@ plugins { dependencies { - api project(':processor') + api project(':engine-processor') api project(':function') implementation project(':engine-time') diff --git a/java/processor-functions/gradle.properties b/engine/processor-functions/gradle.properties similarity index 100% rename from java/processor-functions/gradle.properties rename to engine/processor-functions/gradle.properties diff --git a/java/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java b/engine/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java similarity index 100% rename from java/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java rename to engine/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java diff --git a/java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java b/engine/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java similarity index 100% rename from java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java rename to engine/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java diff --git a/java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java b/engine/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java similarity index 100% rename from java/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java rename to engine/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java diff --git a/java/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java b/engine/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java similarity index 100% rename from java/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java rename to engine/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java diff --git a/java/processor/build.gradle b/engine/processor/build.gradle similarity index 100% rename from java/processor/build.gradle rename to engine/processor/build.gradle diff --git a/java/processor/gradle.properties b/engine/processor/gradle.properties similarity index 100% rename from java/processor/gradle.properties rename to engine/processor/gradle.properties diff --git a/java/processor/src/main/java/io/deephaven/processor/ObjectProcessor.java b/engine/processor/src/main/java/io/deephaven/processor/ObjectProcessor.java similarity index 100% rename from java/processor/src/main/java/io/deephaven/processor/ObjectProcessor.java rename to engine/processor/src/main/java/io/deephaven/processor/ObjectProcessor.java diff --git a/java/processor/src/main/java/io/deephaven/processor/ObjectProcessorNoop.java b/engine/processor/src/main/java/io/deephaven/processor/ObjectProcessorNoop.java similarity index 100% rename from java/processor/src/main/java/io/deephaven/processor/ObjectProcessorNoop.java rename to engine/processor/src/main/java/io/deephaven/processor/ObjectProcessorNoop.java diff --git a/java/processor/src/main/java/io/deephaven/processor/ObjectProcessorRowLimited.java b/engine/processor/src/main/java/io/deephaven/processor/ObjectProcessorRowLimited.java similarity index 100% rename from java/processor/src/main/java/io/deephaven/processor/ObjectProcessorRowLimited.java rename to engine/processor/src/main/java/io/deephaven/processor/ObjectProcessorRowLimited.java diff --git a/java/processor/src/main/java/io/deephaven/processor/ObjectProcessorStrict.java b/engine/processor/src/main/java/io/deephaven/processor/ObjectProcessorStrict.java similarity index 100% rename from java/processor/src/main/java/io/deephaven/processor/ObjectProcessorStrict.java rename to engine/processor/src/main/java/io/deephaven/processor/ObjectProcessorStrict.java diff --git a/java/processor/src/main/java/io/deephaven/processor/ObjectProcessorTypes.java b/engine/processor/src/main/java/io/deephaven/processor/ObjectProcessorTypes.java similarity index 100% rename from java/processor/src/main/java/io/deephaven/processor/ObjectProcessorTypes.java rename to engine/processor/src/main/java/io/deephaven/processor/ObjectProcessorTypes.java diff --git a/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorNoopTest.java b/engine/processor/src/test/java/io/deephaven/processor/ObjectProcessorNoopTest.java similarity index 100% rename from java/processor/src/test/java/io/deephaven/processor/ObjectProcessorNoopTest.java rename to engine/processor/src/test/java/io/deephaven/processor/ObjectProcessorNoopTest.java diff --git a/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorRowLimitedTest.java b/engine/processor/src/test/java/io/deephaven/processor/ObjectProcessorRowLimitedTest.java similarity index 100% rename from java/processor/src/test/java/io/deephaven/processor/ObjectProcessorRowLimitedTest.java rename to engine/processor/src/test/java/io/deephaven/processor/ObjectProcessorRowLimitedTest.java diff --git a/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorStrictTest.java b/engine/processor/src/test/java/io/deephaven/processor/ObjectProcessorStrictTest.java similarity index 100% rename from java/processor/src/test/java/io/deephaven/processor/ObjectProcessorStrictTest.java rename to engine/processor/src/test/java/io/deephaven/processor/ObjectProcessorStrictTest.java diff --git a/java/processor/src/test/java/io/deephaven/processor/ObjectProcessorTest.java b/engine/processor/src/test/java/io/deephaven/processor/ObjectProcessorTest.java similarity index 100% rename from java/processor/src/test/java/io/deephaven/processor/ObjectProcessorTest.java rename to engine/processor/src/test/java/io/deephaven/processor/ObjectProcessorTest.java diff --git a/extensions/kafka/build.gradle b/extensions/kafka/build.gradle index 91501af62de..044e0242b30 100644 --- a/extensions/kafka/build.gradle +++ b/extensions/kafka/build.gradle @@ -8,7 +8,7 @@ description 'Kafka: Integrating Engine tables with Kafka' dependencies { api project(':engine-table') - api project(':processor') + api project(':engine-processor') api 'org.apache.avro:avro:1.11.2' diff --git a/settings.gradle b/settings.gradle index b11f846e13e..bb839c5cc10 100644 --- a/settings.gradle +++ b/settings.gradle @@ -212,6 +212,12 @@ project(':engine-query-constants').projectDir = file('engine/query-constants') include(':engine-sql') project(':engine-sql').projectDir = file('engine/sql') +include ':engine-processor' +project(':engine-processor').projectDir = file('engine/processor') + +include ':engine-processor-functions' +project(':engine-processor-functions').projectDir = file('engine/processor-functions') + include(':extensions-csv') project(':extensions-csv').projectDir = file('extensions/csv') @@ -380,12 +386,6 @@ include ':sql' include ':function' project(':function').projectDir = file('function') -include ':processor' -project(':processor').projectDir = file('java/processor') - -include ':processor-functions' -project(':processor-functions').projectDir = file('java/processor-functions') - file("${rootDir}/docker/registry").list().each { name -> if (file("${rootDir}/docker/registry/${name}/build.gradle").exists()) { include(":docker-${name}") From f69ea2ce5cba10d085dc57f8c49bb22850d5322b Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Fri, 19 Jan 2024 08:52:30 -0800 Subject: [PATCH 05/12] Remove extraneous ChunkUtils --- engine/processor-functions/build.gradle | 1 + .../processor/functions/ChunkUtils.java | 4 +- extensions/kafka/build.gradle | 1 + .../kafka/ingest/BooleanFieldCopier.java | 1 + .../kafka/ingest/ByteFieldCopier.java | 1 + .../kafka/ingest/CharFieldCopier.java | 1 + .../io/deephaven/kafka/ingest/ChunkUtils.java | 136 ------------------ .../kafka/ingest/DoubleFieldCopier.java | 1 + .../kafka/ingest/FloatFieldCopier.java | 1 + .../kafka/ingest/IntFieldCopier.java | 1 + .../kafka/ingest/LongFieldCopier.java | 1 + .../kafka/ingest/ObjectFieldCopier.java | 1 + .../kafka/ingest/ShortFieldCopier.java | 1 + 13 files changed, 12 insertions(+), 139 deletions(-) delete mode 100644 extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ChunkUtils.java diff --git a/engine/processor-functions/build.gradle b/engine/processor-functions/build.gradle index 95e35b19ef4..89af3c875b5 100644 --- a/engine/processor-functions/build.gradle +++ b/engine/processor-functions/build.gradle @@ -6,6 +6,7 @@ plugins { dependencies { api project(':engine-processor') + api project(':engine-chunk') api project(':function') implementation project(':engine-time') diff --git a/engine/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java b/engine/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java index 3a45f65f758..ea0883bfcf9 100644 --- a/engine/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java +++ b/engine/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java @@ -24,9 +24,7 @@ import java.util.function.ToIntFunction; import java.util.function.ToLongFunction; -final class ChunkUtils { - - // Copy from io.deephaven.kafka.ingest.ChunkUtils +public final class ChunkUtils { public static void applyInto( Predicate booleanFunction, diff --git a/extensions/kafka/build.gradle b/extensions/kafka/build.gradle index 044e0242b30..5d880fdd172 100644 --- a/extensions/kafka/build.gradle +++ b/extensions/kafka/build.gradle @@ -28,6 +28,7 @@ dependencies { api project(':extensions-protobuf') + implementation project(':engine-processor-functions') implementation project(':Configuration') implementation project(':log-factory') implementation depTrove3 diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/BooleanFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/BooleanFieldCopier.java index fa39ef15ebf..51f443dbd2e 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/BooleanFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/BooleanFieldCopier.java @@ -7,6 +7,7 @@ import io.deephaven.chunk.WritableChunk; import io.deephaven.chunk.attributes.Values; import io.deephaven.function.ToBooleanFunction; +import io.deephaven.processor.functions.ChunkUtils; import java.util.Objects; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ByteFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ByteFieldCopier.java index f2a9c53aedd..72706662cc0 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ByteFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ByteFieldCopier.java @@ -8,6 +8,7 @@ import io.deephaven.chunk.attributes.Values; import io.deephaven.function.ToByteFunction; import io.deephaven.function.ToObjectFunction; +import io.deephaven.processor.functions.ChunkUtils; import io.deephaven.util.BooleanUtils; import io.deephaven.util.type.TypeUtils; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/CharFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/CharFieldCopier.java index bea9677d6c8..09c19f7e1ba 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/CharFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/CharFieldCopier.java @@ -8,6 +8,7 @@ import io.deephaven.chunk.attributes.Values; import io.deephaven.function.ToCharFunction; import io.deephaven.function.ToObjectFunction; +import io.deephaven.processor.functions.ChunkUtils; import io.deephaven.util.type.TypeUtils; import java.util.Objects; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ChunkUtils.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ChunkUtils.java deleted file mode 100644 index fee2f0b39c3..00000000000 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ChunkUtils.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending - */ -package io.deephaven.kafka.ingest; - -import io.deephaven.chunk.ObjectChunk; -import io.deephaven.chunk.WritableBooleanChunk; -import io.deephaven.chunk.WritableByteChunk; -import io.deephaven.chunk.WritableCharChunk; -import io.deephaven.chunk.WritableDoubleChunk; -import io.deephaven.chunk.WritableFloatChunk; -import io.deephaven.chunk.WritableIntChunk; -import io.deephaven.chunk.WritableLongChunk; -import io.deephaven.chunk.WritableObjectChunk; -import io.deephaven.chunk.WritableShortChunk; -import io.deephaven.function.ToByteFunction; -import io.deephaven.function.ToCharFunction; -import io.deephaven.function.ToFloatFunction; -import io.deephaven.function.ToShortFunction; - -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.function.ToDoubleFunction; -import java.util.function.ToIntFunction; -import java.util.function.ToLongFunction; - -public class ChunkUtils { - - public static void applyInto( - Predicate booleanFunction, - ObjectChunk src, - int srcOffset, - WritableBooleanChunk dest, - int destOffset, - int length) { - for (int i = 0; i < length; ++i) { - dest.set(destOffset + i, booleanFunction.test(src.get(i + srcOffset))); - } - } - - public static void applyInto( - ToByteFunction byteFunction, - ObjectChunk src, - int srcOffset, - WritableByteChunk dest, - int destOffset, - int length) { - for (int i = 0; i < length; ++i) { - dest.set(destOffset + i, byteFunction.applyAsByte(src.get(srcOffset + i))); - } - } - - public static void applyInto( - ToCharFunction charFunction, - ObjectChunk src, - int srcOffset, - WritableCharChunk dest, - int destOffset, - int length) { - for (int i = 0; i < length; ++i) { - dest.set(destOffset + i, charFunction.applyAsChar(src.get(srcOffset + i))); - } - } - - public static void applyInto( - ToShortFunction shortFunction, - ObjectChunk src, - int srcOffset, - WritableShortChunk dest, - int destOffset, - int length) { - for (int i = 0; i < length; ++i) { - dest.set(destOffset + i, shortFunction.applyAsShort(src.get(srcOffset + i))); - } - } - - public static void applyInto( - ToIntFunction intFunction, - ObjectChunk src, - int srcOffset, - WritableIntChunk dest, - int destOffset, - int length) { - for (int i = 0; i < length; ++i) { - dest.set(destOffset + i, intFunction.applyAsInt(src.get(srcOffset + i))); - } - } - - public static void applyInto( - ToLongFunction longFunction, - ObjectChunk src, - int srcOffset, - WritableLongChunk dest, - int destOffset, - int length) { - for (int i = 0; i < length; ++i) { - dest.set(destOffset + i, longFunction.applyAsLong(src.get(srcOffset + i))); - } - } - - public static void applyInto( - ToFloatFunction floatFunction, - ObjectChunk src, - int srcOffset, - WritableFloatChunk dest, - int destOffset, - int length) { - for (int i = 0; i < length; ++i) { - dest.set(destOffset + i, floatFunction.applyAsFloat(src.get(srcOffset + i))); - } - } - - public static void applyInto( - ToDoubleFunction doubleFunction, - ObjectChunk src, - int srcOffset, - WritableDoubleChunk dest, - int destOffset, - int length) { - for (int i = 0; i < length; ++i) { - dest.set(destOffset + i, doubleFunction.applyAsDouble(src.get(srcOffset + i))); - } - } - - public static void applyInto( - Function objFunction, - ObjectChunk src, - int srcOffset, - WritableObjectChunk dest, - int destOffset, - int length) { - for (int i = 0; i < length; ++i) { - dest.set(destOffset + i, objFunction.apply(src.get(srcOffset + i))); - } - } -} diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/DoubleFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/DoubleFieldCopier.java index f03e398fc1b..f6dee87998e 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/DoubleFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/DoubleFieldCopier.java @@ -8,6 +8,7 @@ import io.deephaven.chunk.attributes.Values; import io.deephaven.function.ToDoubleFunction; import io.deephaven.function.ToObjectFunction; +import io.deephaven.processor.functions.ChunkUtils; import io.deephaven.util.type.TypeUtils; import java.util.Objects; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FloatFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FloatFieldCopier.java index c9df34226f7..3f6d1bf8797 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FloatFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FloatFieldCopier.java @@ -8,6 +8,7 @@ import io.deephaven.chunk.attributes.Values; import io.deephaven.function.ToFloatFunction; import io.deephaven.function.ToObjectFunction; +import io.deephaven.processor.functions.ChunkUtils; import io.deephaven.util.type.TypeUtils; import java.util.Objects; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/IntFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/IntFieldCopier.java index 25e130dbc04..54fee133adf 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/IntFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/IntFieldCopier.java @@ -8,6 +8,7 @@ import io.deephaven.chunk.attributes.Values; import io.deephaven.function.ToIntFunction; import io.deephaven.function.ToObjectFunction; +import io.deephaven.processor.functions.ChunkUtils; import io.deephaven.util.type.TypeUtils; import java.util.Objects; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/LongFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/LongFieldCopier.java index 7fd58551130..9b361df846d 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/LongFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/LongFieldCopier.java @@ -8,6 +8,7 @@ import io.deephaven.chunk.attributes.Values; import io.deephaven.function.ToLongFunction; import io.deephaven.function.ToObjectFunction; +import io.deephaven.processor.functions.ChunkUtils; import io.deephaven.util.type.TypeUtils; import java.util.Objects; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ObjectFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ObjectFieldCopier.java index 9ea7ae0a808..79bf211bace 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ObjectFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ObjectFieldCopier.java @@ -7,6 +7,7 @@ import io.deephaven.chunk.WritableChunk; import io.deephaven.chunk.attributes.Values; import io.deephaven.function.ToObjectFunction; +import io.deephaven.processor.functions.ChunkUtils; import java.util.Objects; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ShortFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ShortFieldCopier.java index 3e395e4c1ba..93b99de966d 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ShortFieldCopier.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ShortFieldCopier.java @@ -8,6 +8,7 @@ import io.deephaven.chunk.attributes.Values; import io.deephaven.function.ToObjectFunction; import io.deephaven.function.ToShortFunction; +import io.deephaven.processor.functions.ChunkUtils; import io.deephaven.util.type.TypeUtils; import java.util.Objects; From 16bdbe0a2716acf210147a49203af343e570544e Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Fri, 19 Jan 2024 09:21:57 -0800 Subject: [PATCH 06/12] Create single FieldCopierProcessorImpl --- engine/processor-functions/build.gradle | 1 - .../processor/functions/ChunkUtils.java | 2 +- .../kafka/ingest/BooleanFieldCopier.java | 34 ------ .../kafka/ingest/ByteFieldCopier.java | 45 -------- .../kafka/ingest/CharFieldCopier.java | 40 ------- .../kafka/ingest/DoubleFieldCopier.java | 40 ------- .../kafka/ingest/FieldCopierAdapter.java | 102 +----------------- .../ingest/FieldCopierProcessorImpl.java | 33 ++++++ .../kafka/ingest/FloatFieldCopier.java | 40 ------- .../kafka/ingest/IntFieldCopier.java | 40 ------- .../kafka/ingest/LongFieldCopier.java | 40 ------- .../kafka/ingest/ObjectFieldCopier.java | 34 ------ .../kafka/ingest/ShortFieldCopier.java | 40 ------- 13 files changed, 39 insertions(+), 452 deletions(-) delete mode 100644 extensions/kafka/src/main/java/io/deephaven/kafka/ingest/BooleanFieldCopier.java delete mode 100644 extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ByteFieldCopier.java delete mode 100644 extensions/kafka/src/main/java/io/deephaven/kafka/ingest/CharFieldCopier.java delete mode 100644 extensions/kafka/src/main/java/io/deephaven/kafka/ingest/DoubleFieldCopier.java create mode 100644 extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierProcessorImpl.java delete mode 100644 extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FloatFieldCopier.java delete mode 100644 extensions/kafka/src/main/java/io/deephaven/kafka/ingest/IntFieldCopier.java delete mode 100644 extensions/kafka/src/main/java/io/deephaven/kafka/ingest/LongFieldCopier.java delete mode 100644 extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ObjectFieldCopier.java delete mode 100644 extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ShortFieldCopier.java diff --git a/engine/processor-functions/build.gradle b/engine/processor-functions/build.gradle index 89af3c875b5..95e35b19ef4 100644 --- a/engine/processor-functions/build.gradle +++ b/engine/processor-functions/build.gradle @@ -6,7 +6,6 @@ plugins { dependencies { api project(':engine-processor') - api project(':engine-chunk') api project(':function') implementation project(':engine-time') diff --git a/engine/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java b/engine/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java index ea0883bfcf9..c6679e8ab2c 100644 --- a/engine/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java +++ b/engine/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java @@ -24,7 +24,7 @@ import java.util.function.ToIntFunction; import java.util.function.ToLongFunction; -public final class ChunkUtils { +final class ChunkUtils { public static void applyInto( Predicate booleanFunction, diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/BooleanFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/BooleanFieldCopier.java deleted file mode 100644 index 51f443dbd2e..00000000000 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/BooleanFieldCopier.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending - */ -package io.deephaven.kafka.ingest; - -import io.deephaven.chunk.ObjectChunk; -import io.deephaven.chunk.WritableChunk; -import io.deephaven.chunk.attributes.Values; -import io.deephaven.function.ToBooleanFunction; -import io.deephaven.processor.functions.ChunkUtils; - -import java.util.Objects; - -class BooleanFieldCopier implements FieldCopier { - public static BooleanFieldCopier of(ToBooleanFunction f) { - return new BooleanFieldCopier(f); - } - - private final ToBooleanFunction f; - - private BooleanFieldCopier(ToBooleanFunction f) { - this.f = Objects.requireNonNull(f); - } - - @Override - public void copyField( - ObjectChunk inputChunk, - WritableChunk publisherChunk, - int sourceOffset, - int destOffset, - int length) { - ChunkUtils.applyInto(f, inputChunk, sourceOffset, publisherChunk.asWritableBooleanChunk(), destOffset, length); - } -} diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ByteFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ByteFieldCopier.java deleted file mode 100644 index 72706662cc0..00000000000 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ByteFieldCopier.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending - */ -package io.deephaven.kafka.ingest; - -import io.deephaven.chunk.ObjectChunk; -import io.deephaven.chunk.WritableChunk; -import io.deephaven.chunk.attributes.Values; -import io.deephaven.function.ToByteFunction; -import io.deephaven.function.ToObjectFunction; -import io.deephaven.processor.functions.ChunkUtils; -import io.deephaven.util.BooleanUtils; -import io.deephaven.util.type.TypeUtils; - -import java.util.Objects; - -class ByteFieldCopier implements FieldCopier { - public static ByteFieldCopier of(ToByteFunction f) { - return new ByteFieldCopier(f); - } - - public static ByteFieldCopier of(ToObjectFunction f) { - return of(f.mapToByte(TypeUtils::unbox)); - } - - public static ByteFieldCopier ofBoolean(ToObjectFunction f) { - return of(f.mapToByte(BooleanUtils::booleanAsByte)); - } - - private final ToByteFunction f; - - private ByteFieldCopier(ToByteFunction f) { - this.f = Objects.requireNonNull(f); - } - - @Override - public void copyField( - ObjectChunk inputChunk, - WritableChunk publisherChunk, - int sourceOffset, - int destOffset, - int length) { - ChunkUtils.applyInto(f, inputChunk, sourceOffset, publisherChunk.asWritableByteChunk(), destOffset, length); - } -} diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/CharFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/CharFieldCopier.java deleted file mode 100644 index 09c19f7e1ba..00000000000 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/CharFieldCopier.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending - */ -package io.deephaven.kafka.ingest; - -import io.deephaven.chunk.ObjectChunk; -import io.deephaven.chunk.WritableChunk; -import io.deephaven.chunk.attributes.Values; -import io.deephaven.function.ToCharFunction; -import io.deephaven.function.ToObjectFunction; -import io.deephaven.processor.functions.ChunkUtils; -import io.deephaven.util.type.TypeUtils; - -import java.util.Objects; - -class CharFieldCopier implements FieldCopier { - public static CharFieldCopier of(ToCharFunction f) { - return new CharFieldCopier(f); - } - - public static CharFieldCopier of(ToObjectFunction f) { - return of(f.mapToChar(TypeUtils::unbox)); - } - - private final ToCharFunction f; - - private CharFieldCopier(ToCharFunction f) { - this.f = Objects.requireNonNull(f); - } - - @Override - public void copyField( - ObjectChunk inputChunk, - WritableChunk publisherChunk, - int sourceOffset, - int destOffset, - int length) { - ChunkUtils.applyInto(f, inputChunk, sourceOffset, publisherChunk.asWritableCharChunk(), destOffset, length); - } -} diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/DoubleFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/DoubleFieldCopier.java deleted file mode 100644 index f6dee87998e..00000000000 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/DoubleFieldCopier.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending - */ -package io.deephaven.kafka.ingest; - -import io.deephaven.chunk.ObjectChunk; -import io.deephaven.chunk.WritableChunk; -import io.deephaven.chunk.attributes.Values; -import io.deephaven.function.ToDoubleFunction; -import io.deephaven.function.ToObjectFunction; -import io.deephaven.processor.functions.ChunkUtils; -import io.deephaven.util.type.TypeUtils; - -import java.util.Objects; - -class DoubleFieldCopier implements FieldCopier { - public static DoubleFieldCopier of(ToDoubleFunction f) { - return new DoubleFieldCopier(f); - } - - public static DoubleFieldCopier of(ToObjectFunction f) { - return of(f.mapToDouble(TypeUtils::unbox)); - } - - private final ToDoubleFunction f; - - private DoubleFieldCopier(ToDoubleFunction f) { - this.f = Objects.requireNonNull(f); - } - - @Override - public void copyField( - ObjectChunk inputChunk, - WritableChunk publisherChunk, - int sourceOffset, - int destOffset, - int length) { - ChunkUtils.applyInto(f, inputChunk, sourceOffset, publisherChunk.asWritableDoubleChunk(), destOffset, length); - } -} diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java index f4d3a9e6bab..44b8802c961 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java @@ -3,6 +3,7 @@ */ package io.deephaven.kafka.ingest; +import io.deephaven.processor.functions.ObjectProcessorFunctions; import io.deephaven.qst.type.BoxedBooleanType; import io.deephaven.function.ToBooleanFunction; import io.deephaven.function.ToByteFunction; @@ -16,104 +17,11 @@ import io.deephaven.function.ToShortFunction; import io.deephaven.function.TypedFunction; -public enum FieldCopierAdapter - implements TypedFunction.Visitor, ToPrimitiveFunction.Visitor { - INSTANCE; +import java.util.List; - public static FieldCopier of(TypedFunction f) { - return f.walk(INSTANCE); - } - - public static FieldCopier of(ToPrimitiveFunction f) { - return f.walk((ToPrimitiveFunction.Visitor) INSTANCE); - } - - public static FieldCopier of(ToBooleanFunction f) { - return BooleanFieldCopier.of(f); - } +public final class FieldCopierAdapter { - public static FieldCopier of(ToCharFunction f) { - return CharFieldCopier.of(f); - } - - public static FieldCopier of(ToByteFunction f) { - return ByteFieldCopier.of(f); - } - - public static FieldCopier of(ToShortFunction f) { - return ShortFieldCopier.of(f); - } - - public static FieldCopier of(ToIntFunction f) { - return IntFieldCopier.of(f); - } - - public static FieldCopier of(ToLongFunction f) { - return LongFieldCopier.of(f); - } - - public static FieldCopier of(ToFloatFunction f) { - return FloatFieldCopier.of(f); - } - - public static FieldCopier of(ToDoubleFunction f) { - return DoubleFieldCopier.of(f); - } - - public static FieldCopier of(ToObjectFunction f) { - if (f.returnType().equals(BoxedBooleanType.of())) { - return ByteFieldCopier.ofBoolean(f.cast(BoxedBooleanType.of())); - } - return ObjectFieldCopier.of(f); - } - - @Override - public FieldCopier visit(ToPrimitiveFunction f) { - return of(f); - } - - @Override - public FieldCopier visit(ToBooleanFunction f) { - return of(f); - } - - @Override - public FieldCopier visit(ToCharFunction f) { - return of(f); - } - - @Override - public FieldCopier visit(ToByteFunction f) { - return of(f); - } - - @Override - public FieldCopier visit(ToShortFunction f) { - return of(f); - } - - @Override - public FieldCopier visit(ToIntFunction f) { - return of(f); - } - - @Override - public FieldCopier visit(ToLongFunction f) { - return of(f); - } - - @Override - public FieldCopier visit(ToFloatFunction f) { - return of(f); - } - - @Override - public FieldCopier visit(ToDoubleFunction f) { - return of(f); - } - - @Override - public FieldCopier visit(ToObjectFunction f) { - return of(f); + public static FieldCopier of(TypedFunction f) { + return new FieldCopierProcessorImpl(ObjectProcessorFunctions.of(List.of(f))); } } diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierProcessorImpl.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierProcessorImpl.java new file mode 100644 index 00000000000..acfceedd060 --- /dev/null +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierProcessorImpl.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending + */ +package io.deephaven.kafka.ingest; + +import io.deephaven.chunk.ObjectChunk; +import io.deephaven.chunk.WritableChunk; +import io.deephaven.chunk.attributes.Values; +import io.deephaven.processor.ObjectProcessor; + +import java.util.List; +import java.util.Objects; + +final class FieldCopierProcessorImpl implements FieldCopier { + + private final ObjectProcessor processor; + + FieldCopierProcessorImpl(ObjectProcessor processor) { + this.processor = Objects.requireNonNull(processor); + } + + @Override + public void copyField(ObjectChunk inputChunk, WritableChunk publisherChunk, + int sourceOffset, int destOffset, int length) { + final int originalSize = publisherChunk.size(); + publisherChunk.setSize(destOffset); + try { + processor.processAll(inputChunk.slice(sourceOffset, length), List.of(publisherChunk)); + } finally { + publisherChunk.setSize(originalSize); + } + } +} diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FloatFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FloatFieldCopier.java deleted file mode 100644 index 3f6d1bf8797..00000000000 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FloatFieldCopier.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending - */ -package io.deephaven.kafka.ingest; - -import io.deephaven.chunk.ObjectChunk; -import io.deephaven.chunk.WritableChunk; -import io.deephaven.chunk.attributes.Values; -import io.deephaven.function.ToFloatFunction; -import io.deephaven.function.ToObjectFunction; -import io.deephaven.processor.functions.ChunkUtils; -import io.deephaven.util.type.TypeUtils; - -import java.util.Objects; - -class FloatFieldCopier implements FieldCopier { - public static FloatFieldCopier of(ToFloatFunction f) { - return new FloatFieldCopier(f); - } - - public static FloatFieldCopier of(ToObjectFunction f) { - return of(f.mapToFloat(TypeUtils::unbox)); - } - - private final ToFloatFunction f; - - private FloatFieldCopier(ToFloatFunction f) { - this.f = Objects.requireNonNull(f); - } - - @Override - public void copyField( - ObjectChunk inputChunk, - WritableChunk publisherChunk, - int sourceOffset, - int destOffset, - int length) { - ChunkUtils.applyInto(f, inputChunk, sourceOffset, publisherChunk.asWritableFloatChunk(), destOffset, length); - } -} diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/IntFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/IntFieldCopier.java deleted file mode 100644 index 54fee133adf..00000000000 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/IntFieldCopier.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending - */ -package io.deephaven.kafka.ingest; - -import io.deephaven.chunk.ObjectChunk; -import io.deephaven.chunk.WritableChunk; -import io.deephaven.chunk.attributes.Values; -import io.deephaven.function.ToIntFunction; -import io.deephaven.function.ToObjectFunction; -import io.deephaven.processor.functions.ChunkUtils; -import io.deephaven.util.type.TypeUtils; - -import java.util.Objects; - -class IntFieldCopier implements FieldCopier { - public static IntFieldCopier of(ToIntFunction f) { - return new IntFieldCopier(f); - } - - public static IntFieldCopier of(ToObjectFunction f) { - return of(f.mapToInt(TypeUtils::unbox)); - } - - private final ToIntFunction f; - - private IntFieldCopier(ToIntFunction f) { - this.f = Objects.requireNonNull(f); - } - - @Override - public void copyField( - ObjectChunk inputChunk, - WritableChunk publisherChunk, - int sourceOffset, - int destOffset, - int length) { - ChunkUtils.applyInto(f, inputChunk, sourceOffset, publisherChunk.asWritableIntChunk(), destOffset, length); - } -} diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/LongFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/LongFieldCopier.java deleted file mode 100644 index 9b361df846d..00000000000 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/LongFieldCopier.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending - */ -package io.deephaven.kafka.ingest; - -import io.deephaven.chunk.ObjectChunk; -import io.deephaven.chunk.WritableChunk; -import io.deephaven.chunk.attributes.Values; -import io.deephaven.function.ToLongFunction; -import io.deephaven.function.ToObjectFunction; -import io.deephaven.processor.functions.ChunkUtils; -import io.deephaven.util.type.TypeUtils; - -import java.util.Objects; - -class LongFieldCopier implements FieldCopier { - public static LongFieldCopier of(ToLongFunction f) { - return new LongFieldCopier(f); - } - - public static LongFieldCopier of(ToObjectFunction f) { - return of(f.mapToLong(TypeUtils::unbox)); - } - - private final ToLongFunction f; - - private LongFieldCopier(ToLongFunction f) { - this.f = Objects.requireNonNull(f); - } - - @Override - public void copyField( - ObjectChunk inputChunk, - WritableChunk publisherChunk, - int sourceOffset, - int destOffset, - int length) { - ChunkUtils.applyInto(f, inputChunk, sourceOffset, publisherChunk.asWritableLongChunk(), destOffset, length); - } -} diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ObjectFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ObjectFieldCopier.java deleted file mode 100644 index 79bf211bace..00000000000 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ObjectFieldCopier.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending - */ -package io.deephaven.kafka.ingest; - -import io.deephaven.chunk.ObjectChunk; -import io.deephaven.chunk.WritableChunk; -import io.deephaven.chunk.attributes.Values; -import io.deephaven.function.ToObjectFunction; -import io.deephaven.processor.functions.ChunkUtils; - -import java.util.Objects; - -class ObjectFieldCopier implements FieldCopier { - public static ObjectFieldCopier of(ToObjectFunction f) { - return new ObjectFieldCopier(f); - } - - private final ToObjectFunction f; - - private ObjectFieldCopier(ToObjectFunction f) { - this.f = Objects.requireNonNull(f); - } - - @Override - public void copyField( - ObjectChunk inputChunk, - WritableChunk publisherChunk, - int sourceOffset, - int destOffset, - int length) { - ChunkUtils.applyInto(f, inputChunk, sourceOffset, publisherChunk.asWritableObjectChunk(), destOffset, length); - } -} diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ShortFieldCopier.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ShortFieldCopier.java deleted file mode 100644 index 93b99de966d..00000000000 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/ShortFieldCopier.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending - */ -package io.deephaven.kafka.ingest; - -import io.deephaven.chunk.ObjectChunk; -import io.deephaven.chunk.WritableChunk; -import io.deephaven.chunk.attributes.Values; -import io.deephaven.function.ToObjectFunction; -import io.deephaven.function.ToShortFunction; -import io.deephaven.processor.functions.ChunkUtils; -import io.deephaven.util.type.TypeUtils; - -import java.util.Objects; - -class ShortFieldCopier implements FieldCopier { - public static ShortFieldCopier of(ToShortFunction f) { - return new ShortFieldCopier(f); - } - - public static ShortFieldCopier of(ToObjectFunction f) { - return of(f.mapToShort(TypeUtils::unbox)); - } - - private final ToShortFunction f; - - private ShortFieldCopier(ToShortFunction f) { - this.f = Objects.requireNonNull(f); - } - - @Override - public void copyField( - ObjectChunk inputChunk, - WritableChunk publisherChunk, - int sourceOffset, - int destOffset, - int length) { - ChunkUtils.applyInto(f, inputChunk, sourceOffset, publisherChunk.asWritableShortChunk(), destOffset, length); - } -} From 7edb855cce85f4e4cfeb69ba9166c520b8ea008e Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Fri, 19 Jan 2024 13:01:34 -0800 Subject: [PATCH 07/12] Move to Util/function --- {function => Util/function}/build.gradle | 0 {function => Util/function}/gradle.properties | 0 .../main/java/io/deephaven/function/BooleanFunctions.java | 0 .../main/java/io/deephaven/function/ByteFunctions.java | 0 .../main/java/io/deephaven/function/CharFunctions.java | 0 .../main/java/io/deephaven/function/DoubleFunctions.java | 0 .../main/java/io/deephaven/function/FloatFunctions.java | 0 .../src/main/java/io/deephaven/function/IntFunctions.java | 0 .../main/java/io/deephaven/function/LongFunctions.java | 0 .../main/java/io/deephaven/function/ObjectFunctions.java | 0 .../java/io/deephaven/function/PrimitiveFunctions.java | 0 .../main/java/io/deephaven/function/ShortFunctions.java | 0 .../java/io/deephaven/function/ToBooleanFunction.java | 0 .../main/java/io/deephaven/function/ToByteFunction.java | 0 .../main/java/io/deephaven/function/ToCharFunction.java | 0 .../main/java/io/deephaven/function/ToDoubleFunction.java | 0 .../main/java/io/deephaven/function/ToFloatFunction.java | 0 .../main/java/io/deephaven/function/ToIntFunction.java | 0 .../main/java/io/deephaven/function/ToLongFunction.java | 0 .../main/java/io/deephaven/function/ToObjectFunction.java | 0 .../java/io/deephaven/function/ToPrimitiveFunction.java | 0 .../main/java/io/deephaven/function/ToShortFunction.java | 0 .../main/java/io/deephaven/function/TypedFunction.java | 0 .../main/java/io/deephaven/function/TypedFunctions.java | 0 .../java/io/deephaven/function/ToBooleanFunctionTest.java | 0 .../java/io/deephaven/function/ToByteFunctionTest.java | 0 .../java/io/deephaven/function/ToCharFunctionTest.java | 0 .../java/io/deephaven/function/ToDoubleFunctionTest.java | 0 .../java/io/deephaven/function/ToFloatFunctionTest.java | 0 .../java/io/deephaven/function/ToIntFunctionTest.java | 0 .../java/io/deephaven/function/ToLongFunctionTest.java | 0 .../java/io/deephaven/function/ToObjectFunctionTest.java | 0 .../java/io/deephaven/function/ToShortFunctionTest.java | 0 Util/{util-immutables => immutables}/build.gradle | 0 Util/{util-immutables => immutables}/gradle.properties | 0 .../java/io/deephaven/annotations/BuildableStyle.java | 0 .../main/java/io/deephaven/annotations/SimpleStyle.java | 0 .../java/io/deephaven/annotations/SingletonStyle.java | 0 engine/processor-functions/build.gradle | 2 +- extensions/protobuf/build.gradle | 2 +- settings.gradle | 8 ++++---- 41 files changed, 6 insertions(+), 6 deletions(-) rename {function => Util/function}/build.gradle (100%) rename {function => Util/function}/gradle.properties (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/BooleanFunctions.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/ByteFunctions.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/CharFunctions.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/DoubleFunctions.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/FloatFunctions.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/IntFunctions.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/LongFunctions.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/ObjectFunctions.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/PrimitiveFunctions.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/ShortFunctions.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/ToBooleanFunction.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/ToByteFunction.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/ToCharFunction.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/ToDoubleFunction.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/ToFloatFunction.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/ToIntFunction.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/ToLongFunction.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/ToObjectFunction.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/ToPrimitiveFunction.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/ToShortFunction.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/TypedFunction.java (100%) rename {function => Util/function}/src/main/java/io/deephaven/function/TypedFunctions.java (100%) rename {function => Util/function}/src/test/java/io/deephaven/function/ToBooleanFunctionTest.java (100%) rename {function => Util/function}/src/test/java/io/deephaven/function/ToByteFunctionTest.java (100%) rename {function => Util/function}/src/test/java/io/deephaven/function/ToCharFunctionTest.java (100%) rename {function => Util/function}/src/test/java/io/deephaven/function/ToDoubleFunctionTest.java (100%) rename {function => Util/function}/src/test/java/io/deephaven/function/ToFloatFunctionTest.java (100%) rename {function => Util/function}/src/test/java/io/deephaven/function/ToIntFunctionTest.java (100%) rename {function => Util/function}/src/test/java/io/deephaven/function/ToLongFunctionTest.java (100%) rename {function => Util/function}/src/test/java/io/deephaven/function/ToObjectFunctionTest.java (100%) rename {function => Util/function}/src/test/java/io/deephaven/function/ToShortFunctionTest.java (100%) rename Util/{util-immutables => immutables}/build.gradle (100%) rename Util/{util-immutables => immutables}/gradle.properties (100%) rename Util/{util-immutables => immutables}/src/main/java/io/deephaven/annotations/BuildableStyle.java (100%) rename Util/{util-immutables => immutables}/src/main/java/io/deephaven/annotations/SimpleStyle.java (100%) rename Util/{util-immutables => immutables}/src/main/java/io/deephaven/annotations/SingletonStyle.java (100%) diff --git a/function/build.gradle b/Util/function/build.gradle similarity index 100% rename from function/build.gradle rename to Util/function/build.gradle diff --git a/function/gradle.properties b/Util/function/gradle.properties similarity index 100% rename from function/gradle.properties rename to Util/function/gradle.properties diff --git a/function/src/main/java/io/deephaven/function/BooleanFunctions.java b/Util/function/src/main/java/io/deephaven/function/BooleanFunctions.java similarity index 100% rename from function/src/main/java/io/deephaven/function/BooleanFunctions.java rename to Util/function/src/main/java/io/deephaven/function/BooleanFunctions.java diff --git a/function/src/main/java/io/deephaven/function/ByteFunctions.java b/Util/function/src/main/java/io/deephaven/function/ByteFunctions.java similarity index 100% rename from function/src/main/java/io/deephaven/function/ByteFunctions.java rename to Util/function/src/main/java/io/deephaven/function/ByteFunctions.java diff --git a/function/src/main/java/io/deephaven/function/CharFunctions.java b/Util/function/src/main/java/io/deephaven/function/CharFunctions.java similarity index 100% rename from function/src/main/java/io/deephaven/function/CharFunctions.java rename to Util/function/src/main/java/io/deephaven/function/CharFunctions.java diff --git a/function/src/main/java/io/deephaven/function/DoubleFunctions.java b/Util/function/src/main/java/io/deephaven/function/DoubleFunctions.java similarity index 100% rename from function/src/main/java/io/deephaven/function/DoubleFunctions.java rename to Util/function/src/main/java/io/deephaven/function/DoubleFunctions.java diff --git a/function/src/main/java/io/deephaven/function/FloatFunctions.java b/Util/function/src/main/java/io/deephaven/function/FloatFunctions.java similarity index 100% rename from function/src/main/java/io/deephaven/function/FloatFunctions.java rename to Util/function/src/main/java/io/deephaven/function/FloatFunctions.java diff --git a/function/src/main/java/io/deephaven/function/IntFunctions.java b/Util/function/src/main/java/io/deephaven/function/IntFunctions.java similarity index 100% rename from function/src/main/java/io/deephaven/function/IntFunctions.java rename to Util/function/src/main/java/io/deephaven/function/IntFunctions.java diff --git a/function/src/main/java/io/deephaven/function/LongFunctions.java b/Util/function/src/main/java/io/deephaven/function/LongFunctions.java similarity index 100% rename from function/src/main/java/io/deephaven/function/LongFunctions.java rename to Util/function/src/main/java/io/deephaven/function/LongFunctions.java diff --git a/function/src/main/java/io/deephaven/function/ObjectFunctions.java b/Util/function/src/main/java/io/deephaven/function/ObjectFunctions.java similarity index 100% rename from function/src/main/java/io/deephaven/function/ObjectFunctions.java rename to Util/function/src/main/java/io/deephaven/function/ObjectFunctions.java diff --git a/function/src/main/java/io/deephaven/function/PrimitiveFunctions.java b/Util/function/src/main/java/io/deephaven/function/PrimitiveFunctions.java similarity index 100% rename from function/src/main/java/io/deephaven/function/PrimitiveFunctions.java rename to Util/function/src/main/java/io/deephaven/function/PrimitiveFunctions.java diff --git a/function/src/main/java/io/deephaven/function/ShortFunctions.java b/Util/function/src/main/java/io/deephaven/function/ShortFunctions.java similarity index 100% rename from function/src/main/java/io/deephaven/function/ShortFunctions.java rename to Util/function/src/main/java/io/deephaven/function/ShortFunctions.java diff --git a/function/src/main/java/io/deephaven/function/ToBooleanFunction.java b/Util/function/src/main/java/io/deephaven/function/ToBooleanFunction.java similarity index 100% rename from function/src/main/java/io/deephaven/function/ToBooleanFunction.java rename to Util/function/src/main/java/io/deephaven/function/ToBooleanFunction.java diff --git a/function/src/main/java/io/deephaven/function/ToByteFunction.java b/Util/function/src/main/java/io/deephaven/function/ToByteFunction.java similarity index 100% rename from function/src/main/java/io/deephaven/function/ToByteFunction.java rename to Util/function/src/main/java/io/deephaven/function/ToByteFunction.java diff --git a/function/src/main/java/io/deephaven/function/ToCharFunction.java b/Util/function/src/main/java/io/deephaven/function/ToCharFunction.java similarity index 100% rename from function/src/main/java/io/deephaven/function/ToCharFunction.java rename to Util/function/src/main/java/io/deephaven/function/ToCharFunction.java diff --git a/function/src/main/java/io/deephaven/function/ToDoubleFunction.java b/Util/function/src/main/java/io/deephaven/function/ToDoubleFunction.java similarity index 100% rename from function/src/main/java/io/deephaven/function/ToDoubleFunction.java rename to Util/function/src/main/java/io/deephaven/function/ToDoubleFunction.java diff --git a/function/src/main/java/io/deephaven/function/ToFloatFunction.java b/Util/function/src/main/java/io/deephaven/function/ToFloatFunction.java similarity index 100% rename from function/src/main/java/io/deephaven/function/ToFloatFunction.java rename to Util/function/src/main/java/io/deephaven/function/ToFloatFunction.java diff --git a/function/src/main/java/io/deephaven/function/ToIntFunction.java b/Util/function/src/main/java/io/deephaven/function/ToIntFunction.java similarity index 100% rename from function/src/main/java/io/deephaven/function/ToIntFunction.java rename to Util/function/src/main/java/io/deephaven/function/ToIntFunction.java diff --git a/function/src/main/java/io/deephaven/function/ToLongFunction.java b/Util/function/src/main/java/io/deephaven/function/ToLongFunction.java similarity index 100% rename from function/src/main/java/io/deephaven/function/ToLongFunction.java rename to Util/function/src/main/java/io/deephaven/function/ToLongFunction.java diff --git a/function/src/main/java/io/deephaven/function/ToObjectFunction.java b/Util/function/src/main/java/io/deephaven/function/ToObjectFunction.java similarity index 100% rename from function/src/main/java/io/deephaven/function/ToObjectFunction.java rename to Util/function/src/main/java/io/deephaven/function/ToObjectFunction.java diff --git a/function/src/main/java/io/deephaven/function/ToPrimitiveFunction.java b/Util/function/src/main/java/io/deephaven/function/ToPrimitiveFunction.java similarity index 100% rename from function/src/main/java/io/deephaven/function/ToPrimitiveFunction.java rename to Util/function/src/main/java/io/deephaven/function/ToPrimitiveFunction.java diff --git a/function/src/main/java/io/deephaven/function/ToShortFunction.java b/Util/function/src/main/java/io/deephaven/function/ToShortFunction.java similarity index 100% rename from function/src/main/java/io/deephaven/function/ToShortFunction.java rename to Util/function/src/main/java/io/deephaven/function/ToShortFunction.java diff --git a/function/src/main/java/io/deephaven/function/TypedFunction.java b/Util/function/src/main/java/io/deephaven/function/TypedFunction.java similarity index 100% rename from function/src/main/java/io/deephaven/function/TypedFunction.java rename to Util/function/src/main/java/io/deephaven/function/TypedFunction.java diff --git a/function/src/main/java/io/deephaven/function/TypedFunctions.java b/Util/function/src/main/java/io/deephaven/function/TypedFunctions.java similarity index 100% rename from function/src/main/java/io/deephaven/function/TypedFunctions.java rename to Util/function/src/main/java/io/deephaven/function/TypedFunctions.java diff --git a/function/src/test/java/io/deephaven/function/ToBooleanFunctionTest.java b/Util/function/src/test/java/io/deephaven/function/ToBooleanFunctionTest.java similarity index 100% rename from function/src/test/java/io/deephaven/function/ToBooleanFunctionTest.java rename to Util/function/src/test/java/io/deephaven/function/ToBooleanFunctionTest.java diff --git a/function/src/test/java/io/deephaven/function/ToByteFunctionTest.java b/Util/function/src/test/java/io/deephaven/function/ToByteFunctionTest.java similarity index 100% rename from function/src/test/java/io/deephaven/function/ToByteFunctionTest.java rename to Util/function/src/test/java/io/deephaven/function/ToByteFunctionTest.java diff --git a/function/src/test/java/io/deephaven/function/ToCharFunctionTest.java b/Util/function/src/test/java/io/deephaven/function/ToCharFunctionTest.java similarity index 100% rename from function/src/test/java/io/deephaven/function/ToCharFunctionTest.java rename to Util/function/src/test/java/io/deephaven/function/ToCharFunctionTest.java diff --git a/function/src/test/java/io/deephaven/function/ToDoubleFunctionTest.java b/Util/function/src/test/java/io/deephaven/function/ToDoubleFunctionTest.java similarity index 100% rename from function/src/test/java/io/deephaven/function/ToDoubleFunctionTest.java rename to Util/function/src/test/java/io/deephaven/function/ToDoubleFunctionTest.java diff --git a/function/src/test/java/io/deephaven/function/ToFloatFunctionTest.java b/Util/function/src/test/java/io/deephaven/function/ToFloatFunctionTest.java similarity index 100% rename from function/src/test/java/io/deephaven/function/ToFloatFunctionTest.java rename to Util/function/src/test/java/io/deephaven/function/ToFloatFunctionTest.java diff --git a/function/src/test/java/io/deephaven/function/ToIntFunctionTest.java b/Util/function/src/test/java/io/deephaven/function/ToIntFunctionTest.java similarity index 100% rename from function/src/test/java/io/deephaven/function/ToIntFunctionTest.java rename to Util/function/src/test/java/io/deephaven/function/ToIntFunctionTest.java diff --git a/function/src/test/java/io/deephaven/function/ToLongFunctionTest.java b/Util/function/src/test/java/io/deephaven/function/ToLongFunctionTest.java similarity index 100% rename from function/src/test/java/io/deephaven/function/ToLongFunctionTest.java rename to Util/function/src/test/java/io/deephaven/function/ToLongFunctionTest.java diff --git a/function/src/test/java/io/deephaven/function/ToObjectFunctionTest.java b/Util/function/src/test/java/io/deephaven/function/ToObjectFunctionTest.java similarity index 100% rename from function/src/test/java/io/deephaven/function/ToObjectFunctionTest.java rename to Util/function/src/test/java/io/deephaven/function/ToObjectFunctionTest.java diff --git a/function/src/test/java/io/deephaven/function/ToShortFunctionTest.java b/Util/function/src/test/java/io/deephaven/function/ToShortFunctionTest.java similarity index 100% rename from function/src/test/java/io/deephaven/function/ToShortFunctionTest.java rename to Util/function/src/test/java/io/deephaven/function/ToShortFunctionTest.java diff --git a/Util/util-immutables/build.gradle b/Util/immutables/build.gradle similarity index 100% rename from Util/util-immutables/build.gradle rename to Util/immutables/build.gradle diff --git a/Util/util-immutables/gradle.properties b/Util/immutables/gradle.properties similarity index 100% rename from Util/util-immutables/gradle.properties rename to Util/immutables/gradle.properties diff --git a/Util/util-immutables/src/main/java/io/deephaven/annotations/BuildableStyle.java b/Util/immutables/src/main/java/io/deephaven/annotations/BuildableStyle.java similarity index 100% rename from Util/util-immutables/src/main/java/io/deephaven/annotations/BuildableStyle.java rename to Util/immutables/src/main/java/io/deephaven/annotations/BuildableStyle.java diff --git a/Util/util-immutables/src/main/java/io/deephaven/annotations/SimpleStyle.java b/Util/immutables/src/main/java/io/deephaven/annotations/SimpleStyle.java similarity index 100% rename from Util/util-immutables/src/main/java/io/deephaven/annotations/SimpleStyle.java rename to Util/immutables/src/main/java/io/deephaven/annotations/SimpleStyle.java diff --git a/Util/util-immutables/src/main/java/io/deephaven/annotations/SingletonStyle.java b/Util/immutables/src/main/java/io/deephaven/annotations/SingletonStyle.java similarity index 100% rename from Util/util-immutables/src/main/java/io/deephaven/annotations/SingletonStyle.java rename to Util/immutables/src/main/java/io/deephaven/annotations/SingletonStyle.java diff --git a/engine/processor-functions/build.gradle b/engine/processor-functions/build.gradle index 95e35b19ef4..216662c7f56 100644 --- a/engine/processor-functions/build.gradle +++ b/engine/processor-functions/build.gradle @@ -6,7 +6,7 @@ plugins { dependencies { api project(':engine-processor') - api project(':function') + api project(':util-function') implementation project(':engine-time') diff --git a/extensions/protobuf/build.gradle b/extensions/protobuf/build.gradle index 39678a2438c..b2528b0ae74 100644 --- a/extensions/protobuf/build.gradle +++ b/extensions/protobuf/build.gradle @@ -6,7 +6,7 @@ plugins { dependencies { api project(':qst') - api project(':function') + api project(':util-function') api 'com.google.protobuf:protobuf-java:3.24.1' implementation project(':engine-query-constants') diff --git a/settings.gradle b/settings.gradle index bb839c5cc10..1f6c8aaa42b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -318,7 +318,10 @@ include(':qst:graphviz') include(':application-mode') include(':util-immutables') -project(':util-immutables').projectDir = file('Util/util-immutables') +project(':util-immutables').projectDir = file('Util/immutables') + +include ':util-function' +project(':util-function').projectDir = file('Util/function') include(':deephaven-jpy-config') project(':deephaven-jpy-config').projectDir = file('py/jpy-config') @@ -383,9 +386,6 @@ include ':clock-impl' include ':sql' -include ':function' -project(':function').projectDir = file('function') - file("${rootDir}/docker/registry").list().each { name -> if (file("${rootDir}/docker/registry/${name}/build.gradle").exists()) { include(":docker-${name}") From 76f3e1cefdb253faac4083e0a3ae36514ab42941 Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Fri, 19 Jan 2024 13:01:47 -0800 Subject: [PATCH 08/12] Remove unused imports/dependency --- engine/processor/build.gradle | 2 -- .../io/deephaven/kafka/ingest/FieldCopierAdapter.java | 11 ----------- 2 files changed, 13 deletions(-) diff --git a/engine/processor/build.gradle b/engine/processor/build.gradle index 0e17a6301ee..b79e1dd9105 100644 --- a/engine/processor/build.gradle +++ b/engine/processor/build.gradle @@ -8,8 +8,6 @@ dependencies { api project(':qst') api project(':engine-chunk') - implementation project(':engine-time') - Classpaths.inheritJUnitPlatform(project) Classpaths.inheritAssertJ(project) testImplementation 'org.junit.jupiter:junit-jupiter' diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java index 44b8802c961..22d8fdafac5 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java @@ -4,17 +4,6 @@ package io.deephaven.kafka.ingest; import io.deephaven.processor.functions.ObjectProcessorFunctions; -import io.deephaven.qst.type.BoxedBooleanType; -import io.deephaven.function.ToBooleanFunction; -import io.deephaven.function.ToByteFunction; -import io.deephaven.function.ToCharFunction; -import io.deephaven.function.ToDoubleFunction; -import io.deephaven.function.ToFloatFunction; -import io.deephaven.function.ToIntFunction; -import io.deephaven.function.ToLongFunction; -import io.deephaven.function.ToObjectFunction; -import io.deephaven.function.ToPrimitiveFunction; -import io.deephaven.function.ToShortFunction; import io.deephaven.function.TypedFunction; import java.util.List; From 9ac5696d0c20598144737075f9c141c7b05a84e2 Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Fri, 19 Jan 2024 13:15:18 -0800 Subject: [PATCH 09/12] Update util-function engine-processor to use qst-type instead of qst --- Util/function/build.gradle | 2 +- engine/processor/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Util/function/build.gradle b/Util/function/build.gradle index 1cd76588868..74f3394075c 100644 --- a/Util/function/build.gradle +++ b/Util/function/build.gradle @@ -4,7 +4,7 @@ plugins { } dependencies { - api project(':qst') + api project(':qst-type') compileOnly depAnnotations diff --git a/engine/processor/build.gradle b/engine/processor/build.gradle index b79e1dd9105..3e79e0fa7a8 100644 --- a/engine/processor/build.gradle +++ b/engine/processor/build.gradle @@ -5,7 +5,7 @@ plugins { dependencies { - api project(':qst') + api project(':qst-type') api project(':engine-chunk') Classpaths.inheritJUnitPlatform(project) From 3bf576c254150b76128f2a1943e3aeaaebfec789 Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Fri, 19 Jan 2024 13:26:07 -0800 Subject: [PATCH 10/12] Add extra ObjectProcessorFunctions test for Instant --- .../ObjectProcessorFunctionsTest.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/engine/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java b/engine/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java index 4abbbb26557..873c6040bd2 100644 --- a/engine/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java +++ b/engine/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java @@ -25,6 +25,7 @@ import io.deephaven.util.BooleanUtils; import org.junit.jupiter.api.Test; +import java.time.Instant; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; @@ -44,7 +45,8 @@ public void testObjectProcessorFunctionsCorrectAndColumnOriented() { (ToLongFunction) orchestrator::toLong, (ToFloatFunction) orchestrator::toFloat, (ToDoubleFunction) orchestrator::toDouble, - ToObjectFunction.of(orchestrator::toString, Type.stringType())))); + ToObjectFunction.of(orchestrator::toString, Type.stringType()), + ToObjectFunction.of(orchestrator::toInstant, Type.instantType())))); try ( WritableObjectChunk in = WritableObjectChunk.makeWritableChunk(numRows); WritableByteChunk c1 = WritableByteChunk.makeWritableChunk(numRows); @@ -55,8 +57,9 @@ public void testObjectProcessorFunctionsCorrectAndColumnOriented() { WritableLongChunk c6 = WritableLongChunk.makeWritableChunk(numRows); WritableFloatChunk c7 = WritableFloatChunk.makeWritableChunk(numRows); WritableDoubleChunk c8 = WritableDoubleChunk.makeWritableChunk(numRows); - WritableObjectChunk c9 = WritableObjectChunk.makeWritableChunk(numRows)) { - List> out = List.of(c1, c2, c3, c4, c5, c6, c7, c8, c9); + WritableObjectChunk c9 = WritableObjectChunk.makeWritableChunk(numRows); + WritableLongChunk c10 = WritableLongChunk.makeWritableChunk(numRows)) { + List> out = List.of(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10); for (WritableChunk c : out) { c.setSize(0); } @@ -74,6 +77,7 @@ public void testObjectProcessorFunctionsCorrectAndColumnOriented() { assertThat(c7.get(i)).isEqualTo(42.0f); assertThat(c8.get(i)).isEqualTo(42.0); assertThat(c9.get(i)).isEqualTo("42"); + assertThat(c10.get(i)).isEqualTo(42000000L); } } orchestrator.assertDone(); @@ -92,6 +96,7 @@ private static class FunctionOrchestrator { private int floats; private int doubles; private int strings; + private int instants; public FunctionOrchestrator(int numRows) { this.numRows = numRows; @@ -150,8 +155,14 @@ String toString(Object ignore) { return "42"; } - void assertDone() { + Instant toInstant(Object ignore) { assertThat(strings).isEqualTo(numRows); + ++instants; + return Instant.ofEpochMilli(42); + } + + void assertDone() { + assertThat(instants).isEqualTo(numRows); } } } From 361e2d7343f50f7f095903de6805d475fde0550a Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Fri, 19 Jan 2024 13:57:17 -0800 Subject: [PATCH 11/12] engine-processor-functions -> engine-processor-function --- .../{processor-functions => processor-function}/build.gradle | 0 .../gradle.properties | 0 .../java/io/deephaven/processor/functions/ChunkUtils.java | 0 .../processor/functions/ObjectProcessorFunctions.java | 0 .../processor/functions/ObjectProcessorFunctionsImpl.java | 0 .../processor/functions/ObjectProcessorFunctionsTest.java | 0 extensions/kafka/build.gradle | 2 +- settings.gradle | 4 ++-- 8 files changed, 3 insertions(+), 3 deletions(-) rename engine/{processor-functions => processor-function}/build.gradle (100%) rename engine/{processor-functions => processor-function}/gradle.properties (100%) rename engine/{processor-functions => processor-function}/src/main/java/io/deephaven/processor/functions/ChunkUtils.java (100%) rename engine/{processor-functions => processor-function}/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java (100%) rename engine/{processor-functions => processor-function}/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java (100%) rename engine/{processor-functions => processor-function}/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java (100%) diff --git a/engine/processor-functions/build.gradle b/engine/processor-function/build.gradle similarity index 100% rename from engine/processor-functions/build.gradle rename to engine/processor-function/build.gradle diff --git a/engine/processor-functions/gradle.properties b/engine/processor-function/gradle.properties similarity index 100% rename from engine/processor-functions/gradle.properties rename to engine/processor-function/gradle.properties diff --git a/engine/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java b/engine/processor-function/src/main/java/io/deephaven/processor/functions/ChunkUtils.java similarity index 100% rename from engine/processor-functions/src/main/java/io/deephaven/processor/functions/ChunkUtils.java rename to engine/processor-function/src/main/java/io/deephaven/processor/functions/ChunkUtils.java diff --git a/engine/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java b/engine/processor-function/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java similarity index 100% rename from engine/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java rename to engine/processor-function/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java diff --git a/engine/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java b/engine/processor-function/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java similarity index 100% rename from engine/processor-functions/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java rename to engine/processor-function/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java diff --git a/engine/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java b/engine/processor-function/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java similarity index 100% rename from engine/processor-functions/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java rename to engine/processor-function/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java diff --git a/extensions/kafka/build.gradle b/extensions/kafka/build.gradle index 5d880fdd172..9a859b61edb 100644 --- a/extensions/kafka/build.gradle +++ b/extensions/kafka/build.gradle @@ -28,7 +28,7 @@ dependencies { api project(':extensions-protobuf') - implementation project(':engine-processor-functions') + implementation project(':engine-processor-function') implementation project(':Configuration') implementation project(':log-factory') implementation depTrove3 diff --git a/settings.gradle b/settings.gradle index 900636c8f68..6a724c3de62 100644 --- a/settings.gradle +++ b/settings.gradle @@ -215,8 +215,8 @@ project(':engine-sql').projectDir = file('engine/sql') include ':engine-processor' project(':engine-processor').projectDir = file('engine/processor') -include ':engine-processor-functions' -project(':engine-processor-functions').projectDir = file('engine/processor-functions') +include ':engine-processor-function' +project(':engine-processor-function').projectDir = file('engine/processor-function') include(':extensions-csv') project(':extensions-csv').projectDir = file('extensions/csv') From c88767252fbaab79a041df256dbaf96311f4f0b8 Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Fri, 19 Jan 2024 16:21:03 -0800 Subject: [PATCH 12/12] Refactor io.deephaven.processor.functions to io.deephaven.processor.function --- .../deephaven/processor/{functions => function}/ChunkUtils.java | 2 +- .../{functions => function}/ObjectProcessorFunctions.java | 2 +- .../{functions => function}/ObjectProcessorFunctionsImpl.java | 2 +- .../{functions => function}/ObjectProcessorFunctionsTest.java | 2 +- .../main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename engine/processor-function/src/main/java/io/deephaven/processor/{functions => function}/ChunkUtils.java (99%) rename engine/processor-function/src/main/java/io/deephaven/processor/{functions => function}/ObjectProcessorFunctions.java (95%) rename engine/processor-function/src/main/java/io/deephaven/processor/{functions => function}/ObjectProcessorFunctionsImpl.java (99%) rename engine/processor-function/src/test/java/io/deephaven/processor/{functions => function}/ObjectProcessorFunctionsTest.java (99%) diff --git a/engine/processor-function/src/main/java/io/deephaven/processor/functions/ChunkUtils.java b/engine/processor-function/src/main/java/io/deephaven/processor/function/ChunkUtils.java similarity index 99% rename from engine/processor-function/src/main/java/io/deephaven/processor/functions/ChunkUtils.java rename to engine/processor-function/src/main/java/io/deephaven/processor/function/ChunkUtils.java index c6679e8ab2c..ca3ecd3a8d4 100644 --- a/engine/processor-function/src/main/java/io/deephaven/processor/functions/ChunkUtils.java +++ b/engine/processor-function/src/main/java/io/deephaven/processor/function/ChunkUtils.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.processor.functions; +package io.deephaven.processor.function; import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.WritableBooleanChunk; diff --git a/engine/processor-function/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java b/engine/processor-function/src/main/java/io/deephaven/processor/function/ObjectProcessorFunctions.java similarity index 95% rename from engine/processor-function/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java rename to engine/processor-function/src/main/java/io/deephaven/processor/function/ObjectProcessorFunctions.java index 710735d65a3..c7484441b37 100644 --- a/engine/processor-function/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctions.java +++ b/engine/processor-function/src/main/java/io/deephaven/processor/function/ObjectProcessorFunctions.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.processor.functions; +package io.deephaven.processor.function; import io.deephaven.chunk.ObjectChunk; import io.deephaven.function.TypedFunction; diff --git a/engine/processor-function/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java b/engine/processor-function/src/main/java/io/deephaven/processor/function/ObjectProcessorFunctionsImpl.java similarity index 99% rename from engine/processor-function/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java rename to engine/processor-function/src/main/java/io/deephaven/processor/function/ObjectProcessorFunctionsImpl.java index c04e6480455..5e4c043b7b3 100644 --- a/engine/processor-function/src/main/java/io/deephaven/processor/functions/ObjectProcessorFunctionsImpl.java +++ b/engine/processor-function/src/main/java/io/deephaven/processor/function/ObjectProcessorFunctionsImpl.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.processor.functions; +package io.deephaven.processor.function; import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.WritableByteChunk; diff --git a/engine/processor-function/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java b/engine/processor-function/src/test/java/io/deephaven/processor/function/ObjectProcessorFunctionsTest.java similarity index 99% rename from engine/processor-function/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java rename to engine/processor-function/src/test/java/io/deephaven/processor/function/ObjectProcessorFunctionsTest.java index 873c6040bd2..7758808dd51 100644 --- a/engine/processor-function/src/test/java/io/deephaven/processor/functions/ObjectProcessorFunctionsTest.java +++ b/engine/processor-function/src/test/java/io/deephaven/processor/function/ObjectProcessorFunctionsTest.java @@ -1,7 +1,7 @@ /** * Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending */ -package io.deephaven.processor.functions; +package io.deephaven.processor.function; import io.deephaven.chunk.WritableByteChunk; import io.deephaven.chunk.WritableCharChunk; diff --git a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java index 22d8fdafac5..3f92a57dc7e 100644 --- a/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java +++ b/extensions/kafka/src/main/java/io/deephaven/kafka/ingest/FieldCopierAdapter.java @@ -3,7 +3,7 @@ */ package io.deephaven.kafka.ingest; -import io.deephaven.processor.functions.ObjectProcessorFunctions; +import io.deephaven.processor.function.ObjectProcessorFunctions; import io.deephaven.function.TypedFunction; import java.util.List;