Commit 2c492b2
[SPARK-51372][SQL] Introduce TableInfo for table creations
### What changes were proposed in this pull request?
Introduces a new `TableInfo` for operations in `TableCatalog`.
A followup PR will be sent for the table replace methods in `StagingTableCatalog`.
### Why are the changes needed?
The current `TableCatalog` interface has overloaded `createTable()` implementations. As we are adding new parameters, we have to deprecate the old ones. This PR introduces the `TableInfo` POJO so that the future code changes will be cleaner.
### Does this PR introduce _any_ user-facing change?
Yes. But the PR is backwards compatible by providing a default implementation.
### How was this patch tested?
* New unit tests.
* Existing tests in `DataSourceV2Suite`.
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #50137 from anoopj/anoopj-builder.
Lead-authored-by: Anoop Johnson <[email protected]>
Co-authored-by: Anoop Johnson <[email protected]>
Co-authored-by: Wenchen Fan <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>1 parent ced7f6b commit 2c492b2
File tree
6 files changed
+379
-76
lines changed- sql
- catalyst/src
- main/java/org/apache/spark/sql/connector/catalog
- test/scala/org/apache/spark/sql/connector/catalog
- core/src/main/scala/org/apache/spark/sql/execution/datasources/v2
6 files changed
+379
-76
lines changedLines changed: 23 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
211 | 226 | | |
212 | 227 | | |
213 | 228 | | |
214 | 229 | | |
215 | | - | |
216 | | - | |
217 | | - | |
| 230 | + | |
218 | 231 | | |
219 | 232 | | |
220 | 233 | | |
221 | 234 | | |
222 | 235 | | |
223 | 236 | | |
| 237 | + | |
224 | 238 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
231 | 242 | | |
232 | 243 | | |
233 | 244 | | |
| |||
Lines changed: 85 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
0 commit comments