diff --git a/docs/stats.md b/docs/stats.md new file mode 100644 index 00000000..11095301 --- /dev/null +++ b/docs/stats.md @@ -0,0 +1,761 @@ +| file | covered (number) | total | covered (fraction) | +|-----------------------------------|--------------------|---------|----------------------| +| proto/extensions/extensions.proto | 14 | 16 | 87 % | +| proto/plan.proto | 10 | 14 | 71 % | +| proto/type.proto | 19 | 92 | 20 % | +| proto/algebra.proto | 56 | 379 | 14 % | +| proto/capabilities.proto | 0 | 7 | 0 % | +| proto/extended_expression.proto | 0 | 10 | 0 % | +| proto/function.proto | 0 | 50 | 0 % | +| proto/parameterized_types.proto | 0 | 62 | 0 % | +| proto/type_expressions.proto | 0 | 72 | 0 % | + +| file | msg_lvl0 | covered (number) | total | covered (fraction) | +|-----------------------------------|------------------------------|--------------------|---------|----------------------| +| proto/algebra.proto | RelRoot | 2 | 2 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | 12 | 12 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionURI | 2 | 2 | 100 % | +| proto/plan.proto | PlanRel | 2 | 2 | 100 % | +| proto/type.proto | NamedStruct | 2 | 2 | 100 % | +| proto/algebra.proto | FetchRel | 4 | 5 | 80 % | +| proto/plan.proto | Version | 4 | 5 | 80 % | +| proto/algebra.proto | CrossRel | 3 | 4 | 75 % | +| proto/algebra.proto | FilterRel | 3 | 4 | 75 % | +| proto/algebra.proto | ProjectRel | 3 | 4 | 75 % | +| proto/algebra.proto | SetRel | 3 | 4 | 75 % | +| proto/plan.proto | Plan | 4 | 6 | 66 % | +| proto/algebra.proto | JoinRel | 4 | 7 | 57 % | +| proto/algebra.proto | FunctionArgument | 1 | 3 | 33 % | +| proto/algebra.proto | Rel | 7 | 21 | 33 % | +| proto/algebra.proto | RelCommon | 3 | 12 | 25 % | +| proto/type.proto | Type | 17 | 90 | 18 % | +| proto/algebra.proto | ReadRel | 4 | 28 | 14 % | +| proto/algebra.proto | Expression | 19 | 167 | 11 % | +| proto/algebra.proto | AggregateFunction | 0 | 8 | 0 % | +| proto/algebra.proto | AggregateRel | 0 | 8 | 0 % | +| proto/algebra.proto | ComparisonJoinKey | 0 | 5 | 0 % | +| proto/algebra.proto | ConsistentPartitionWindowRel | 0 | 15 | 0 % | +| proto/algebra.proto | DdlRel | 0 | 7 | 0 % | +| proto/algebra.proto | ExchangeRel | 0 | 18 | 0 % | +| proto/algebra.proto | ExpandRel | 0 | 6 | 0 % | +| proto/algebra.proto | ExtensionLeafRel | 0 | 2 | 0 % | +| proto/algebra.proto | ExtensionMultiRel | 0 | 3 | 0 % | +| proto/algebra.proto | ExtensionObject | 0 | 1 | 0 % | +| proto/algebra.proto | ExtensionSingleRel | 0 | 3 | 0 % | +| proto/algebra.proto | FunctionOption | 0 | 2 | 0 % | +| proto/algebra.proto | HashJoinRel | 0 | 9 | 0 % | +| proto/algebra.proto | MergeJoinRel | 0 | 9 | 0 % | +| proto/algebra.proto | NamedObjectWrite | 0 | 2 | 0 % | +| proto/algebra.proto | NestedLoopJoinRel | 0 | 6 | 0 % | +| proto/algebra.proto | ReferenceRel | 0 | 1 | 0 % | +| proto/algebra.proto | SortField | 0 | 3 | 0 % | +| proto/algebra.proto | SortRel | 0 | 4 | 0 % | +| proto/algebra.proto | WriteRel | 0 | 6 | 0 % | +| proto/capabilities.proto | Capabilities | 0 | 7 | 0 % | +| proto/extended_expression.proto | ExpressionReference | 0 | 3 | 0 % | +| proto/extended_expression.proto | ExtendedExpression | 0 | 7 | 0 % | +| proto/extensions/extensions.proto | AdvancedExtension | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | 0 | 50 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | 0 | 62 | 0 % | +| proto/plan.proto | PlanVersion | 0 | 1 | 0 % | +| proto/type_expressions.proto | DerivationExpression | 0 | 72 | 0 % | + +| file | msg_lvl0 | msg_lvl1 | covered (number) | total | covered (fraction) | +|-----------------------------------|------------------------------|--------------------------|--------------------|---------|----------------------| +| proto/algebra.proto | RelCommon | Emit | 1 | 1 | 100 % | +| proto/algebra.proto | RelRoot | | 2 | 2 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | ExtensionFunction | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | ExtensionType | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | ExtensionTypeVariation | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionURI | | 2 | 2 | 100 % | +| proto/plan.proto | PlanRel | | 2 | 2 | 100 % | +| proto/type.proto | NamedStruct | | 2 | 2 | 100 % | +| proto/algebra.proto | FetchRel | | 4 | 5 | 80 % | +| proto/plan.proto | Version | | 4 | 5 | 80 % | +| proto/algebra.proto | CrossRel | | 3 | 4 | 75 % | +| proto/algebra.proto | FilterRel | | 3 | 4 | 75 % | +| proto/algebra.proto | ProjectRel | | 3 | 4 | 75 % | +| proto/algebra.proto | SetRel | | 3 | 4 | 75 % | +| proto/plan.proto | Plan | | 4 | 6 | 66 % | +| proto/type.proto | Type | Struct | 2 | 3 | 66 % | +| proto/algebra.proto | Expression | ScalarFunction | 3 | 5 | 60 % | +| proto/algebra.proto | JoinRel | | 4 | 7 | 57 % | +| proto/algebra.proto | Expression | FieldReference | 3 | 6 | 50 % | +| proto/algebra.proto | ReadRel | NamedTable | 1 | 2 | 50 % | +| proto/algebra.proto | RelCommon | | 2 | 4 | 50 % | +| proto/type.proto | Type | Boolean | 1 | 2 | 50 % | +| proto/type.proto | Type | FP32 | 1 | 2 | 50 % | +| proto/type.proto | Type | FP64 | 1 | 2 | 50 % | +| proto/type.proto | Type | I16 | 1 | 2 | 50 % | +| proto/type.proto | Type | I32 | 1 | 2 | 50 % | +| proto/type.proto | Type | I64 | 1 | 2 | 50 % | +| proto/type.proto | Type | I8 | 1 | 2 | 50 % | +| proto/algebra.proto | Expression | ReferenceSegment | 3 | 9 | 33 % | +| proto/algebra.proto | FunctionArgument | | 1 | 3 | 33 % | +| proto/algebra.proto | Rel | | 7 | 21 | 33 % | +| proto/type.proto | Type | | 8 | 25 | 32 % | +| proto/algebra.proto | ReadRel | | 3 | 10 | 30 % | +| proto/algebra.proto | Expression | | 3 | 12 | 25 % | +| proto/algebra.proto | Expression | Literal | 7 | 47 | 14 % | +| proto/algebra.proto | AggregateFunction | | 0 | 8 | 0 % | +| proto/algebra.proto | AggregateRel | | 0 | 5 | 0 % | +| proto/algebra.proto | AggregateRel | Grouping | 0 | 1 | 0 % | +| proto/algebra.proto | AggregateRel | Measure | 0 | 2 | 0 % | +| proto/algebra.proto | ComparisonJoinKey | | 0 | 3 | 0 % | +| proto/algebra.proto | ComparisonJoinKey | ComparisonType | 0 | 2 | 0 % | +| proto/algebra.proto | ConsistentPartitionWindowRel | | 0 | 6 | 0 % | +| proto/algebra.proto | ConsistentPartitionWindowRel | WindowRelFunction | 0 | 9 | 0 % | +| proto/algebra.proto | DdlRel | | 0 | 7 | 0 % | +| proto/algebra.proto | ExchangeRel | | 0 | 10 | 0 % | +| proto/algebra.proto | ExchangeRel | ExchangeTarget | 0 | 3 | 0 % | +| proto/algebra.proto | ExchangeRel | MultiBucketExpression | 0 | 2 | 0 % | +| proto/algebra.proto | ExchangeRel | RoundRobin | 0 | 1 | 0 % | +| proto/algebra.proto | ExchangeRel | ScatterFields | 0 | 1 | 0 % | +| proto/algebra.proto | ExchangeRel | SingleBucketExpression | 0 | 1 | 0 % | +| proto/algebra.proto | ExpandRel | | 0 | 3 | 0 % | +| proto/algebra.proto | ExpandRel | ExpandField | 0 | 2 | 0 % | +| proto/algebra.proto | ExpandRel | SwitchingField | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Cast | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | EmbeddedFunction | 0 | 8 | 0 % | +| proto/algebra.proto | Expression | Enum | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | IfThen | 0 | 4 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | 0 | 20 | 0 % | +| proto/algebra.proto | Expression | MultiOrList | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | Nested | 0 | 10 | 0 % | +| proto/algebra.proto | Expression | SingularOrList | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Subquery | 0 | 13 | 0 % | +| proto/algebra.proto | Expression | SwitchExpression | 0 | 5 | 0 % | +| proto/algebra.proto | Expression | WindowFunction | 0 | 18 | 0 % | +| proto/algebra.proto | ExtensionLeafRel | | 0 | 2 | 0 % | +| proto/algebra.proto | ExtensionMultiRel | | 0 | 3 | 0 % | +| proto/algebra.proto | ExtensionObject | | 0 | 1 | 0 % | +| proto/algebra.proto | ExtensionSingleRel | | 0 | 3 | 0 % | +| proto/algebra.proto | FunctionOption | | 0 | 2 | 0 % | +| proto/algebra.proto | HashJoinRel | | 0 | 9 | 0 % | +| proto/algebra.proto | MergeJoinRel | | 0 | 9 | 0 % | +| proto/algebra.proto | NamedObjectWrite | | 0 | 2 | 0 % | +| proto/algebra.proto | NestedLoopJoinRel | | 0 | 6 | 0 % | +| proto/algebra.proto | ReadRel | ExtensionTable | 0 | 1 | 0 % | +| proto/algebra.proto | ReadRel | LocalFiles | 0 | 14 | 0 % | +| proto/algebra.proto | ReadRel | VirtualTable | 0 | 1 | 0 % | +| proto/algebra.proto | ReferenceRel | | 0 | 1 | 0 % | +| proto/algebra.proto | RelCommon | Hint | 0 | 7 | 0 % | +| proto/algebra.proto | SortField | | 0 | 3 | 0 % | +| proto/algebra.proto | SortRel | | 0 | 4 | 0 % | +| proto/algebra.proto | WriteRel | | 0 | 6 | 0 % | +| proto/capabilities.proto | Capabilities | | 0 | 3 | 0 % | +| proto/capabilities.proto | Capabilities | SimpleExtension | 0 | 4 | 0 % | +| proto/extended_expression.proto | ExpressionReference | | 0 | 3 | 0 % | +| proto/extended_expression.proto | ExtendedExpression | | 0 | 7 | 0 % | +| proto/extensions/extensions.proto | AdvancedExtension | | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | Aggregate | 0 | 12 | 0 % | +| proto/function.proto | FunctionSignature | Argument | 0 | 9 | 0 % | +| proto/function.proto | FunctionSignature | Description | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | FinalArgVariadic | 0 | 3 | 0 % | +| proto/function.proto | FunctionSignature | Implementation | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | Scalar | 0 | 9 | 0 % | +| proto/function.proto | FunctionSignature | Window | 0 | 13 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | | 0 | 26 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | IntegerOption | 0 | 2 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | IntegerParameter | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | NullableInteger | 0 | 1 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedDecimal | 0 | 4 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedFixedBinary | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedFixedChar | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedList | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedMap | 0 | 4 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedNamedStruct | 0 | 2 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedStruct | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedUserDefined | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedVarChar | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | TypeParameter | 0 | 2 | 0 % | +| proto/plan.proto | PlanVersion | | 0 | 1 | 0 % | +| proto/type.proto | Type | Binary | 0 | 2 | 0 % | +| proto/type.proto | Type | Date | 0 | 2 | 0 % | +| proto/type.proto | Type | Decimal | 0 | 4 | 0 % | +| proto/type.proto | Type | FixedBinary | 0 | 3 | 0 % | +| proto/type.proto | Type | FixedChar | 0 | 3 | 0 % | +| proto/type.proto | Type | IntervalDay | 0 | 2 | 0 % | +| proto/type.proto | Type | IntervalYear | 0 | 2 | 0 % | +| proto/type.proto | Type | List | 0 | 3 | 0 % | +| proto/type.proto | Type | Map | 0 | 4 | 0 % | +| proto/type.proto | Type | Parameter | 0 | 6 | 0 % | +| proto/type.proto | Type | String | 0 | 2 | 0 % | +| proto/type.proto | Type | Time | 0 | 2 | 0 % | +| proto/type.proto | Type | Timestamp | 0 | 2 | 0 % | +| proto/type.proto | Type | TimestampTZ | 0 | 2 | 0 % | +| proto/type.proto | Type | UUID | 0 | 2 | 0 % | +| proto/type.proto | Type | UserDefined | 0 | 4 | 0 % | +| proto/type.proto | Type | VarChar | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | | 0 | 32 | 0 % | +| proto/type_expressions.proto | DerivationExpression | BinaryOp | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionDecimal | 0 | 4 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionFixedBinary | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionFixedChar | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionList | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionMap | 0 | 4 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionNamedStruct | 0 | 2 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionStruct | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionUserDefined | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionVarChar | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | IfElse | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ReturnProgram | 0 | 4 | 0 % | +| proto/type_expressions.proto | DerivationExpression | UnaryOp | 0 | 2 | 0 % | + +| file | msg_lvl0 | msg_lvl1 | msg_lvl2 | covered (number) | total | covered (fraction) | +|-----------------------------------|------------------------------|--------------------------|----------------------|--------------------|---------|----------------------| +| proto/algebra.proto | Expression | ReferenceSegment | StructField | 2 | 2 | 100 % | +| proto/algebra.proto | RelCommon | Emit | | 1 | 1 | 100 % | +| proto/algebra.proto | RelRoot | | | 2 | 2 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | | | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | ExtensionFunction | | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | ExtensionType | | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | ExtensionTypeVariation | | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionURI | | | 2 | 2 | 100 % | +| proto/plan.proto | PlanRel | | | 2 | 2 | 100 % | +| proto/type.proto | NamedStruct | | | 2 | 2 | 100 % | +| proto/algebra.proto | FetchRel | | | 4 | 5 | 80 % | +| proto/plan.proto | Version | | | 4 | 5 | 80 % | +| proto/algebra.proto | CrossRel | | | 3 | 4 | 75 % | +| proto/algebra.proto | FilterRel | | | 3 | 4 | 75 % | +| proto/algebra.proto | ProjectRel | | | 3 | 4 | 75 % | +| proto/algebra.proto | SetRel | | | 3 | 4 | 75 % | +| proto/plan.proto | Plan | | | 4 | 6 | 66 % | +| proto/type.proto | Type | Struct | | 2 | 3 | 66 % | +| proto/algebra.proto | Expression | FieldReference | | 3 | 5 | 60 % | +| proto/algebra.proto | Expression | ScalarFunction | | 3 | 5 | 60 % | +| proto/algebra.proto | JoinRel | | | 4 | 7 | 57 % | +| proto/algebra.proto | ReadRel | NamedTable | | 1 | 2 | 50 % | +| proto/algebra.proto | RelCommon | | | 2 | 4 | 50 % | +| proto/type.proto | Type | Boolean | | 1 | 2 | 50 % | +| proto/type.proto | Type | FP32 | | 1 | 2 | 50 % | +| proto/type.proto | Type | FP64 | | 1 | 2 | 50 % | +| proto/type.proto | Type | I16 | | 1 | 2 | 50 % | +| proto/type.proto | Type | I32 | | 1 | 2 | 50 % | +| proto/type.proto | Type | I64 | | 1 | 2 | 50 % | +| proto/type.proto | Type | I8 | | 1 | 2 | 50 % | +| proto/algebra.proto | Expression | ReferenceSegment | | 1 | 3 | 33 % | +| proto/algebra.proto | FunctionArgument | | | 1 | 3 | 33 % | +| proto/algebra.proto | Rel | | | 7 | 21 | 33 % | +| proto/type.proto | Type | | | 8 | 25 | 32 % | +| proto/algebra.proto | ReadRel | | | 3 | 10 | 30 % | +| proto/algebra.proto | Expression | | | 3 | 12 | 25 % | +| proto/algebra.proto | Expression | Literal | | 7 | 29 | 24 % | +| proto/algebra.proto | AggregateFunction | | | 0 | 8 | 0 % | +| proto/algebra.proto | AggregateRel | | | 0 | 5 | 0 % | +| proto/algebra.proto | AggregateRel | Grouping | | 0 | 1 | 0 % | +| proto/algebra.proto | AggregateRel | Measure | | 0 | 2 | 0 % | +| proto/algebra.proto | ComparisonJoinKey | | | 0 | 3 | 0 % | +| proto/algebra.proto | ComparisonJoinKey | ComparisonType | | 0 | 2 | 0 % | +| proto/algebra.proto | ConsistentPartitionWindowRel | | | 0 | 6 | 0 % | +| proto/algebra.proto | ConsistentPartitionWindowRel | WindowRelFunction | | 0 | 9 | 0 % | +| proto/algebra.proto | DdlRel | | | 0 | 7 | 0 % | +| proto/algebra.proto | ExchangeRel | | | 0 | 10 | 0 % | +| proto/algebra.proto | ExchangeRel | ExchangeTarget | | 0 | 3 | 0 % | +| proto/algebra.proto | ExchangeRel | MultiBucketExpression | | 0 | 2 | 0 % | +| proto/algebra.proto | ExchangeRel | RoundRobin | | 0 | 1 | 0 % | +| proto/algebra.proto | ExchangeRel | ScatterFields | | 0 | 1 | 0 % | +| proto/algebra.proto | ExchangeRel | SingleBucketExpression | | 0 | 1 | 0 % | +| proto/algebra.proto | ExpandRel | | | 0 | 3 | 0 % | +| proto/algebra.proto | ExpandRel | ExpandField | | 0 | 2 | 0 % | +| proto/algebra.proto | ExpandRel | SwitchingField | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Cast | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | EmbeddedFunction | | 0 | 4 | 0 % | +| proto/algebra.proto | Expression | EmbeddedFunction | PythonPickleFunction | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | EmbeddedFunction | WebAssemblyFunction | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Enum | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | FieldReference | OuterReference | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | IfThen | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | IfThen | IfClause | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Literal | Decimal | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | Literal | IntervalDayToSecond | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | Literal | IntervalYearToMonth | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Literal | List | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Literal | Map | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | Literal | Struct | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Literal | UserDefined | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | Literal | VarChar | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | ListSelect | 0 | 7 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | MapSelect | 0 | 5 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | Select | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | StructItem | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | StructSelect | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | MultiOrList | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MultiOrList | Record | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Nested | | 0 | 5 | 0 % | +| proto/algebra.proto | Expression | Nested | List | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Nested | Map | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | Nested | Struct | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | ReferenceSegment | ListElement | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | ReferenceSegment | MapKey | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | SingularOrList | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Subquery | | 0 | 4 | 0 % | +| proto/algebra.proto | Expression | Subquery | InPredicate | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Subquery | Scalar | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Subquery | SetComparison | 0 | 4 | 0 % | +| proto/algebra.proto | Expression | Subquery | SetPredicate | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | SwitchExpression | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | SwitchExpression | IfValue | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | WindowFunction | | 0 | 12 | 0 % | +| proto/algebra.proto | Expression | WindowFunction | Bound | 0 | 6 | 0 % | +| proto/algebra.proto | ExtensionLeafRel | | | 0 | 2 | 0 % | +| proto/algebra.proto | ExtensionMultiRel | | | 0 | 3 | 0 % | +| proto/algebra.proto | ExtensionObject | | | 0 | 1 | 0 % | +| proto/algebra.proto | ExtensionSingleRel | | | 0 | 3 | 0 % | +| proto/algebra.proto | FunctionOption | | | 0 | 2 | 0 % | +| proto/algebra.proto | HashJoinRel | | | 0 | 9 | 0 % | +| proto/algebra.proto | MergeJoinRel | | | 0 | 9 | 0 % | +| proto/algebra.proto | NamedObjectWrite | | | 0 | 2 | 0 % | +| proto/algebra.proto | NestedLoopJoinRel | | | 0 | 6 | 0 % | +| proto/algebra.proto | ReadRel | ExtensionTable | | 0 | 1 | 0 % | +| proto/algebra.proto | ReadRel | LocalFiles | | 0 | 2 | 0 % | +| proto/algebra.proto | ReadRel | LocalFiles | FileOrFiles | 0 | 12 | 0 % | +| proto/algebra.proto | ReadRel | VirtualTable | | 0 | 1 | 0 % | +| proto/algebra.proto | ReferenceRel | | | 0 | 1 | 0 % | +| proto/algebra.proto | RelCommon | Hint | | 0 | 3 | 0 % | +| proto/algebra.proto | RelCommon | Hint | RuntimeConstraint | 0 | 1 | 0 % | +| proto/algebra.proto | RelCommon | Hint | Stats | 0 | 3 | 0 % | +| proto/algebra.proto | SortField | | | 0 | 3 | 0 % | +| proto/algebra.proto | SortRel | | | 0 | 4 | 0 % | +| proto/algebra.proto | WriteRel | | | 0 | 6 | 0 % | +| proto/capabilities.proto | Capabilities | | | 0 | 3 | 0 % | +| proto/capabilities.proto | Capabilities | SimpleExtension | | 0 | 4 | 0 % | +| proto/extended_expression.proto | ExpressionReference | | | 0 | 3 | 0 % | +| proto/extended_expression.proto | ExtendedExpression | | | 0 | 7 | 0 % | +| proto/extensions/extensions.proto | AdvancedExtension | | | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | Aggregate | | 0 | 12 | 0 % | +| proto/function.proto | FunctionSignature | Argument | | 0 | 4 | 0 % | +| proto/function.proto | FunctionSignature | Argument | EnumArgument | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | Argument | TypeArgument | 0 | 1 | 0 % | +| proto/function.proto | FunctionSignature | Argument | ValueArgument | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | Description | | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | FinalArgVariadic | | 0 | 3 | 0 % | +| proto/function.proto | FunctionSignature | Implementation | | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | Scalar | | 0 | 9 | 0 % | +| proto/function.proto | FunctionSignature | Window | | 0 | 13 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | | | 0 | 26 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | IntegerOption | | 0 | 2 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | IntegerParameter | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | NullableInteger | | 0 | 1 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedDecimal | | 0 | 4 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedFixedBinary | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedFixedChar | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedList | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedMap | | 0 | 4 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedNamedStruct | | 0 | 2 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedStruct | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedUserDefined | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedVarChar | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | TypeParameter | | 0 | 2 | 0 % | +| proto/plan.proto | PlanVersion | | | 0 | 1 | 0 % | +| proto/type.proto | Type | Binary | | 0 | 2 | 0 % | +| proto/type.proto | Type | Date | | 0 | 2 | 0 % | +| proto/type.proto | Type | Decimal | | 0 | 4 | 0 % | +| proto/type.proto | Type | FixedBinary | | 0 | 3 | 0 % | +| proto/type.proto | Type | FixedChar | | 0 | 3 | 0 % | +| proto/type.proto | Type | IntervalDay | | 0 | 2 | 0 % | +| proto/type.proto | Type | IntervalYear | | 0 | 2 | 0 % | +| proto/type.proto | Type | List | | 0 | 3 | 0 % | +| proto/type.proto | Type | Map | | 0 | 4 | 0 % | +| proto/type.proto | Type | Parameter | | 0 | 6 | 0 % | +| proto/type.proto | Type | String | | 0 | 2 | 0 % | +| proto/type.proto | Type | Time | | 0 | 2 | 0 % | +| proto/type.proto | Type | Timestamp | | 0 | 2 | 0 % | +| proto/type.proto | Type | TimestampTZ | | 0 | 2 | 0 % | +| proto/type.proto | Type | UUID | | 0 | 2 | 0 % | +| proto/type.proto | Type | UserDefined | | 0 | 4 | 0 % | +| proto/type.proto | Type | VarChar | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | | | 0 | 32 | 0 % | +| proto/type_expressions.proto | DerivationExpression | BinaryOp | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionDecimal | | 0 | 4 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionFixedBinary | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionFixedChar | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionList | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionMap | | 0 | 4 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionNamedStruct | | 0 | 2 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionStruct | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionUserDefined | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionVarChar | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | IfElse | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ReturnProgram | | 0 | 2 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ReturnProgram | Assignment | 0 | 2 | 0 % | +| proto/type_expressions.proto | DerivationExpression | UnaryOp | | 0 | 2 | 0 % | + +| file | msg_lvl0 | msg_lvl1 | msg_lvl2 | msg_lvl3 | covered (number) | total | covered (fraction) | +|-----------------------------------|------------------------------|--------------------------|----------------------|------------------|--------------------|---------|----------------------| +| proto/algebra.proto | Expression | ReferenceSegment | StructField | | 2 | 2 | 100 % | +| proto/algebra.proto | RelCommon | Emit | | | 1 | 1 | 100 % | +| proto/algebra.proto | RelRoot | | | | 2 | 2 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | | | | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | ExtensionFunction | | | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | ExtensionType | | | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | ExtensionTypeVariation | | | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionURI | | | | 2 | 2 | 100 % | +| proto/plan.proto | PlanRel | | | | 2 | 2 | 100 % | +| proto/type.proto | NamedStruct | | | | 2 | 2 | 100 % | +| proto/algebra.proto | FetchRel | | | | 4 | 5 | 80 % | +| proto/plan.proto | Version | | | | 4 | 5 | 80 % | +| proto/algebra.proto | CrossRel | | | | 3 | 4 | 75 % | +| proto/algebra.proto | FilterRel | | | | 3 | 4 | 75 % | +| proto/algebra.proto | ProjectRel | | | | 3 | 4 | 75 % | +| proto/algebra.proto | SetRel | | | | 3 | 4 | 75 % | +| proto/plan.proto | Plan | | | | 4 | 6 | 66 % | +| proto/type.proto | Type | Struct | | | 2 | 3 | 66 % | +| proto/algebra.proto | Expression | FieldReference | | | 3 | 5 | 60 % | +| proto/algebra.proto | Expression | ScalarFunction | | | 3 | 5 | 60 % | +| proto/algebra.proto | JoinRel | | | | 4 | 7 | 57 % | +| proto/algebra.proto | ReadRel | NamedTable | | | 1 | 2 | 50 % | +| proto/algebra.proto | RelCommon | | | | 2 | 4 | 50 % | +| proto/type.proto | Type | Boolean | | | 1 | 2 | 50 % | +| proto/type.proto | Type | FP32 | | | 1 | 2 | 50 % | +| proto/type.proto | Type | FP64 | | | 1 | 2 | 50 % | +| proto/type.proto | Type | I16 | | | 1 | 2 | 50 % | +| proto/type.proto | Type | I32 | | | 1 | 2 | 50 % | +| proto/type.proto | Type | I64 | | | 1 | 2 | 50 % | +| proto/type.proto | Type | I8 | | | 1 | 2 | 50 % | +| proto/algebra.proto | Expression | ReferenceSegment | | | 1 | 3 | 33 % | +| proto/algebra.proto | FunctionArgument | | | | 1 | 3 | 33 % | +| proto/algebra.proto | Rel | | | | 7 | 21 | 33 % | +| proto/type.proto | Type | | | | 8 | 25 | 32 % | +| proto/algebra.proto | ReadRel | | | | 3 | 10 | 30 % | +| proto/algebra.proto | Expression | | | | 3 | 12 | 25 % | +| proto/algebra.proto | Expression | Literal | | | 7 | 29 | 24 % | +| proto/algebra.proto | AggregateFunction | | | | 0 | 8 | 0 % | +| proto/algebra.proto | AggregateRel | | | | 0 | 5 | 0 % | +| proto/algebra.proto | AggregateRel | Grouping | | | 0 | 1 | 0 % | +| proto/algebra.proto | AggregateRel | Measure | | | 0 | 2 | 0 % | +| proto/algebra.proto | ComparisonJoinKey | | | | 0 | 3 | 0 % | +| proto/algebra.proto | ComparisonJoinKey | ComparisonType | | | 0 | 2 | 0 % | +| proto/algebra.proto | ConsistentPartitionWindowRel | | | | 0 | 6 | 0 % | +| proto/algebra.proto | ConsistentPartitionWindowRel | WindowRelFunction | | | 0 | 9 | 0 % | +| proto/algebra.proto | DdlRel | | | | 0 | 7 | 0 % | +| proto/algebra.proto | ExchangeRel | | | | 0 | 10 | 0 % | +| proto/algebra.proto | ExchangeRel | ExchangeTarget | | | 0 | 3 | 0 % | +| proto/algebra.proto | ExchangeRel | MultiBucketExpression | | | 0 | 2 | 0 % | +| proto/algebra.proto | ExchangeRel | RoundRobin | | | 0 | 1 | 0 % | +| proto/algebra.proto | ExchangeRel | ScatterFields | | | 0 | 1 | 0 % | +| proto/algebra.proto | ExchangeRel | SingleBucketExpression | | | 0 | 1 | 0 % | +| proto/algebra.proto | ExpandRel | | | | 0 | 3 | 0 % | +| proto/algebra.proto | ExpandRel | ExpandField | | | 0 | 2 | 0 % | +| proto/algebra.proto | ExpandRel | SwitchingField | | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Cast | | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | EmbeddedFunction | | | 0 | 4 | 0 % | +| proto/algebra.proto | Expression | EmbeddedFunction | PythonPickleFunction | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | EmbeddedFunction | WebAssemblyFunction | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Enum | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | FieldReference | OuterReference | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | IfThen | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | IfThen | IfClause | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Literal | Decimal | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | Literal | IntervalDayToSecond | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | Literal | IntervalYearToMonth | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Literal | List | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Literal | Map | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Literal | Map | KeyValue | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Literal | Struct | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Literal | UserDefined | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | Literal | VarChar | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | ListSelect | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | ListSelect | ListSelectItem | 0 | 5 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | MapSelect | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | MapSelect | MapKey | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | MapSelect | MapKeyExpression | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | Select | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | StructItem | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | StructSelect | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | MultiOrList | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MultiOrList | Record | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Nested | | | 0 | 5 | 0 % | +| proto/algebra.proto | Expression | Nested | List | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Nested | Map | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Nested | Map | KeyValue | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Nested | Struct | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | ReferenceSegment | ListElement | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | ReferenceSegment | MapKey | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | SingularOrList | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Subquery | | | 0 | 4 | 0 % | +| proto/algebra.proto | Expression | Subquery | InPredicate | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Subquery | Scalar | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Subquery | SetComparison | | 0 | 4 | 0 % | +| proto/algebra.proto | Expression | Subquery | SetPredicate | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | SwitchExpression | | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | SwitchExpression | IfValue | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | WindowFunction | | | 0 | 12 | 0 % | +| proto/algebra.proto | Expression | WindowFunction | Bound | | 0 | 4 | 0 % | +| proto/algebra.proto | Expression | WindowFunction | Bound | Following | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | WindowFunction | Bound | Preceding | 0 | 1 | 0 % | +| proto/algebra.proto | ExtensionLeafRel | | | | 0 | 2 | 0 % | +| proto/algebra.proto | ExtensionMultiRel | | | | 0 | 3 | 0 % | +| proto/algebra.proto | ExtensionObject | | | | 0 | 1 | 0 % | +| proto/algebra.proto | ExtensionSingleRel | | | | 0 | 3 | 0 % | +| proto/algebra.proto | FunctionOption | | | | 0 | 2 | 0 % | +| proto/algebra.proto | HashJoinRel | | | | 0 | 9 | 0 % | +| proto/algebra.proto | MergeJoinRel | | | | 0 | 9 | 0 % | +| proto/algebra.proto | NamedObjectWrite | | | | 0 | 2 | 0 % | +| proto/algebra.proto | NestedLoopJoinRel | | | | 0 | 6 | 0 % | +| proto/algebra.proto | ReadRel | ExtensionTable | | | 0 | 1 | 0 % | +| proto/algebra.proto | ReadRel | LocalFiles | | | 0 | 2 | 0 % | +| proto/algebra.proto | ReadRel | LocalFiles | FileOrFiles | | 0 | 12 | 0 % | +| proto/algebra.proto | ReadRel | VirtualTable | | | 0 | 1 | 0 % | +| proto/algebra.proto | ReferenceRel | | | | 0 | 1 | 0 % | +| proto/algebra.proto | RelCommon | Hint | | | 0 | 3 | 0 % | +| proto/algebra.proto | RelCommon | Hint | RuntimeConstraint | | 0 | 1 | 0 % | +| proto/algebra.proto | RelCommon | Hint | Stats | | 0 | 3 | 0 % | +| proto/algebra.proto | SortField | | | | 0 | 3 | 0 % | +| proto/algebra.proto | SortRel | | | | 0 | 4 | 0 % | +| proto/algebra.proto | WriteRel | | | | 0 | 6 | 0 % | +| proto/capabilities.proto | Capabilities | | | | 0 | 3 | 0 % | +| proto/capabilities.proto | Capabilities | SimpleExtension | | | 0 | 4 | 0 % | +| proto/extended_expression.proto | ExpressionReference | | | | 0 | 3 | 0 % | +| proto/extended_expression.proto | ExtendedExpression | | | | 0 | 7 | 0 % | +| proto/extensions/extensions.proto | AdvancedExtension | | | | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | Aggregate | | | 0 | 12 | 0 % | +| proto/function.proto | FunctionSignature | Argument | | | 0 | 4 | 0 % | +| proto/function.proto | FunctionSignature | Argument | EnumArgument | | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | Argument | TypeArgument | | 0 | 1 | 0 % | +| proto/function.proto | FunctionSignature | Argument | ValueArgument | | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | Description | | | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | FinalArgVariadic | | | 0 | 3 | 0 % | +| proto/function.proto | FunctionSignature | Implementation | | | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | Scalar | | | 0 | 9 | 0 % | +| proto/function.proto | FunctionSignature | Window | | | 0 | 13 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | | | | 0 | 26 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | IntegerOption | | | 0 | 2 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | IntegerParameter | | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | NullableInteger | | | 0 | 1 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedDecimal | | | 0 | 4 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedFixedBinary | | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedFixedChar | | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedList | | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedMap | | | 0 | 4 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedNamedStruct | | | 0 | 2 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedStruct | | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedUserDefined | | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedVarChar | | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | TypeParameter | | | 0 | 2 | 0 % | +| proto/plan.proto | PlanVersion | | | | 0 | 1 | 0 % | +| proto/type.proto | Type | Binary | | | 0 | 2 | 0 % | +| proto/type.proto | Type | Date | | | 0 | 2 | 0 % | +| proto/type.proto | Type | Decimal | | | 0 | 4 | 0 % | +| proto/type.proto | Type | FixedBinary | | | 0 | 3 | 0 % | +| proto/type.proto | Type | FixedChar | | | 0 | 3 | 0 % | +| proto/type.proto | Type | IntervalDay | | | 0 | 2 | 0 % | +| proto/type.proto | Type | IntervalYear | | | 0 | 2 | 0 % | +| proto/type.proto | Type | List | | | 0 | 3 | 0 % | +| proto/type.proto | Type | Map | | | 0 | 4 | 0 % | +| proto/type.proto | Type | Parameter | | | 0 | 6 | 0 % | +| proto/type.proto | Type | String | | | 0 | 2 | 0 % | +| proto/type.proto | Type | Time | | | 0 | 2 | 0 % | +| proto/type.proto | Type | Timestamp | | | 0 | 2 | 0 % | +| proto/type.proto | Type | TimestampTZ | | | 0 | 2 | 0 % | +| proto/type.proto | Type | UUID | | | 0 | 2 | 0 % | +| proto/type.proto | Type | UserDefined | | | 0 | 4 | 0 % | +| proto/type.proto | Type | VarChar | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | | | | 0 | 32 | 0 % | +| proto/type_expressions.proto | DerivationExpression | BinaryOp | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionDecimal | | | 0 | 4 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionFixedBinary | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionFixedChar | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionList | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionMap | | | 0 | 4 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionNamedStruct | | | 0 | 2 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionStruct | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionUserDefined | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionVarChar | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | IfElse | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ReturnProgram | | | 0 | 2 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ReturnProgram | Assignment | | 0 | 2 | 0 % | +| proto/type_expressions.proto | DerivationExpression | UnaryOp | | | 0 | 2 | 0 % | + +| file | msg_lvl0 | msg_lvl1 | msg_lvl2 | msg_lvl3 | msg_lvl4 | covered (number) | total | covered (fraction) | +|-----------------------------------|------------------------------|--------------------------|----------------------|------------------|-------------|--------------------|---------|----------------------| +| proto/algebra.proto | Expression | ReferenceSegment | StructField | | | 2 | 2 | 100 % | +| proto/algebra.proto | RelCommon | Emit | | | | 1 | 1 | 100 % | +| proto/algebra.proto | RelRoot | | | | | 2 | 2 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | | | | | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | ExtensionFunction | | | | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | ExtensionType | | | | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionDeclaration | ExtensionTypeVariation | | | | 3 | 3 | 100 % | +| proto/extensions/extensions.proto | SimpleExtensionURI | | | | | 2 | 2 | 100 % | +| proto/plan.proto | PlanRel | | | | | 2 | 2 | 100 % | +| proto/type.proto | NamedStruct | | | | | 2 | 2 | 100 % | +| proto/algebra.proto | FetchRel | | | | | 4 | 5 | 80 % | +| proto/plan.proto | Version | | | | | 4 | 5 | 80 % | +| proto/algebra.proto | CrossRel | | | | | 3 | 4 | 75 % | +| proto/algebra.proto | FilterRel | | | | | 3 | 4 | 75 % | +| proto/algebra.proto | ProjectRel | | | | | 3 | 4 | 75 % | +| proto/algebra.proto | SetRel | | | | | 3 | 4 | 75 % | +| proto/plan.proto | Plan | | | | | 4 | 6 | 66 % | +| proto/type.proto | Type | Struct | | | | 2 | 3 | 66 % | +| proto/algebra.proto | Expression | FieldReference | | | | 3 | 5 | 60 % | +| proto/algebra.proto | Expression | ScalarFunction | | | | 3 | 5 | 60 % | +| proto/algebra.proto | JoinRel | | | | | 4 | 7 | 57 % | +| proto/algebra.proto | ReadRel | NamedTable | | | | 1 | 2 | 50 % | +| proto/algebra.proto | RelCommon | | | | | 2 | 4 | 50 % | +| proto/type.proto | Type | Boolean | | | | 1 | 2 | 50 % | +| proto/type.proto | Type | FP32 | | | | 1 | 2 | 50 % | +| proto/type.proto | Type | FP64 | | | | 1 | 2 | 50 % | +| proto/type.proto | Type | I16 | | | | 1 | 2 | 50 % | +| proto/type.proto | Type | I32 | | | | 1 | 2 | 50 % | +| proto/type.proto | Type | I64 | | | | 1 | 2 | 50 % | +| proto/type.proto | Type | I8 | | | | 1 | 2 | 50 % | +| proto/algebra.proto | Expression | ReferenceSegment | | | | 1 | 3 | 33 % | +| proto/algebra.proto | FunctionArgument | | | | | 1 | 3 | 33 % | +| proto/algebra.proto | Rel | | | | | 7 | 21 | 33 % | +| proto/type.proto | Type | | | | | 8 | 25 | 32 % | +| proto/algebra.proto | ReadRel | | | | | 3 | 10 | 30 % | +| proto/algebra.proto | Expression | | | | | 3 | 12 | 25 % | +| proto/algebra.proto | Expression | Literal | | | | 7 | 29 | 24 % | +| proto/algebra.proto | AggregateFunction | | | | | 0 | 8 | 0 % | +| proto/algebra.proto | AggregateRel | | | | | 0 | 5 | 0 % | +| proto/algebra.proto | AggregateRel | Grouping | | | | 0 | 1 | 0 % | +| proto/algebra.proto | AggregateRel | Measure | | | | 0 | 2 | 0 % | +| proto/algebra.proto | ComparisonJoinKey | | | | | 0 | 3 | 0 % | +| proto/algebra.proto | ComparisonJoinKey | ComparisonType | | | | 0 | 2 | 0 % | +| proto/algebra.proto | ConsistentPartitionWindowRel | | | | | 0 | 6 | 0 % | +| proto/algebra.proto | ConsistentPartitionWindowRel | WindowRelFunction | | | | 0 | 9 | 0 % | +| proto/algebra.proto | DdlRel | | | | | 0 | 7 | 0 % | +| proto/algebra.proto | ExchangeRel | | | | | 0 | 10 | 0 % | +| proto/algebra.proto | ExchangeRel | ExchangeTarget | | | | 0 | 3 | 0 % | +| proto/algebra.proto | ExchangeRel | MultiBucketExpression | | | | 0 | 2 | 0 % | +| proto/algebra.proto | ExchangeRel | RoundRobin | | | | 0 | 1 | 0 % | +| proto/algebra.proto | ExchangeRel | ScatterFields | | | | 0 | 1 | 0 % | +| proto/algebra.proto | ExchangeRel | SingleBucketExpression | | | | 0 | 1 | 0 % | +| proto/algebra.proto | ExpandRel | | | | | 0 | 3 | 0 % | +| proto/algebra.proto | ExpandRel | ExpandField | | | | 0 | 2 | 0 % | +| proto/algebra.proto | ExpandRel | SwitchingField | | | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Cast | | | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | EmbeddedFunction | | | | 0 | 4 | 0 % | +| proto/algebra.proto | Expression | EmbeddedFunction | PythonPickleFunction | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | EmbeddedFunction | WebAssemblyFunction | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Enum | | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | FieldReference | OuterReference | | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | IfThen | | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | IfThen | IfClause | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Literal | Decimal | | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | Literal | IntervalDayToSecond | | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | Literal | IntervalYearToMonth | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Literal | List | | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Literal | Map | | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Literal | Map | KeyValue | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Literal | Struct | | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Literal | UserDefined | | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | Literal | VarChar | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | ListSelect | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | ListSelect | ListSelectItem | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | ListSelect | ListSelectItem | ListElement | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | ListSelect | ListSelectItem | ListSlice | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | MapSelect | | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | MapSelect | MapKey | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | MapSelect | MapKeyExpression | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | Select | | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | StructItem | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MaskExpression | StructSelect | | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | MultiOrList | | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | MultiOrList | Record | | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Nested | | | | 0 | 5 | 0 % | +| proto/algebra.proto | Expression | Nested | List | | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Nested | Map | | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Nested | Map | KeyValue | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Nested | Struct | | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | ReferenceSegment | ListElement | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | ReferenceSegment | MapKey | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | SingularOrList | | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Subquery | | | | 0 | 4 | 0 % | +| proto/algebra.proto | Expression | Subquery | InPredicate | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | Subquery | Scalar | | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | Subquery | SetComparison | | | 0 | 4 | 0 % | +| proto/algebra.proto | Expression | Subquery | SetPredicate | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | SwitchExpression | | | | 0 | 3 | 0 % | +| proto/algebra.proto | Expression | SwitchExpression | IfValue | | | 0 | 2 | 0 % | +| proto/algebra.proto | Expression | WindowFunction | | | | 0 | 12 | 0 % | +| proto/algebra.proto | Expression | WindowFunction | Bound | | | 0 | 4 | 0 % | +| proto/algebra.proto | Expression | WindowFunction | Bound | Following | | 0 | 1 | 0 % | +| proto/algebra.proto | Expression | WindowFunction | Bound | Preceding | | 0 | 1 | 0 % | +| proto/algebra.proto | ExtensionLeafRel | | | | | 0 | 2 | 0 % | +| proto/algebra.proto | ExtensionMultiRel | | | | | 0 | 3 | 0 % | +| proto/algebra.proto | ExtensionObject | | | | | 0 | 1 | 0 % | +| proto/algebra.proto | ExtensionSingleRel | | | | | 0 | 3 | 0 % | +| proto/algebra.proto | FunctionOption | | | | | 0 | 2 | 0 % | +| proto/algebra.proto | HashJoinRel | | | | | 0 | 9 | 0 % | +| proto/algebra.proto | MergeJoinRel | | | | | 0 | 9 | 0 % | +| proto/algebra.proto | NamedObjectWrite | | | | | 0 | 2 | 0 % | +| proto/algebra.proto | NestedLoopJoinRel | | | | | 0 | 6 | 0 % | +| proto/algebra.proto | ReadRel | ExtensionTable | | | | 0 | 1 | 0 % | +| proto/algebra.proto | ReadRel | LocalFiles | | | | 0 | 2 | 0 % | +| proto/algebra.proto | ReadRel | LocalFiles | FileOrFiles | | | 0 | 12 | 0 % | +| proto/algebra.proto | ReadRel | VirtualTable | | | | 0 | 1 | 0 % | +| proto/algebra.proto | ReferenceRel | | | | | 0 | 1 | 0 % | +| proto/algebra.proto | RelCommon | Hint | | | | 0 | 3 | 0 % | +| proto/algebra.proto | RelCommon | Hint | RuntimeConstraint | | | 0 | 1 | 0 % | +| proto/algebra.proto | RelCommon | Hint | Stats | | | 0 | 3 | 0 % | +| proto/algebra.proto | SortField | | | | | 0 | 3 | 0 % | +| proto/algebra.proto | SortRel | | | | | 0 | 4 | 0 % | +| proto/algebra.proto | WriteRel | | | | | 0 | 6 | 0 % | +| proto/capabilities.proto | Capabilities | | | | | 0 | 3 | 0 % | +| proto/capabilities.proto | Capabilities | SimpleExtension | | | | 0 | 4 | 0 % | +| proto/extended_expression.proto | ExpressionReference | | | | | 0 | 3 | 0 % | +| proto/extended_expression.proto | ExtendedExpression | | | | | 0 | 7 | 0 % | +| proto/extensions/extensions.proto | AdvancedExtension | | | | | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | Aggregate | | | | 0 | 12 | 0 % | +| proto/function.proto | FunctionSignature | Argument | | | | 0 | 4 | 0 % | +| proto/function.proto | FunctionSignature | Argument | EnumArgument | | | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | Argument | TypeArgument | | | 0 | 1 | 0 % | +| proto/function.proto | FunctionSignature | Argument | ValueArgument | | | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | Description | | | | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | FinalArgVariadic | | | | 0 | 3 | 0 % | +| proto/function.proto | FunctionSignature | Implementation | | | | 0 | 2 | 0 % | +| proto/function.proto | FunctionSignature | Scalar | | | | 0 | 9 | 0 % | +| proto/function.proto | FunctionSignature | Window | | | | 0 | 13 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | | | | | 0 | 26 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | IntegerOption | | | | 0 | 2 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | IntegerParameter | | | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | NullableInteger | | | | 0 | 1 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedDecimal | | | | 0 | 4 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedFixedBinary | | | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedFixedChar | | | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedList | | | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedMap | | | | 0 | 4 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedNamedStruct | | | | 0 | 2 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedStruct | | | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedUserDefined | | | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | ParameterizedVarChar | | | | 0 | 3 | 0 % | +| proto/parameterized_types.proto | ParameterizedType | TypeParameter | | | | 0 | 2 | 0 % | +| proto/plan.proto | PlanVersion | | | | | 0 | 1 | 0 % | +| proto/type.proto | Type | Binary | | | | 0 | 2 | 0 % | +| proto/type.proto | Type | Date | | | | 0 | 2 | 0 % | +| proto/type.proto | Type | Decimal | | | | 0 | 4 | 0 % | +| proto/type.proto | Type | FixedBinary | | | | 0 | 3 | 0 % | +| proto/type.proto | Type | FixedChar | | | | 0 | 3 | 0 % | +| proto/type.proto | Type | IntervalDay | | | | 0 | 2 | 0 % | +| proto/type.proto | Type | IntervalYear | | | | 0 | 2 | 0 % | +| proto/type.proto | Type | List | | | | 0 | 3 | 0 % | +| proto/type.proto | Type | Map | | | | 0 | 4 | 0 % | +| proto/type.proto | Type | Parameter | | | | 0 | 6 | 0 % | +| proto/type.proto | Type | String | | | | 0 | 2 | 0 % | +| proto/type.proto | Type | Time | | | | 0 | 2 | 0 % | +| proto/type.proto | Type | Timestamp | | | | 0 | 2 | 0 % | +| proto/type.proto | Type | TimestampTZ | | | | 0 | 2 | 0 % | +| proto/type.proto | Type | UUID | | | | 0 | 2 | 0 % | +| proto/type.proto | Type | UserDefined | | | | 0 | 4 | 0 % | +| proto/type.proto | Type | VarChar | | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | | | | | 0 | 32 | 0 % | +| proto/type_expressions.proto | DerivationExpression | BinaryOp | | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionDecimal | | | | 0 | 4 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionFixedBinary | | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionFixedChar | | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionList | | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionMap | | | | 0 | 4 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionNamedStruct | | | | 0 | 2 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionStruct | | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionUserDefined | | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ExpressionVarChar | | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | IfElse | | | | 0 | 3 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ReturnProgram | | | | 0 | 2 | 0 % | +| proto/type_expressions.proto | DerivationExpression | ReturnProgram | Assignment | | | 0 | 2 | 0 % | +| proto/type_expressions.proto | DerivationExpression | UnaryOp | | | | 0 | 2 | 0 % | + diff --git a/docs/stats/stats.py b/docs/stats/stats.py new file mode 100644 index 00000000..436013c3 --- /dev/null +++ b/docs/stats/stats.py @@ -0,0 +1,216 @@ +import argparse +import glob +import itertools + +import google.protobuf as pb +import google.protobuf.descriptor +import google.protobuf.message +import google.protobuf.text_format +import pandas as pd +import substrait.gen.proto as sp +import substrait.gen.proto.capabilities_pb2 +import substrait.gen.proto.extended_expression_pb2 +import substrait.gen.proto.function_pb2 +import substrait.gen.proto.plan_pb2 + +parser = argparse.ArgumentParser(prog='ProgramName', + description='What the program does') +parser.add_argument('-m', + '--messages', + required=True, + help='Path or GLOB to message files') + +args = parser.parse_args() + + +def read_messages_from_file(file_path, message_type): + with open(file_path, "r") as f: + for split in f.read().split("# -----"): + message = message_type() + yield pb.text_format.Parse(split, message) + + +def get_used_fields(message): + if not isinstance(message, pb.message.Message): + return + + for field_descriptor in message.DESCRIPTOR.fields: + if field_descriptor.label == pb.descriptor.FieldDescriptor.LABEL_REPEATED: + # Handle repeated fields + nested_msgs = getattr(message, field_descriptor.name) + if len(nested_msgs): + yield field_descriptor + for nested_msg in nested_msgs: + yield from get_used_fields(nested_msg) + elif field_descriptor.type == pb.descriptor.FieldDescriptor.TYPE_MESSAGE: + # Handle message fields + if message.HasField(field_descriptor.name): + yield field_descriptor + nested_msg = getattr(message, field_descriptor.name) + yield from get_used_fields(nested_msg) + else: + # Handle scalar fields + value = getattr(message, field_descriptor.name) + if value != field_descriptor.default_value: + yield field_descriptor + + +def full_message_type_name(descriptor): + container = descriptor.containing_type + if container is None: + return descriptor.name + return full_message_type_name(container) + "." + descriptor.name + + +def get_field_container(descriptor): + return descriptor.containing_type or descriptor.containing_oneof + + +def full_field_name(descriptor): + container = get_field_container(descriptor) + return descriptor.file.name + ":" + full_message_type_name( + container) + "." + descriptor.name + + +paths = glob.glob(args.messages) +messages = (m for path in paths + for m in read_messages_from_file(path, sp.plan_pb2.Plan)) +used_fields = set( + itertools.chain.from_iterable( + get_used_fields(message) for message in messages)) +used_filed_names = (full_field_name(field) for field in used_fields) + +# print('-' * 80) +# print('Used fields:') +# print('-' * 80) +# for field in sorted(used_filed_names): +# print('-', field) + + +def collect_all_message_types(message_descriptor, result=None): + """ + Collects all unique message types within a protobuf message and its nested types. + + Args: + message_descriptor: The descriptor of the protobuf message type. + visited: A set to keep track of visited message types. + + Returns: + A set of message descriptors for all unique message types. + """ + if result is None: + result = set() + if message_descriptor not in result: + result.add(message_descriptor) + for field in message_descriptor.fields: + if field.type == pb.descriptor.FieldDescriptor.TYPE_MESSAGE: + collect_all_message_types(field.message_type, result) + for cls in message_descriptor.nested_types: + collect_all_message_types(cls, result) + for other_message in message_descriptor.file.message_types_by_name.values(): + collect_all_message_types(other_message, result) + return result + + +def get_field_type(field): + if field.type == pb.descriptor.FieldDescriptor.TYPE_ENUM: + return field.enum_type.full_name + + if field.type == pb.descriptor.FieldDescriptor.TYPE_MESSAGE: + return field.message_type.full_name + + # Map cpp_type to type name + cpp_type_name_map = { + 1: "double", + 2: "float", + 3: "int64", + 4: "uint64", + 5: "int32", + 6: "uint64", + 7: "int32", + 8: "bool", + 9: "string", + 10: "message", + 11: "bytes", + 12: "uint32", + 13: "enum", + 14: "sfixed32", + 15: "sfixed64", + 16: "sint32", + 17: "sint64", + } + return cpp_type_name_map.get(field.cpp_type, str(field.cpp_type)) + + +# First, collect all unique message types +all_message_types = set() +for msg_type in [ + sp.capabilities_pb2.Capabilities, + sp.extended_expression_pb2.ExtendedExpression, sp.plan_pb2.Plan, + sp.function_pb2.FunctionSignature +]: + collect_all_message_types(msg_type.DESCRIPTOR, all_message_types) + +# # Then, list the fields for each message type +# print('-' * 80) +# print('All fields:') +# print('-' * 80) +# for msg_type in all_message_types: +# for field in msg_type.fields: +# print(f"- {full_field_name(field)} ({get_field_type(field)})") + +all_fields = ( + field for msg_type in all_message_types for field in msg_type.fields) + +# Load into data frames. +df_all = pd.DataFrame(data=all_fields, columns=["field"]) +df_used = pd.DataFrame(data=used_fields, columns=["field"]) + +# print("Number of all fields:", len(df_all.index)) +# print("Number of used fields:", len(df_used.index)) + +df_all["full_name"] = df_all["field"].apply(full_field_name) +df_used["full_name"] = df_used["field"].apply(full_field_name) + +df_used["covered"] = 1 +df_used = df_used.drop("field", axis="columns") + +df = pd.merge(df_all, df_used, on="full_name", how="left") +df.covered = df.covered.fillna(0).astype(int) + +# Compute useful columns. +df["file"] = df["field"].apply(lambda x: x.file.name) +df["type"] = df["field"].apply(get_field_type) +df["name"] = df["field"].apply(lambda x: x.name) + +df = df[df.file.str.startswith("proto/")] + +df["message"] = df["field"].apply(get_field_container) +df["message_name"] = df["message"].apply(full_message_type_name) +message_names = df["message_name"].apply(lambda x: x.split(".")) +depth = message_names.apply(len).max() +tuples = message_names.apply(lambda x: x + [""] * (depth - len(x))).apply(tuple) +msg_level_names = list(f"msg_lvl{i}" for i in range(depth)) +idx = pd.MultiIndex.from_tuples(tuples, names=msg_level_names) +df = df.set_index(idx) + +df = df.drop(columns=["field", "message", "full_name"], axis="columns") + + +def join_non_empty(l): + return ".".join((x for x in l if x)) + + +for i in range(len(msg_level_names) + 1): + groupby = ["file"] + msg_level_names[0:i] + df_g = df.reset_index().groupby(groupby).aggregate({ + "covered": ["sum", "count"], + }) + df_g = df_g.reset_index() + df_g["fraction"] = df_g["covered"]["sum"] / df_g["covered"]["count"] + df_g = df_g.sort_values(["fraction"] + groupby, + ascending=[False] + ([True] * len(groupby))) + df_g["fraction"] = (df_g["fraction"] * 100).astype(int).astype(str) + " %" + df_g.columns = groupby + ["covered (number)", "total", "covered (fraction)"] + print(df_g.to_markdown(tablefmt="github", index=False)) + print()