defineTable installs a table in the catalog, retrying with generic column types if the real types fail to parse so that column names still surface.
(cat *catalog.Catalog, name string, columns []*storepb.ColumnMetadata)
| 254 | // defineTable installs a table in the catalog, retrying with generic column |
| 255 | // types if the real types fail to parse so that column names still surface. |
| 256 | func defineTable(cat *catalog.Catalog, name string, columns []*storepb.ColumnMetadata) { |
| 257 | if len(columns) == 0 { |
| 258 | return |
| 259 | } |
| 260 | if execTableDDL(cat, name, columns, false) { |
| 261 | return |
| 262 | } |
| 263 | execTableDDL(cat, name, columns, true) |
| 264 | } |
| 265 | |
| 266 | func execTableDDL(cat *catalog.Catalog, name string, columns []*storepb.ColumnMetadata, generic bool) bool { |
| 267 | defs := make([]string, 0, len(columns)) |
no test coverage detected