Type implements sql.Expression.
(ctx *sql.Context)
| 47 | |
| 48 | // Type implements sql.Expression. |
| 49 | func (a ArrayFlatten) Type(ctx *sql.Context) sql.Type { |
| 50 | sqType := a.Subquery.Type(ctx) |
| 51 | dt, ok := sqType.(*types.DoltgresType) |
| 52 | if !ok { |
| 53 | // If we don't have a doltgres type, we'll error out at execution time. A special case is the tuple type, |
| 54 | // where we need to choose a single one to avoid erroring out too early. |
| 55 | if tt, ok := sqType.(gmstypes.TupleType); ok { |
| 56 | return tt[0] |
| 57 | } |
| 58 | return sqType |
| 59 | } |
| 60 | return dt.ToArrayType() |
| 61 | } |
| 62 | |
| 63 | // IsNullable implements sql.Expression. |
| 64 | func (a ArrayFlatten) IsNullable(ctx *sql.Context) bool { |
nothing calls this directly
no test coverage detected