Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor TypedFunction, ObjectProcessor, and ObjectProcessorFunctions #4992

Merged
merged 13 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Util/function/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
plugins {
id 'java-library'
id 'io.deephaven.project.register'
}

dependencies {
api project(':qst-type')

compileOnly depAnnotations

Classpaths.inheritJUnitPlatform(project)
Classpaths.inheritAssertJ(project)
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}

test {
useJUnitPlatform()
}
1 change: 1 addition & 0 deletions Util/function/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.deephaven.project.ProjectType=JAVA_PUBLIC
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.deephaven.functions;
package io.deephaven.function;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.deephaven.functions;
package io.deephaven.function;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
File renamed without changes.
21 changes: 21 additions & 0 deletions engine/processor-function/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
plugins {
id 'java-library'
id 'io.deephaven.project.register'
}


dependencies {
api project(':engine-processor')
api project(':util-function')

implementation project(':engine-time')

Classpaths.inheritJUnitPlatform(project)
Classpaths.inheritAssertJ(project)
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}

test {
useJUnitPlatform()
}
1 change: 1 addition & 0 deletions engine/processor-function/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.deephaven.project.ProjectType=JAVA_PUBLIC
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Copyright (c) 2016-2023 Deephaven Data Labs and Patent Pending
*/
package io.deephaven.kafka.ingest;
package io.deephaven.processor.function;

import io.deephaven.chunk.ObjectChunk;
import io.deephaven.chunk.WritableBooleanChunk;
Expand All @@ -13,18 +13,18 @@
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;
import java.util.function.ToDoubleFunction;
import java.util.function.ToIntFunction;
import java.util.function.ToLongFunction;

public class ChunkUtils {
final class ChunkUtils {

public static <T> void applyInto(
Predicate<? super T> booleanFunction,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
* 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.functions.TypedFunction;
import io.deephaven.function.TypedFunction;
import io.deephaven.processor.ObjectProcessor;

import java.util.List;
Expand Down
Loading
Loading