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 UpdateColumnDefaultValue in AlterTable for spark connector #2650

Closed
FANNG1 opened this issue Mar 22, 2024 · 7 comments · Fixed by #2661
Closed

[Subtask] support UpdateColumnDefaultValue in AlterTable for spark connector #2650

FANNG1 opened this issue Mar 22, 2024 · 7 comments · Fixed by #2661
Assignees
Labels
good first issue Good for newcomers subtask Subtasks of umbrella issue

Comments

@FANNG1
Copy link
Contributor

FANNG1 commented Mar 22, 2024

Describe the subtask

please add related code to com.datastrato.gravitino.spark.catalogGravitinoCatalog.java, transfrom Spark UpdateColumnDefaultValue to Gravitino UpdateColumnDefaultValue, you could refer to #2502 , Hive doesn't support update column default value for now, so no need to add integrate test.

public Table alterTable(Identifier ident, TableChange... changes) throws NoSuchTableException { }

Parent issue

#1227

@FANNG1 FANNG1 added subtask Subtasks of umbrella issue good first issue Good for newcomers labels Mar 22, 2024
@charliecheng630
Copy link
Contributor

I would like to work on this. @FANNG1

@FANNG1
Copy link
Contributor Author

FANNG1 commented Mar 23, 2024

@charliecheng630 thanks for taking this.

@FANNG1
Copy link
Contributor Author

FANNG1 commented Mar 24, 2024

@charliecheng630 , I just noticed that Gravitino doesn't support UpdateColumnDefaultValue for now, we need to support it in a separate issue before adding it to Spark. cc @mchades

@charliecheng630
Copy link
Contributor

@mchades Can I create a separate issue to perform UpdateColumnDefaultValue for Gravitino?

@mchades
Copy link
Contributor

mchades commented Mar 25, 2024

@mchades Can I create a separate issue to perform UpdateColumnDefaultValue for Gravitino?

Yeah, I was also thinking of doing that. Go ahead and do that. 😄

@jerryshao jerryshao added this to the Gravitino 0.5.0 milestone Mar 26, 2024
@charliecheng630
Copy link
Contributor

@FANNG1 @mchades The defautValue of UpdateColumnDefaultValue in spark connector is String, but in Gravitino it should be Expression.
Can the default value of a string be converted into an expression?

@mchades
Copy link
Contributor

mchades commented Apr 6, 2024

Maybe you can try to convert it to StringLiteral, I guess the Spark engine will do the implicit conversion

FANNG1 pushed a commit that referenced this issue Apr 7, 2024
…terTable for spark connector (#2661)

### What changes were proposed in this pull request?
support UpdateColumnDefaultValue in AlterTable for spark connector


### Why are the changes needed?

Fix: #2650 

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

No

### 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
4 participants