[Bug] The PermanentViewMarker causes the lineage of persistent views to fail
- Dominant language
- Scala
- Stars
- 2.4k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
### Search before asking
- [x] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues.
### Describe the bug
The rule of the persistent view has been marked as PermanentViewMarker by RuleApplyPermanentViewMarker, which makes it impossible to match PermanentViewMarker in SparkSQLLineageParseHelper.scala in the lineage, and thus the lineage of the persistent view cannot be parsed:
```
case p: View =>
if (
!p.isTempView && SparkContextHelper.getConf(
LineageConf.SKIP_PARSING_PERMANENT_VIEW_ENABLED)
) {
val viewName = getV1TableName(p.desc.qualifiedName)
joinRelationColumnLineage(parentColumnsLineage, p.output, Seq(viewName))
} else {
val viewColumnsLineage =
extractColumnsLineage(p.child, ListMap[Attribute, AttributeSet]())
mergeRelationColumnLineage(parentColumnsLineage, p.output, viewColumnsLineage)
}
```
I think there should be:
```
case p: PermanentViewMarker =>
```
### Affects Version(s)
master
### Kyuubi Server Log Output
```logtalk
```
### Kyuubi Engine Log Output
```logtalk
```
### Kyuubi Server Configurations
```yaml
```
### Kyuubi Engine Configurations
```yaml
```
### Additional context
_No response_
### Are you willing to submit PR?
- [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
- [x] No. I cannot submit a PR at this time.
Contributor guide
Research direction
Start with SparkSQLLineageParseHelper.scala and trace how RuleApplyPermanentViewMarker marks persistent-view rules before the shown View case is matched. Verify the lineage path handles PermanentViewMarker and that persistent-view lineage is parsed correctly, using the repository's relevant lineage tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala, spark
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100