[KYUUBI #5827][TEST] Fix wrong test code about directory lineage
# 🔍 Description ## Issue References 🔗 This pull request fixes #5827 ## Describe Your Solution 🔧 Fix wrong test code about directory lineage ## Types of changes 🔖 - [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 ⚰️ #### Behavior With This Pull Request 🎉 #### 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 <angers.zhu@gmail.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
parent
27ad1024b5
commit
58887dcb79
@ -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") {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user