dbt-labs / dbt-labs/dbt-adapters

[Bug] `spark__list_relations_without_caching` expects legacy `schema` field

Open
#480 3 comments 0 reactions 0 assignees View on GitHub
help-wanted pkg:dbt-spark type:bug
Dominant language
Python
Stars
233
Forks
362
Avg merge
3d 22h
Merged PRs (30d)
9

Description

### Is this a new bug in dbt-spark?

- [X] I believe this is a new bug in dbt-spark
- [X] I have searched the existing issues, and I could not find an existing issue for this bug

### Current Behavior

[spark__list_relations_without_caching](https://github.com/dbt-labs/dbt-spark/blob/944dbea08de9a8069a39ad92f4beecb2cbec608c/dbt/include/spark/macros/adapters.sql#L295) expects legacy field`relation.schema`

``` SQL
{% macro spark__list_relations_without_caching(relation) %}
{% call statement('list_relations_without_caching', fetch_result=True) -%}
show table extended in {{ relation.schema }} like '*'
{% endcall %}

{% do return(load_result('list_relations_without_caching').table) %}
{% endmacro %}
```

### Expected Behavior

[spark__list_relations_without_caching](https://github.com/dbt-labs/dbt-spark/blob/944dbea08de9a8069a39ad92f4beecb2cbec608c/dbt/include/spark/macros/adapters.sql#L295) expects `relation`

``` SQL
{% macro spark__list_relations_without_caching(relation) %}
{% call statement('list_relations_without_caching', fetch_result=True) -%}
show table extended in {{ relation }} like '*'
{% endcall %}

{% do return(load_result('list_relations_without_caching').table) %}
{% endmacro %}
```

### Steps To Reproduce

N.A.

### Relevant log output

_No response_

### Environment

```markdown
Irrelevant
```

### Additional Context

See Spark SQL [migration guide](https://spark.apache.org/docs/3.2.0/sql-migration-guide.html#upgrading-from-spark-sql-31-to-32)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.