Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitozi committed Apr 18, 2024
1 parent 5af360a commit cae30ef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.apache.paimon.utils.TagManager;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.RepeatedTest;
import org.junit.jupiter.api.Test;

import java.time.LocalDateTime;
Expand Down Expand Up @@ -85,7 +86,7 @@ void before() throws Exception {
table.createTag("many-tags-test");
}

@Test
@RepeatedTest(value = 50)
void testTagsTable() throws Exception {
List<InternalRow> expectRow =
getExceptedResult(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
package org.apache.paimon.spark.procedure

import org.apache.paimon.spark.PaimonSparkTestBase

import org.apache.spark.sql.{Dataset, Row}
import org.apache.spark.sql.execution.streaming.MemoryStream
import org.apache.spark.sql.streaming.StreamTest
import org.apache.spark.sql.{Dataset, Row}

class ExpireSnapshotsProcedureTest extends PaimonSparkTestBase with StreamTest {

Expand All @@ -32,11 +33,10 @@ class ExpireSnapshotsProcedureTest extends PaimonSparkTestBase with StreamTest {
withTempDir {
checkpointDir =>
// define a change-log table and test `forEachBatch` api
spark.sql(
s"""
|CREATE TABLE T (a INT, b STRING)
|TBLPROPERTIES ('primary-key'='a', 'bucket'='3')
|""".stripMargin)
spark.sql(s"""
|CREATE TABLE T (a INT, b STRING)
|TBLPROPERTIES ('primary-key'='a', 'bucket'='3')
|""".stripMargin)
val location = loadTable("T").location().toString

val inputData = MemoryStream[(Int, String)]
Expand Down Expand Up @@ -71,7 +71,8 @@ class ExpireSnapshotsProcedureTest extends PaimonSparkTestBase with StreamTest {

// expire
checkAnswer(
spark.sql("CALL paimon.sys.expire_snapshots(table => 'test.T', retain_max => 2, retain_min => 1)"),
spark.sql(
"CALL paimon.sys.expire_snapshots(table => 'test.T', retain_max => 2, retain_min => 1)"),
Row(1) :: Nil)

checkAnswer(
Expand All @@ -89,11 +90,10 @@ class ExpireSnapshotsProcedureTest extends PaimonSparkTestBase with StreamTest {
withTempDir {
checkpointDir =>
// define a change-log table and test `forEachBatch` api
spark.sql(
s"""
|CREATE TABLE T (a INT, b STRING)
|TBLPROPERTIES ('primary-key'='a', 'bucket'='3')
|""".stripMargin)
spark.sql(s"""
|CREATE TABLE T (a INT, b STRING)
|TBLPROPERTIES ('primary-key'='a', 'bucket'='3')
|""".stripMargin)
val location = loadTable("T").location().toString

val inputData = MemoryStream[(Int, String)]
Expand Down

0 comments on commit cae30ef

Please sign in to comment.