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

[Subtask] support AddColumn DropColumn for spark connector #2447

Closed
FANNG1 opened this issue Mar 7, 2024 · 1 comment · Fixed by #2458
Closed

[Subtask] support AddColumn DropColumn for spark connector #2447

FANNG1 opened this issue Mar 7, 2024 · 1 comment · Fixed by #2458
Assignees
Labels
good first issue Good for newcomers subtask Subtasks of umbrella issue

Comments

@FANNG1
Copy link
Contributor

FANNG1 commented Mar 7, 2024

Describe the subtask

please add related code to com.datastrato.gravitino.spark.catalogGravitinoCatalog.java, transfrom Spark TableChange to Gravitino TableChange, you could refer to renameTable implement

  public Table alterTable(Identifier ident, TableChange... changes) throws NoSuchTableException {
    throw new NotSupportedException("Doesn't support altering table for now");
  }

Related Spark SQL should add to SparkIT.java, please refer https://spark.apache.org/docs/latest/sql-ref-syntax-ddl-alter-table.html

Parent issue

#1227

@FANNG1 FANNG1 added subtask Subtasks of umbrella issue good first issue Good for newcomers labels Mar 7, 2024
@caican00
Copy link
Collaborator

caican00 commented Mar 7, 2024

i will work on it, thanks.

caican00 added a commit to caican00/gravitino that referenced this issue Mar 7, 2024
caican00 added a commit to caican00/gravitino that referenced this issue Mar 7, 2024
caican00 added a commit to caican00/gravitino that referenced this issue Mar 7, 2024
caican00 added a commit to caican00/gravitino that referenced this issue Mar 7, 2024
FANNG1 pushed a commit that referenced this issue Mar 10, 2024
…Column for spark-connector (#2458)

### What changes were proposed in this pull request?

support alterTable addColumn and dropColumn for spark-connector in
AlterTableCommand.


### Why are the changes needed?

Implement addColumn and dropColumn ops for Spark AlterTableCommand.

Fix: [#2447](#2447)

### Does this PR introduce _any_ user-facing change?

Yes, users can run the following commands to modify the table columns
using spark sql.

```
ALTER TABLE StudentInfo ADD columns (col1 string);

ALTER TABLE StudentInfo DROP columns (col1);
```

### How was this patch tested?

New uts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers subtask Subtasks of umbrella issue
Projects
None yet
2 participants