You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that using a repeated field with subFields also enables us to get rid of the cumbersome "parentField" property in the previous syntax. Instead, the join with the underlying ratings table is specified on the "movie_id" property.
The text was updated successfully, but these errors were encountered:
This is a common representation for trees generally. Instead of actually nesting the data structure, maintain a flat data structure of all nodes, and have each node point to its immediate children. e.g.
This mechanism is used by, for example, the GraphQL schema. GraphQL uses this mechanism because it actually empowers defining possibly infinite trees, where a subType for a type can be the type itself. IMHO, the GraphQL type system is pretty intelligent, and we could learn a lot from the setup there.
To this end, what might make sense is the ability to define a compound type, right in the .json file. For example, perhaps a movie can have a "sequel" field, which in turn is a movie itself, and which might have sequels, and so on.
The Croissant Spec allows nesting RecordSets inside RecordSets, by using a field with dataType="cr:RecordSet"
https://docs.mlcommons.org/croissant/docs/croissant-spec.html#nested-records
This mechanism has not been used much, is not supported in the mlcroissant library, and adds unneeded complexity.
Instead, we propose using the existing subField mechanism, and specifying repeated=true to represent multiple records.
Here is an example based on the one in the above documentation:
Note that using a repeated field with subFields also enables us to get rid of the cumbersome "parentField" property in the previous syntax. Instead, the join with the underlying ratings table is specified on the "movie_id" property.
The text was updated successfully, but these errors were encountered: