forked from OpenLineage/OpenLineage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix query recorder class loading (OpenLineage#3281)
Signed-off-by: Pawel Leszczynski <[email protected]>
- Loading branch information
1 parent
7d7c715
commit 66a0b8b
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...spark/app/src/test/java/io/openlineage/spark/agent/lifecycle/SparkSQLQueryParserTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
/* Copyright 2018-2024 contributors to the OpenLineage project | ||
/* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.openlineage.spark.agent.lifecycle; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.junit.jupiter.params.ParameterizedTest; | ||
import org.junit.jupiter.params.provider.CsvSource; | ||
|
||
class SparkSQLQueryParserTest { | ||
|
||
SparkSQLQueryParser parser = new SparkSQLQueryParser(); | ||
|
||
@ParameterizedTest | ||
@CsvSource({ | ||
"2.4.8,io.openlineage.spark32.agent.lifecycle.plan.OpenLineageSQLQueryRecorder", | ||
"3.0.1,io.openlineage.spark32.agent.lifecycle.plan.OpenLineageSQLQueryRecorder", | ||
"3.1.0,io.openlineage.spark32.agent.lifecycle.plan.OpenLineageSQLQueryRecorder", | ||
"3.2.0,io.openlineage.spark32.agent.lifecycle.plan.OpenLineageSQLQueryRecorder", | ||
"3.3.0,io.openlineage.spark33.agent.lifecycle.plan.OpenLineageSQLQueryRecorder", | ||
"3.4.0,io.openlineage.spark33.agent.lifecycle.plan.OpenLineageSQLQueryRecorder", | ||
"3.5.0,io.openlineage.spark33.agent.lifecycle.plan.OpenLineageSQLQueryRecorder", | ||
"4.0.0,io.openlineage.spark33.agent.lifecycle.plan.OpenLineageSQLQueryRecorder" | ||
}) | ||
void testResolveParserClass(String sparkVersion, String expectedParserClass) { | ||
assertThat(parser.resolveParserClass(sparkVersion)).isEqualTo(expectedParserClass); | ||
} | ||
} |