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 UpdateColumnType in AlterTable for spark connector #2495

Closed
caican00 opened this issue Mar 11, 2024 · 2 comments · Fixed by #2502
Closed

[Subtask] support UpdateColumnType in AlterTable for spark connector #2495

caican00 opened this issue Mar 11, 2024 · 2 comments · Fixed by #2502
Labels
subtask Subtasks of umbrella issue

Comments

@caican00
Copy link
Collaborator

Describe the subtask

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

  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

@caican00 caican00 added the subtask Subtasks of umbrella issue label Mar 11, 2024
@caican00
Copy link
Collaborator Author

caican00 commented Mar 11, 2024

Hi @hiirrxnn i would like to confirm again that whether you are still working on the UpdateColumnPosition and UpdateColumnType mentioned in #1565 or not, and looking forward to your reply. Thank you

@caican00 caican00 changed the title [Subtask] support UpdateColumnType for spark connector [Subtask] support UpdateColumnType in AlterTable for spark connector Mar 11, 2024
@caican00
Copy link
Collaborator Author

i will work on this.

caican00 added a commit to caican00/gravitino that referenced this issue Mar 11, 2024
caican00 added a commit to caican00/gravitino that referenced this issue Mar 11, 2024
FANNG1 pushed a commit that referenced this issue Mar 12, 2024
… for spark connector (#2502)

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

support UpdateColumnType in AltertableCommand.

### Why are the changes needed?

Implement UpdateColumnType ops for Spark AlterTableCommand.

Fix: [#2495](#2495)

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

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

`ALTER TABLE StudentInfo CHANGE COLUMN col1 col1 bigint`

### 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
subtask Subtasks of umbrella issue
Projects
None yet
1 participant