==== VARIATION: basic $unwind ====
-- INPUTS:
pipeline: [{$unwind: {path: '$a.b.c'}}]
metadata: 
	number of partitions: 1
	scan definitions: 
		collection: 
			options: 
			distribution and paths: 
				distribution type: Centralized
				distribution paths: 
			indexes: 
			collection exists: 1
			CE type: (empty)

-- OUTPUT:
Root [{embedProj_0}]
Evaluation [{embedProj_0}]
|   EvalPath []
|   |   Variable [scan_0]
|   PathField [a]
|   PathTraverse [inf]
|   PathField [b]
|   PathTraverse [inf]
|   PathField [c]
|   PathConstant []
|   Variable [unwoundProj_0]
Unwind [{unwoundProj_0, unwoundPid_0}]
Evaluation [{unwoundProj_0}]
|   EvalPath []
|   |   Variable [scan_0]
|   PathGet [a]
|   PathGet [b]
|   PathGet [c]
|   PathIdentity []
Scan [collection, {scan_0}]


==== VARIATION: complex $unwind ====
-- INPUTS:
pipeline: [{$unwind: {path: '$a.b.c', includeArrayIndex: 'p1.pid', preserveNullAndEmptyArrays: true}}]
metadata: 
	number of partitions: 1
	scan definitions: 
		collection: 
			options: 
			distribution and paths: 
				distribution type: Centralized
				distribution paths: 
			indexes: 
			collection exists: 1
			CE type: (empty)

-- OUTPUT:
Root [{embedPidProj_0}]
Evaluation [{embedPidProj_0}]
|   EvalPath []
|   |   Variable [embedProj_0]
|   PathField [p1]
|   PathField [pid]
|   PathConstant []
|   If []
|   |   |   Const [null]
|   |   Variable [unwoundPid_0]
|   BinaryOp [Gte]
|   |   Const [0]
|   Variable [unwoundPid_0]
Evaluation [{embedProj_0}]
|   EvalPath []
|   |   Variable [scan_0]
|   PathField [a]
|   PathTraverse [inf]
|   PathField [b]
|   PathTraverse [inf]
|   PathField [c]
|   PathLambda []
|   LambdaAbstraction [unwoundLambdaVarName_0]
|   If []
|   |   |   Variable [unwoundLambdaVarName_0]
|   |   Variable [unwoundProj_0]
|   BinaryOp [Gte]
|   |   Const [0]
|   Variable [unwoundPid_0]
Unwind [{unwoundProj_0, unwoundPid_0}, retainNonArrays]
Evaluation [{unwoundProj_0}]
|   EvalPath []
|   |   Variable [scan_0]
|   PathGet [a]
|   PathGet [b]
|   PathGet [c]
|   PathIdentity []
Scan [collection, {scan_0}]


==== VARIATION: $unwind with $group ====
-- INPUTS:
pipeline: [{$unwind:{path: '$a.b', preserveNullAndEmptyArrays: true}}, {$group:{_id: '$a.b'}}]
metadata: 
	number of partitions: 1
	scan definitions: 
		collection: 
			options: 
			distribution and paths: 
				distribution type: Centralized
				distribution paths: 
			indexes: 
			collection exists: 1
			CE type: (empty)

-- OUTPUT:
Root [{agg_project_0}]
Evaluation [{agg_project_0}]
|   EvalPath []
|   |   Const [{}]
|   PathField [_id]
|   PathConstant []
|   Variable [groupByProj_0]
GroupBy [{groupByProj_0}]
|   aggregations: 
Evaluation [{groupByProj_0}]
|   EvalPath []
|   |   Variable [embedProj_0]
|   PathGet [a]
|   PathTraverse [inf]
|   PathGet [b]
|   PathIdentity []
Evaluation [{embedProj_0}]
|   EvalPath []
|   |   Variable [scan_0]
|   PathField [a]
|   PathTraverse [inf]
|   PathField [b]
|   PathLambda []
|   LambdaAbstraction [unwoundLambdaVarName_0]
|   If []
|   |   |   Variable [unwoundLambdaVarName_0]
|   |   Variable [unwoundProj_0]
|   BinaryOp [Gte]
|   |   Const [0]
|   Variable [unwoundPid_0]
Unwind [{unwoundProj_0, unwoundPid_0}, retainNonArrays]
Evaluation [{unwoundProj_0}]
|   EvalPath []
|   |   Variable [scan_0]
|   PathGet [a]
|   PathGet [b]
|   PathIdentity []
Scan [collection, {scan_0}]


