This is an automated email from the ASF dual-hosted git repository.

jlli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new a6e23c1f73 Fix Java8 compat in Vector Transform tests (#11289)
a6e23c1f73 is described below

commit a6e23c1f73e2867f6bc7f6cba76b70e83c49c354
Author: Dino Occhialini <dino.occhial...@gmail.com>
AuthorDate: Mon Aug 7 18:09:59 2023 -0700

    Fix Java8 compat in Vector Transform tests (#11289)
    
    This commit replaces the usage of `"".repeat(...)` added in #11268
    with java8 compatible invocations
---
 .../operator/transform/function/VectorTransformFunctionTest.java     | 3 ++-
 .../org/apache/pinot/integration/tests/VectorIntegrationTest.java    | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/pinot-core/src/test/java/org/apache/pinot/core/operator/transform/function/VectorTransformFunctionTest.java
 
b/pinot-core/src/test/java/org/apache/pinot/core/operator/transform/function/VectorTransformFunctionTest.java
index 23b3213f3e..56ab53e285 100644
--- 
a/pinot-core/src/test/java/org/apache/pinot/core/operator/transform/function/VectorTransformFunctionTest.java
+++ 
b/pinot-core/src/test/java/org/apache/pinot/core/operator/transform/function/VectorTransformFunctionTest.java
@@ -18,6 +18,7 @@
  */
 package org.apache.pinot.core.operator.transform.function;
 
+import org.apache.commons.lang3.StringUtils;
 import org.apache.pinot.common.request.context.ExpressionContext;
 import org.apache.pinot.common.request.context.RequestContextUtils;
 import org.testng.annotations.DataProvider;
@@ -60,7 +61,7 @@ public class VectorTransformFunctionTest extends 
BaseTransformFunctionTest {
   @DataProvider(name = "testVectorTransformFunctionDataProvider")
   public Object[][] testVectorTransformFunctionDataProvider() {
     String zeroVectorLiteral = "ARRAY[0.0"
-        + ",0.0".repeat(VECTOR_DIM_SIZE - 1)
+        + StringUtils.repeat(",0.0", VECTOR_DIM_SIZE - 1)
         + "]";
     return new Object[][]{
         new Object[]{"cosineDistance(vector1, vector2)", 0.1, 0.4},
diff --git 
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/VectorIntegrationTest.java
 
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/VectorIntegrationTest.java
index dbfcd5a347..97871c9a80 100644
--- 
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/VectorIntegrationTest.java
+++ 
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/VectorIntegrationTest.java
@@ -32,6 +32,7 @@ import org.apache.avro.generic.GenericData;
 import org.apache.avro.generic.GenericDatumWriter;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.RandomUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.pinot.spi.config.table.TableConfig;
 import org.apache.pinot.spi.config.table.TableType;
 import org.apache.pinot.spi.data.FieldSpec;
@@ -131,10 +132,10 @@ public class VectorIntegrationTest extends 
BaseClusterIntegrationTest {
       throws Exception {
     setUseMultiStageQueryEngine(useMultiStageQueryEngine);
     String zeroVectorStringLiteral = "ARRAY[0.0"
-        + ", 0.0".repeat(VECTOR_DIM_SIZE - 1)
+        + StringUtils.repeat(", 0.0", VECTOR_DIM_SIZE - 1)
         + "]";
     String oneVectorStringLiteral = "ARRAY[1.0"
-        + ", 1.0".repeat(VECTOR_DIM_SIZE - 1)
+        + StringUtils.repeat(", 1.0", VECTOR_DIM_SIZE - 1)
         + "]";
     String query =
         String.format("SELECT "


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to