From 86ae731ba70e36c2844b2b0e9c15e9b9011b39af Mon Sep 17 00:00:00 2001 From: Pengyu <3771747+better365@users.noreply.github.com> Date: Tue, 3 Oct 2023 11:06:03 -0700 Subject: [PATCH] fix 2.11 compilation --- .../spark/test/bootstrap/DerivationTest.scala | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/spark/src/test/scala/ai/chronon/spark/test/bootstrap/DerivationTest.scala b/spark/src/test/scala/ai/chronon/spark/test/bootstrap/DerivationTest.scala index b8230dcd3..10902e627 100644 --- a/spark/src/test/scala/ai/chronon/spark/test/bootstrap/DerivationTest.scala +++ b/spark/src/test/scala/ai/chronon/spark/test/bootstrap/DerivationTest.scala @@ -29,13 +29,20 @@ class DerivationTest { val namespace = "test_derivations" spark.sql(s"CREATE DATABASE IF NOT EXISTS $namespace") val groupBy = BootstrapUtils.buildGroupBy(namespace, spark) - val groupByWithDerivation = groupBy.setDerivations(Seq( - Builders.Derivation(name = "user_amount_30d_avg", - expression = "amount_dollars_sum_30d / 30"), - Builders.Derivation( - name = "*" - ), - ).toJava) + + val derivation1 = Builders.Derivation(name = "user_amount_30d_avg", + expression = "amount_dollars_sum_30d / 30") + val derivation2 = Builders.Derivation( + name = "*" + ) + + val groupByWithDerivation = groupBy + .setDerivations( + Seq( + derivation1, + derivation2 + ).toJava + ) val queryTable = BootstrapUtils.buildQuery(namespace, spark) val baseJoin = Builders.Join( left = Builders.Source.events(