Skip to content

Commit

Permalink
[CALCITE-4214] Make org.apache.calcite.rel.type.RelDataType#getSqlTyp…
Browse files Browse the repository at this point in the history
…eName non-nullable
  • Loading branch information
vlsi committed Oct 1, 2020
1 parent c79f356 commit 663bbad
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
import java.util.ArrayList;
import java.util.List;

import static org.apache.calcite.linq4j.Nullness.castNonNull;

/**
* RelDataTypeImpl is an abstract base for implementations of
* {@link RelDataType}.
Expand Down Expand Up @@ -227,7 +229,8 @@ private static void getFieldRecurse(List<Slot> slots, RelDataType type,
* @return SqlTypeName, never null
*/
@Override public SqlTypeName getSqlTypeName() {
return null;
// The implementations must provide non-null value, however, we keep this for compatibility
return castNonNull(null);
}

@Override public SqlIdentifier getSqlIdentifier() {
Expand Down

0 comments on commit 663bbad

Please sign in to comment.