{ "extensionUris": [{ "extensionUriAnchor": 4, "uri": "/functions_aggregate_generic.yaml" }, { "extensionUriAnchor": 1, "uri": "/functions_boolean.yaml" }, { "extensionUriAnchor": 3, "uri": "/functions_string.yaml" }, { "extensionUriAnchor": 2, "uri": "/functions_comparison.yaml" }], "extensions": [{ "extensionFunction": { "extensionUriReference": 1, "name": "and:bool" } }, { "extensionFunction": { "extensionUriReference": 2, "functionAnchor": 1, "name": "equal:any_any" } }, { "extensionFunction": { "extensionUriReference": 2, "functionAnchor": 2, "name": "not_equal:any_any" } }, { "extensionFunction": { "extensionUriReference": 1, "functionAnchor": 3, "name": "not:bool" } }, { "extensionFunction": { "extensionUriReference": 3, "functionAnchor": 4, "name": "like:str_str" } }, { "extensionFunction": { "extensionUriReference": 1, "functionAnchor": 5, "name": "or:bool" } }, { "extensionFunction": { "extensionUriReference": 4, "functionAnchor": 6, "name": "count:any" } }], "relations": [{ "root": { "input": { "sort": { "common": { "direct": { } }, "input": { "aggregate": { "common": { "direct": { } }, "input": { "project": { "common": { "emit": { "outputMapping": [14, 15, 16, 17] } }, "input": { "filter": { "common": { "direct": { } }, "input": { "cross": { "common": { "direct": { } }, "left": { "read": { "common": { "direct": { } }, "baseSchema": { "names": ["PS_PARTKEY", "PS_SUPPKEY", "PS_AVAILQTY", "PS_SUPPLYCOST", "PS_COMMENT"], "struct": { "types": [{ "i64": { "nullability": "NULLABILITY_REQUIRED" } }, { "i64": { "nullability": "NULLABILITY_REQUIRED" } }, { "i64": { "nullability": "NULLABILITY_REQUIRED" } }, { "decimal": { "scale": 2, "precision": 15, "nullability": "NULLABILITY_REQUIRED" } }, { "string": { "nullability": "NULLABILITY_REQUIRED" } }], "nullability": "NULLABILITY_REQUIRED" } }, "namedTable": { "names": ["PARTSUPP"] } } }, "right": { "read": { "common": { "direct": { } }, "baseSchema": { "names": ["P_PARTKEY", "P_NAME", "P_MFGR", "P_BRAND", "P_TYPE", "P_SIZE", "P_CONTAINER", "P_RETAILPRICE", "P_COMMENT"], "struct": { "types": [{ "i64": { "nullability": "NULLABILITY_REQUIRED" } }, { "string": { "nullability": "NULLABILITY_REQUIRED" } }, { "string": { "nullability": "NULLABILITY_REQUIRED" } }, { "string": { "nullability": "NULLABILITY_REQUIRED" } }, { "string": { "nullability": "NULLABILITY_REQUIRED" } }, { "i32": { "nullability": "NULLABILITY_REQUIRED" } }, { "string": { "nullability": "NULLABILITY_REQUIRED" } }, { "decimal": { "scale": 2, "precision": 15, "nullability": "NULLABILITY_REQUIRED" } }, { "string": { "nullability": "NULLABILITY_REQUIRED" } }], "nullability": "NULLABILITY_REQUIRED" } }, "namedTable": { "names": ["PART"] } } } } }, "condition": { "scalarFunction": { "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "scalarFunction": { "functionReference": 1, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "selection": { "directReference": { "structField": { "field": 5 } }, "rootReference": { } } } }, { "value": { "selection": { "directReference": { "structField": { } }, "rootReference": { } } } }] } } }, { "value": { "scalarFunction": { "functionReference": 2, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "selection": { "directReference": { "structField": { "field": 8 } }, "rootReference": { } } } }, { "value": { "literal": { "string": "Brand#45" } } }] } } }, { "value": { "scalarFunction": { "functionReference": 3, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "scalarFunction": { "functionReference": 4, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "selection": { "directReference": { "structField": { "field": 9 } }, "rootReference": { } } } }, { "value": { "cast": { "type": { "string": { "nullability": "NULLABILITY_REQUIRED" } }, "input": { "literal": { "fixedChar": "MEDIUM POLISHED%" } }, "failureBehavior": "FAILURE_BEHAVIOR_THROW_EXCEPTION" } } }] } } }] } } }, { "value": { "scalarFunction": { "functionReference": 5, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "scalarFunction": { "functionReference": 1, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "selection": { "directReference": { "structField": { "field": 10 } }, "rootReference": { } } } }, { "value": { "literal": { "i32": 49 } } }] } } }, { "value": { "scalarFunction": { "functionReference": 1, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "selection": { "directReference": { "structField": { "field": 10 } }, "rootReference": { } } } }, { "value": { "literal": { "i32": 14 } } }] } } }, { "value": { "scalarFunction": { "functionReference": 1, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "selection": { "directReference": { "structField": { "field": 10 } }, "rootReference": { } } } }, { "value": { "literal": { "i32": 23 } } }] } } }, { "value": { "scalarFunction": { "functionReference": 1, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "selection": { "directReference": { "structField": { "field": 10 } }, "rootReference": { } } } }, { "value": { "literal": { "i32": 45 } } }] } } }, { "value": { "scalarFunction": { "functionReference": 1, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "selection": { "directReference": { "structField": { "field": 10 } }, "rootReference": { } } } }, { "value": { "literal": { "i32": 19 } } }] } } }, { "value": { "scalarFunction": { "functionReference": 1, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "selection": { "directReference": { "structField": { "field": 10 } }, "rootReference": { } } } }, { "value": { "literal": { "i32": 3 } } }] } } }, { "value": { "scalarFunction": { "functionReference": 1, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "selection": { "directReference": { "structField": { "field": 10 } }, "rootReference": { } } } }, { "value": { "literal": { "i32": 36 } } }] } } }, { "value": { "scalarFunction": { "functionReference": 1, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "selection": { "directReference": { "structField": { "field": 10 } }, "rootReference": { } } } }, { "value": { "literal": { "i32": 9 } } }] } } }] } } }, { "value": { "scalarFunction": { "functionReference": 3, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "subquery": { "inPredicate": { "needles": [{ "selection": { "directReference": { "structField": { "field": 1 } }, "rootReference": { } } }], "haystack": { "project": { "common": { "emit": { "outputMapping": [7] } }, "input": { "filter": { "common": { "direct": { } }, "input": { "read": { "common": { "direct": { } }, "baseSchema": { "names": ["S_SUPPKEY", "S_NAME", "S_ADDRESS", "S_NATIONKEY", "S_PHONE", "S_ACCTBAL", "S_COMMENT"], "struct": { "types": [{ "i64": { "nullability": "NULLABILITY_REQUIRED" } }, { "string": { "nullability": "NULLABILITY_REQUIRED" } }, { "string": { "nullability": "NULLABILITY_REQUIRED" } }, { "i32": { "nullability": "NULLABILITY_REQUIRED" } }, { "string": { "nullability": "NULLABILITY_REQUIRED" } }, { "decimal": { "scale": 2, "precision": 15, "nullability": "NULLABILITY_REQUIRED" } }, { "string": { "nullability": "NULLABILITY_REQUIRED" } }], "nullability": "NULLABILITY_REQUIRED" } }, "namedTable": { "names": ["SUPPLIER"] } } }, "condition": { "scalarFunction": { "functionReference": 4, "outputType": { "bool": { "nullability": "NULLABILITY_REQUIRED" } }, "arguments": [{ "value": { "selection": { "directReference": { "structField": { "field": 6 } }, "rootReference": { } } } }, { "value": { "cast": { "type": { "string": { "nullability": "NULLABILITY_REQUIRED" } }, "input": { "literal": { "fixedChar": "%Customer%Complaints%" } }, "failureBehavior": "FAILURE_BEHAVIOR_THROW_EXCEPTION" } } }] } } } }, "expressions": [{ "selection": { "directReference": { "structField": { } }, "rootReference": { } } }] } } } } } }] } } }] } } } }, "expressions": [{ "selection": { "directReference": { "structField": { "field": 8 } }, "rootReference": { } } }, { "selection": { "directReference": { "structField": { "field": 9 } }, "rootReference": { } } }, { "selection": { "directReference": { "structField": { "field": 10 } }, "rootReference": { } } }, { "selection": { "directReference": { "structField": { "field": 1 } }, "rootReference": { } } }] } }, "groupings": [{ "groupingExpressions": [{ "selection": { "directReference": { "structField": { } }, "rootReference": { } } }, { "selection": { "directReference": { "structField": { "field": 1 } }, "rootReference": { } } }, { "selection": { "directReference": { "structField": { "field": 2 } }, "rootReference": { } } }] }], "measures": [{ "measure": { "functionReference": 6, "phase": "AGGREGATION_PHASE_INITIAL_TO_RESULT", "outputType": { "i64": { "nullability": "NULLABILITY_REQUIRED" } }, "invocation": "AGGREGATION_INVOCATION_DISTINCT", "arguments": [{ "value": { "selection": { "directReference": { "structField": { "field": 3 } }, "rootReference": { } } } }] } }] } }, "sorts": [{ "expr": { "selection": { "directReference": { "structField": { "field": 3 } }, "rootReference": { } } }, "direction": "SORT_DIRECTION_DESC_NULLS_FIRST" }, { "expr": { "selection": { "directReference": { "structField": { } }, "rootReference": { } } }, "direction": "SORT_DIRECTION_ASC_NULLS_LAST" }, { "expr": { "selection": { "directReference": { "structField": { "field": 1 } }, "rootReference": { } } }, "direction": "SORT_DIRECTION_ASC_NULLS_LAST" }, { "expr": { "selection": { "directReference": { "structField": { "field": 2 } }, "rootReference": { } } }, "direction": "SORT_DIRECTION_ASC_NULLS_LAST" }] } }, "names": ["P_BRAND", "P_TYPE", "P_SIZE", "SUPPLIER_CNT"] } }] }