This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 58887dcb7 [KYUUBI #5827][TEST] Fix wrong test code about directory
lineage
58887dcb7 is described below
commit 58887dcb7941df2c99a33432d7fa49b1d45b6087
Author: Angerszhuuuu <[email protected]>
AuthorDate: Thu Dec 7 18:07:13 2023 +0800
[KYUUBI #5827][TEST] Fix wrong test code about directory lineage
# :mag: Description
## Issue References ๐
This pull request fixes #5827
## Describe Your Solution ๐ง
Fix wrong test code about directory lineage
## Types of changes :bookmark:
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
## Test Plan ๐งช
#### Behavior Without This Pull Request :coffin:
#### Behavior With This Pull Request :tada:
#### Related Unit Tests
---
# Checklists
## ๐ Author Self Checklist
- [x] My code follows the [style
guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html)
of this project
- [x] I have performed a self-review
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature
works
- [x] New and existing unit tests pass locally with my changes
- [x] This patch was not authored or co-authored using [Generative
Tooling](https://www.apache.org/legal/generative-tooling.html)
## ๐ Committer Pre-Merge Checklist
- [x] Pull request title is okay.
- [x] No license issues.
- [x] Milestone correctly set?
- [x] Test coverage is ok
- [x] Assignees are selected.
- [x] Minimum number of approvals
- [x] No changes are requested
**Be nice. Be informative.**
Closes #5829 from AngersZhuuuu/KYUUBI-5827.
Closes #5827
007981c57 [Angerszhuuuu] [KYUUBI #5827][TEST]Fix wrong test code about
directory lineage
Authored-by: Angerszhuuuu <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
.../helper/SparkSQLLineageParserHelperSuite.scala | 24 +++++++++++++---------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git
a/extensions/spark/kyuubi-spark-lineage/src/test/scala/org/apache/kyuubi/plugin/lineage/helper/SparkSQLLineageParserHelperSuite.scala
b/extensions/spark/kyuubi-spark-lineage/src/test/scala/org/apache/kyuubi/plugin/lineage/helper/SparkSQLLineageParserHelperSuite.scala
index 3c19163db..761274379 100644
---
a/extensions/spark/kyuubi-spark-lineage/src/test/scala/org/apache/kyuubi/plugin/lineage/helper/SparkSQLLineageParserHelperSuite.scala
+++
b/extensions/spark/kyuubi-spark-lineage/src/test/scala/org/apache/kyuubi/plugin/lineage/helper/SparkSQLLineageParserHelperSuite.scala
@@ -472,32 +472,36 @@ class SparkSQLLineageParserHelperSuite extends
KyuubiFunSuite
val tableDirectory = getClass.getResource("/").getPath + "table_directory"
val directory = File(tableDirectory).createDirectory()
val ret0 = extractLineage(s"""
- |INSERT OVERWRITE DIRECTORY '$directory.path'
+ |INSERT OVERWRITE DIRECTORY
'${directory.path}'
|USING parquet
|SELECT * FROM
test_db0.test_table_part0""".stripMargin)
assert(ret0 == Lineage(
List(s"$DEFAULT_CATALOG.test_db0.test_table_part0"),
- List(s"""`$directory.path`"""),
+ List(s"""`${directory.path}`"""),
List(
- (s"""`$directory.path`.key""",
Set(s"$DEFAULT_CATALOG.test_db0.test_table_part0.key")),
- (s"""`$directory.path`.value""",
Set(s"$DEFAULT_CATALOG.test_db0.test_table_part0.value")),
- (s"""`$directory.path`.pid""",
Set(s"$DEFAULT_CATALOG.test_db0.test_table_part0.pid")))))
+ (s"""`${directory.path}`.key""",
Set(s"$DEFAULT_CATALOG.test_db0.test_table_part0.key")),
+ (
+ s"""`${directory.path}`.value""",
+ Set(s"$DEFAULT_CATALOG.test_db0.test_table_part0.value")),
+ (s"""`${directory.path}`.pid""",
Set(s"$DEFAULT_CATALOG.test_db0.test_table_part0.pid")))))
}
test("columns lineage extract - InsertIntoHiveDirCommand") {
val tableDirectory = getClass.getResource("/").getPath + "table_directory"
val directory = File(tableDirectory).createDirectory()
val ret0 = extractLineage(s"""
- |INSERT OVERWRITE DIRECTORY '$directory.path'
+ |INSERT OVERWRITE DIRECTORY
'${directory.path}'
|USING parquet
|SELECT * FROM
test_db0.test_table_part0""".stripMargin)
assert(ret0 == Lineage(
List(s"$DEFAULT_CATALOG.test_db0.test_table_part0"),
- List(s"""`$directory.path`"""),
+ List(s"""`${directory.path}`"""),
List(
- (s"""`$directory.path`.key""",
Set(s"$DEFAULT_CATALOG.test_db0.test_table_part0.key")),
- (s"""`$directory.path`.value""",
Set(s"$DEFAULT_CATALOG.test_db0.test_table_part0.value")),
- (s"""`$directory.path`.pid""",
Set(s"$DEFAULT_CATALOG.test_db0.test_table_part0.pid")))))
+ (s"""`${directory.path}`.key""",
Set(s"$DEFAULT_CATALOG.test_db0.test_table_part0.key")),
+ (
+ s"""`${directory.path}`.value""",
+ Set(s"$DEFAULT_CATALOG.test_db0.test_table_part0.value")),
+ (s"""`${directory.path}`.pid""",
Set(s"$DEFAULT_CATALOG.test_db0.test_table_part0.pid")))))
}
test("columns lineage extract - InsertIntoHiveTable") {