Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CREATE EXTERNAL TABLE with LOCATION should load existing configuration #246

Closed
osopardo1 opened this issue Dec 4, 2023 · 0 comments · Fixed by #248
Closed

CREATE EXTERNAL TABLE with LOCATION should load existing configuration #246

osopardo1 opened this issue Dec 4, 2023 · 0 comments · Fixed by #248
Assignees
Labels
type: bug Something isn't working

Comments

@osopardo1
Copy link
Member

What went wrong?

If we have an existing table in a location L, the only way of populating the Table in the Catalog without rewriting the data is to CREATE EXTERNAL TABLE with LOCATION L. The current implementation forces us to add columnsToIndex parameters to the OPTION SQL clause because we use the same interface for creating a new table and linking a Table to an external directory.

How to reproduce?

1. Code that triggered the bug, or steps to reproduce:

      val location = tmpDir + "/external_student/"
      val data = createTestData(spark)
      data.write.format("qbeast").option("columnsToIndex", "id,name").save(location)

      spark.sql(
        s"CREATE EXTERNAL TABLE student (id INT, name STRING, age INT) " +
          s"USING qbeast " +
          s"LOCATION '$location'")

2. Branch and commit id:

main

3. Spark version:

3.4.1

4. Hadoop version:

3.3.1

5. How are you running Spark?

Are you running Spark inside a container? Are you launching the app on a remote K8s cluster? Or are you just running the tests in a local computer?

Local computer

6. Stack trace:

@osopardo1 osopardo1 added the type: bug Something isn't working label Dec 4, 2023
@osopardo1 osopardo1 changed the title CREATE EXTERNAL TABLE should load existing configuration CREATE EXTERNAL TABLE with existing LOCATION should load existing configuration Dec 4, 2023
@osopardo1 osopardo1 changed the title CREATE EXTERNAL TABLE with existing LOCATION should load existing configuration CREATE EXTERNAL TABLE with LOCATION should load existing configuration Dec 4, 2023
@osopardo1 osopardo1 self-assigned this Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant