[
https://issues.apache.org/jira/browse/SPARK-62370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated SPARK-62370:
-----------------------------------
Labels: pull-request-available (was: )
> Pipeline spec that sets both database and schema silently ignores schema
> ------------------------------------------------------------------------
>
> Key: SPARK-62370
> URL: https://issues.apache.org/jira/browse/SPARK-62370
> Project: Spark
> Issue Type: Bug
> Components: Declarative Pipelines
> Affects Versions: 4.3.0
> Reporter: Sudhanva Huruli
> Priority: Minor
> Labels: pull-request-available
>
> The pipeline spec documents `schema` as an alias for `database`. When a spec
> sets both to different values, `unpack_pipeline_spec` in
> python/pyspark/pipelines/cli.py uses `database` and drops `schema` without
> any message, so the pipeline's tables are created in a schema the user may
> not have meant.
> Steps (with a running Spark Connect server at sc://localhost:15002):
> 1. Create the schemas a_db and b_schema on the server.
> 2. In an empty directory, write `spark-pipeline.yaml` with `name`, `storage`,
> `database: a_db`, `schema: b_schema` and a `libraries` entry whose glob
> includes `numbers.sql`, and next to it `numbers.sql` with: CREATE
> MATERIALIZED VIEW numbers AS SELECT id FROM range(3)
> 3. spark-pipelines run --remote sc://localhost:15002
> Actual: the run completes, numbers is created in a_db, b_schema stays empty,
> and no message mentions the ignored `schema` value.
> Expected: a spec whose database and schema values differ is rejected with an
> error that names both fields, so the user keeps one of them.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]