Skip to content

Commit

Permalink
[CALCITE-4217] Unlock RelCrossType#getFieldCount()
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed Sep 5, 2020
1 parent eaf0edf commit 86b42f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ public RelCrossType(
return false;
}

@Override public List<RelDataTypeField> getFieldList() {
return fieldList;
}

protected void generateTypeString(StringBuilder sb, boolean withDetail) {
sb.append("CrossType(");
for (Ord<RelDataType> type : Ord.zip(types)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,17 @@ private static void getFieldRecurse(List<Slot> slots, RelDataType type,
}

public List<RelDataTypeField> getFieldList() {
assert isStruct();
assert fieldList != null : "fieldList must not be null, type = " + this;
return fieldList;
}

public List<String> getFieldNames() {
assert fieldList != null : "fieldList must not be null, type = " + this;
return Pair.left(fieldList);
}

public int getFieldCount() {
assert isStruct() : this;
assert fieldList != null : "fieldList must not be null, type = " + this;
return fieldList.size();
}

Expand Down

0 comments on commit 86b42f3

Please sign in to comment.