In BigQuery,
select st_contains(
st_geogfromtext('linestring(0 0, 10 0, 10 10, 0 10, 0 0)'),
st_geogfromtext('multilinestring((0 0, 10 0, 10 5),(0 10, 0 0))')
) as `contains`;
returns true.
As you can see, a multiLinestring can be contained by a linestring as long as all edges of it are covered by the edges of linestring.
And in S2, S2Polyline::contains() and S2BooleanOperation::Contains() on lines always return false regardless of S2BooleanOperation::PolylineModel. So what is the best way to calculate contains like BQ does?