Skip to content

Commit 0a64c30

Browse files
doc: add comments to RelationType that had been left as TODOs
1 parent a19f4e0 commit 0a64c30

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/substrait-mlir/Dialect/Substrait/IR/SubstraitTypes.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ def Substrait_Relation : Substrait_Type<"Relation", "relation"> {
207207
let summary = "Substrait relation, i.e., result of `RelOpInterface` ops";
208208
let description = [{
209209
}];
210-
// XXX: decide if we want to restrict the types that can be used for fields
211210
let parameters = (ins AnyTuple:$structType);
212211
let builders = [
213212
TypeBuilder<(ins "TypeRange":$fieldTypes), [{
@@ -220,17 +219,18 @@ def Substrait_Relation : Substrait_Type<"Relation", "relation"> {
220219
let skipDefaultBuilders = 1;
221220
let hasCustomAssemblyFormat = 1;
222221
let extraClassDeclaration = [{
223-
// XXX: document
222+
/// Get the field types of the relation.
224223
ArrayRef<Type> getFieldTypes() const {
225224
return getStructType().getTypes();
226225
}
227226

227+
/// Get the field types of the relation (for symmetry with `TupleType`).
228228
ArrayRef<Type> getTypes() const { return getFieldTypes(); }
229229

230-
/// Return the number of held types.
230+
/// Return the number of fields.
231231
size_t size() const { return getFieldTypes().size(); }
232232

233-
/// Iterate over the held elements.
233+
/// Iterate over the field types.
234234
using iterator = ArrayRef<Type>::iterator;
235235
iterator begin() const { return getFieldTypes().begin(); }
236236
iterator end() const { return getFieldTypes().end(); }

0 commit comments

Comments
 (0)