{
  "extensionUris": [{
    "extensionUriAnchor": 5,
    "uri": "/functions_aggregate_generic.yaml"
  }, {
    "extensionUriAnchor": 1,
    "uri": "/functions_boolean.yaml"
  }, {
    "extensionUriAnchor": 3,
    "uri": "/functions_string.yaml"
  }, {
    "extensionUriAnchor": 4,
    "uri": "/functions_arithmetic_decimal.yaml"
  }, {
    "extensionUriAnchor": 2,
    "uri": "/functions_comparison.yaml"
  }],
  "extensions": [{
    "extensionFunction": {
      "extensionUriReference": 1,
      "functionAnchor": 0,
      "name": "and:bool"
    }
  }, {
    "extensionFunction": {
      "extensionUriReference": 1,
      "functionAnchor": 1,
      "name": "or:bool"
    }
  }, {
    "extensionFunction": {
      "extensionUriReference": 2,
      "functionAnchor": 2,
      "name": "equal:any_any"
    }
  }, {
    "extensionFunction": {
      "extensionUriReference": 3,
      "functionAnchor": 3,
      "name": "substring:fchar_i32_i32"
    }
  }, {
    "extensionFunction": {
      "extensionUriReference": 2,
      "functionAnchor": 4,
      "name": "gt:any_any"
    }
  }, {
    "extensionFunction": {
      "extensionUriReference": 4,
      "functionAnchor": 5,
      "name": "avg:dec"
    }
  }, {
    "extensionFunction": {
      "extensionUriReference": 1,
      "functionAnchor": 6,
      "name": "not:bool"
    }
  }, {
    "extensionFunction": {
      "extensionUriReference": 5,
      "functionAnchor": 7,
      "name": "count:any"
    }
  }, {
    "extensionFunction": {
      "extensionUriReference": 4,
      "functionAnchor": 8,
      "name": "sum:dec"
    }
  }],
  "relations": [{
    "root": {
      "input": {
        "sort": {
          "common": {
            "direct": {
            }
          },
          "input": {
            "aggregate": {
              "common": {
                "direct": {
                }
              },
              "input": {
                "project": {
                  "common": {
                    "emit": {
                      "outputMapping": [8, 9]
                    }
                  },
                  "input": {
                    "filter": {
                      "common": {
                        "direct": {
                        }
                      },
                      "input": {
                        "read": {
                          "common": {
                            "direct": {
                            }
                          },
                          "baseSchema": {
                            "names": ["C_CUSTKEY", "C_NAME", "C_ADDRESS", "C_NATIONKEY", "C_PHONE", "C_ACCTBAL", "C_MKTSEGMENT", "C_COMMENT"],
                            "struct": {
                              "types": [{
                                "i64": {
                                  "typeVariationReference": 0,
                                  "nullability": "NULLABILITY_REQUIRED"
                                }
                              }, {
                                "varchar": {
                                  "length": 25,
                                  "typeVariationReference": 0,
                                  "nullability": "NULLABILITY_NULLABLE"
                                }
                              }, {
                                "varchar": {
                                  "length": 40,
                                  "typeVariationReference": 0,
                                  "nullability": "NULLABILITY_NULLABLE"
                                }
                              }, {
                                "i64": {
                                  "typeVariationReference": 0,
                                  "nullability": "NULLABILITY_REQUIRED"
                                }
                              }, {
                                "fixedChar": {
                                  "length": 15,
                                  "typeVariationReference": 0,
                                  "nullability": "NULLABILITY_NULLABLE"
                                }
                              }, {
                                "decimal": {
                                  "scale": 0,
                                  "precision": 19,
                                  "typeVariationReference": 0,
                                  "nullability": "NULLABILITY_NULLABLE"
                                }
                              }, {
                                "fixedChar": {
                                  "length": 10,
                                  "typeVariationReference": 0,
                                  "nullability": "NULLABILITY_NULLABLE"
                                }
                              }, {
                                "varchar": {
                                  "length": 117,
                                  "typeVariationReference": 0,
                                  "nullability": "NULLABILITY_NULLABLE"
                                }
                              }],
                              "typeVariationReference": 0,
                              "nullability": "NULLABILITY_REQUIRED"
                            }
                          },
                          "namedTable": {
                            "names": ["CUSTOMER"]
                          }
                        }
                      },
                      "condition": {
                        "scalarFunction": {
                          "functionReference": 0,
                          "args": [],
                          "outputType": {
                            "bool": {
                              "typeVariationReference": 0,
                              "nullability": "NULLABILITY_NULLABLE"
                            }
                          },
                          "arguments": [{
                            "value": {
                              "scalarFunction": {
                                "functionReference": 1,
                                "args": [],
                                "outputType": {
                                  "bool": {
                                    "typeVariationReference": 0,
                                    "nullability": "NULLABILITY_NULLABLE"
                                  }
                                },
                                "arguments": [{
                                  "value": {
                                    "scalarFunction": {
                                      "functionReference": 2,
                                      "args": [],
                                      "outputType": {
                                        "bool": {
                                          "typeVariationReference": 0,
                                          "nullability": "NULLABILITY_NULLABLE"
                                        }
                                      },
                                      "arguments": [{
                                        "value": {
                                          "scalarFunction": {
                                            "functionReference": 3,
                                            "args": [],
                                            "outputType": {
                                              "varchar": {
                                                "length": 15,
                                                "typeVariationReference": 0,
                                                "nullability": "NULLABILITY_NULLABLE"
                                              }
                                            },
                                            "arguments": [{
                                              "value": {
                                                "selection": {
                                                  "directReference": {
                                                    "structField": {
                                                      "field": 4
                                                    }
                                                  },
                                                  "rootReference": {
                                                  }
                                                }
                                              }
                                            }, {
                                              "value": {
                                                "literal": {
                                                  "i32": 1,
                                                  "nullable": false,
                                                  "typeVariationReference": 0
                                                }
                                              }
                                            }, {
                                              "value": {
                                                "literal": {
                                                  "i32": 2,
                                                  "nullable": false,
                                                  "typeVariationReference": 0
                                                }
                                              }
                                            }],
                                            "options": []
                                          }
                                        }
                                      }, {
                                        "value": {
                                          "cast": {
                                            "type": {
                                              "varchar": {
                                                "length": 15,
                                                "typeVariationReference": 0,
                                                "nullability": "NULLABILITY_NULLABLE"
                                              }
                                            },
                                            "input": {
                                              "literal": {
                                                "fixedChar": "24",
                                                "nullable": false,
                                                "typeVariationReference": 0
                                              }
                                            },
                                            "failureBehavior": "FAILURE_BEHAVIOR_UNSPECIFIED"
                                          }
                                        }
                                      }],
                                      "options": []
                                    }
                                  }
                                }, {
                                  "value": {
                                    "scalarFunction": {
                                      "functionReference": 2,
                                      "args": [],
                                      "outputType": {
                                        "bool": {
                                          "typeVariationReference": 0,
                                          "nullability": "NULLABILITY_NULLABLE"
                                        }
                                      },
                                      "arguments": [{
                                        "value": {
                                          "scalarFunction": {
                                            "functionReference": 3,
                                            "args": [],
                                            "outputType": {
                                              "varchar": {
                                                "length": 15,
                                                "typeVariationReference": 0,
                                                "nullability": "NULLABILITY_NULLABLE"
                                              }
                                            },
                                            "arguments": [{
                                              "value": {
                                                "selection": {
                                                  "directReference": {
                                                    "structField": {
                                                      "field": 4
                                                    }
                                                  },
                                                  "rootReference": {
                                                  }
                                                }
                                              }
                                            }, {
                                              "value": {
                                                "literal": {
                                                  "i32": 1,
                                                  "nullable": false,
                                                  "typeVariationReference": 0
                                                }
                                              }
                                            }, {
                                              "value": {
                                                "literal": {
                                                  "i32": 2,
                                                  "nullable": false,
                                                  "typeVariationReference": 0
                                                }
                                              }
                                            }],
                                            "options": []
                                          }
                                        }
                                      }, {
                                        "value": {
                                          "cast": {
                                            "type": {
                                              "varchar": {
                                                "length": 15,
                                                "typeVariationReference": 0,
                                                "nullability": "NULLABILITY_NULLABLE"
                                              }
                                            },
                                            "input": {
                                              "literal": {
                                                "fixedChar": "31",
                                                "nullable": false,
                                                "typeVariationReference": 0
                                              }
                                            },
                                            "failureBehavior": "FAILURE_BEHAVIOR_UNSPECIFIED"
                                          }
                                        }
                                      }],
                                      "options": []
                                    }
                                  }
                                }, {
                                  "value": {
                                    "scalarFunction": {
                                      "functionReference": 2,
                                      "args": [],
                                      "outputType": {
                                        "bool": {
                                          "typeVariationReference": 0,
                                          "nullability": "NULLABILITY_NULLABLE"
                                        }
                                      },
                                      "arguments": [{
                                        "value": {
                                          "scalarFunction": {
                                            "functionReference": 3,
                                            "args": [],
                                            "outputType": {
                                              "varchar": {
                                                "length": 15,
                                                "typeVariationReference": 0,
                                                "nullability": "NULLABILITY_NULLABLE"
                                              }
                                            },
                                            "arguments": [{
                                              "value": {
                                                "selection": {
                                                  "directReference": {
                                                    "structField": {
                                                      "field": 4
                                                    }
                                                  },
                                                  "rootReference": {
                                                  }
                                                }
                                              }
                                            }, {
                                              "value": {
                                                "literal": {
                                                  "i32": 1,
                                                  "nullable": false,
                                                  "typeVariationReference": 0
                                                }
                                              }
                                            }, {
                                              "value": {
                                                "literal": {
                                                  "i32": 2,
                                                  "nullable": false,
                                                  "typeVariationReference": 0
                                                }
                                              }
                                            }],
                                            "options": []
                                          }
                                        }
                                      }, {
                                        "value": {
                                          "cast": {
                                            "type": {
                                              "varchar": {
                                                "length": 15,
                                                "typeVariationReference": 0,
                                                "nullability": "NULLABILITY_NULLABLE"
                                              }
                                            },
                                            "input": {
                                              "literal": {
                                                "fixedChar": "11",
                                                "nullable": false,
                                                "typeVariationReference": 0
                                              }
                                            },
                                            "failureBehavior": "FAILURE_BEHAVIOR_UNSPECIFIED"
                                          }
                                        }
                                      }],
                                      "options": []
                                    }
                                  }
                                }, {
                                  "value": {
                                    "scalarFunction": {
                                      "functionReference": 2,
                                      "args": [],
                                      "outputType": {
                                        "bool": {
                                          "typeVariationReference": 0,
                                          "nullability": "NULLABILITY_NULLABLE"
                                        }
                                      },
                                      "arguments": [{
                                        "value": {
                                          "scalarFunction": {
                                            "functionReference": 3,
                                            "args": [],
                                            "outputType": {
                                              "varchar": {
                                                "length": 15,
                                                "typeVariationReference": 0,
                                                "nullability": "NULLABILITY_NULLABLE"
                                              }
                                            },
                                            "arguments": [{
                                              "value": {
                                                "selection": {
                                                  "directReference": {
                                                    "structField": {
                                                      "field": 4
                                                    }
                                                  },
                                                  "rootReference": {
                                                  }
                                                }
                                              }
                                            }, {
                                              "value": {
                                                "literal": {
                                                  "i32": 1,
                                                  "nullable": false,
                                                  "typeVariationReference": 0
                                                }
                                              }
                                            }, {
                                              "value": {
                                                "literal": {
                                                  "i32": 2,
                                                  "nullable": false,
                                                  "typeVariationReference": 0
                                                }
                                              }
                                            }],
                                            "options": []
                                          }
                                        }
                                      }, {
                                        "value": {
                                          "cast": {
                                            "type": {
                                              "varchar": {
                                                "length": 15,
                                                "typeVariationReference": 0,
                                                "nullability": "NULLABILITY_NULLABLE"
                                              }
                                            },
                                            "input": {
                                              "literal": {
                                                "fixedChar": "16",
                                                "nullable": false,
                                                "typeVariationReference": 0
                                              }
                                            },
                                            "failureBehavior": "FAILURE_BEHAVIOR_UNSPECIFIED"
                                          }
                                        }
                                      }],
                                      "options": []
                                    }
                                  }
                                }, {
                                  "value": {
                                    "scalarFunction": {
                                      "functionReference": 2,
                                      "args": [],
                                      "outputType": {
                                        "bool": {
                                          "typeVariationReference": 0,
                                          "nullability": "NULLABILITY_NULLABLE"
                                        }
                                      },
                                      "arguments": [{
                                        "value": {
                                          "scalarFunction": {
                                            "functionReference": 3,
                                            "args": [],
                                            "outputType": {
                                              "varchar": {
                                                "length": 15,
                                                "typeVariationReference": 0,
                                                "nullability": "NULLABILITY_NULLABLE"
                                              }
                                            },
                                            "arguments": [{
                                              "value": {
                                                "selection": {
                                                  "directReference": {
                                                    "structField": {
                                                      "field": 4
                                                    }
                                                  },
                                                  "rootReference": {
                                                  }
                                                }
                                              }
                                            }, {
                                              "value": {
                                                "literal": {
                                                  "i32": 1,
                                                  "nullable": false,
                                                  "typeVariationReference": 0
                                                }
                                              }
                                            }, {
                                              "value": {
                                                "literal": {
                                                  "i32": 2,
                                                  "nullable": false,
                                                  "typeVariationReference": 0
                                                }
                                              }
                                            }],
                                            "options": []
                                          }
                                        }
                                      }, {
                                        "value": {
                                          "cast": {
                                            "type": {
                                              "varchar": {
                                                "length": 15,
                                                "typeVariationReference": 0,
                                                "nullability": "NULLABILITY_NULLABLE"
                                              }
                                            },
                                            "input": {
                                              "literal": {
                                                "fixedChar": "21",
                                                "nullable": false,
                                                "typeVariationReference": 0
                                              }
                                            },
                                            "failureBehavior": "FAILURE_BEHAVIOR_UNSPECIFIED"
                                          }
                                        }
                                      }],
                                      "options": []
                                    }
                                  }
                                }, {
                                  "value": {
                                    "scalarFunction": {
                                      "functionReference": 2,
                                      "args": [],
                                      "outputType": {
                                        "bool": {
                                          "typeVariationReference": 0,
                                          "nullability": "NULLABILITY_NULLABLE"
                                        }
                                      },
                                      "arguments": [{
                                        "value": {
                                          "scalarFunction": {
                                            "functionReference": 3,
                                            "args": [],
                                            "outputType": {
                                              "varchar": {
                                                "length": 15,
                                                "typeVariationReference": 0,
                                                "nullability": "NULLABILITY_NULLABLE"
                                              }
                                            },
                                            "arguments": [{
                                              "value": {
                                                "selection": {
                                                  "directReference": {
                                                    "structField": {
                                                      "field": 4
                                                    }
                                                  },
                                                  "rootReference": {
                                                  }
                                                }
                                              }
                                            }, {
                                              "value": {
                                                "literal": {
                                                  "i32": 1,
                                                  "nullable": false,
                                                  "typeVariationReference": 0
                                                }
                                              }
                                            }, {
                                              "value": {
                                                "literal": {
                                                  "i32": 2,
                                                  "nullable": false,
                                                  "typeVariationReference": 0
                                                }
                                              }
                                            }],
                                            "options": []
                                          }
                                        }
                                      }, {
                                        "value": {
                                          "cast": {
                                            "type": {
                                              "varchar": {
                                                "length": 15,
                                                "typeVariationReference": 0,
                                                "nullability": "NULLABILITY_NULLABLE"
                                              }
                                            },
                                            "input": {
                                              "literal": {
                                                "fixedChar": "20",
                                                "nullable": false,
                                                "typeVariationReference": 0
                                              }
                                            },
                                            "failureBehavior": "FAILURE_BEHAVIOR_UNSPECIFIED"
                                          }
                                        }
                                      }],
                                      "options": []
                                    }
                                  }
                                }, {
                                  "value": {
                                    "scalarFunction": {
                                      "functionReference": 2,
                                      "args": [],
                                      "outputType": {
                                        "bool": {
                                          "typeVariationReference": 0,
                                          "nullability": "NULLABILITY_NULLABLE"
                                        }
                                      },
                                      "arguments": [{
                                        "value": {
                                          "scalarFunction": {
                                            "functionReference": 3,
                                            "args": [],
                                            "outputType": {
                                              "varchar": {
                                                "length": 15,
                                                "typeVariationReference": 0,
                                                "nullability": "NULLABILITY_NULLABLE"
                                              }
                                            },
                                            "arguments": [{
                                              "value": {
                                                "selection": {
                                                  "directReference": {
                                                    "structField": {
                                                      "field": 4
                                                    }
                                                  },
                                                  "rootReference": {
                                                  }
                                                }
                                              }
                                            }, {
                                              "value": {
                                                "literal": {
                                                  "i32": 1,
                                                  "nullable": false,
                                                  "typeVariationReference": 0
                                                }
                                              }
                                            }, {
                                              "value": {
                                                "literal": {
                                                  "i32": 2,
                                                  "nullable": false,
                                                  "typeVariationReference": 0
                                                }
                                              }
                                            }],
                                            "options": []
                                          }
                                        }
                                      }, {
                                        "value": {
                                          "cast": {
                                            "type": {
                                              "varchar": {
                                                "length": 15,
                                                "typeVariationReference": 0,
                                                "nullability": "NULLABILITY_NULLABLE"
                                              }
                                            },
                                            "input": {
                                              "literal": {
                                                "fixedChar": "34",
                                                "nullable": false,
                                                "typeVariationReference": 0
                                              }
                                            },
                                            "failureBehavior": "FAILURE_BEHAVIOR_UNSPECIFIED"
                                          }
                                        }
                                      }],
                                      "options": []
                                    }
                                  }
                                }],
                                "options": []
                              }
                            }
                          }, {
                            "value": {
                              "scalarFunction": {
                                "functionReference": 4,
                                "args": [],
                                "outputType": {
                                  "bool": {
                                    "typeVariationReference": 0,
                                    "nullability": "NULLABILITY_NULLABLE"
                                  }
                                },
                                "arguments": [{
                                  "value": {
                                    "selection": {
                                      "directReference": {
                                        "structField": {
                                          "field": 5
                                        }
                                      },
                                      "rootReference": {
                                      }
                                    }
                                  }
                                }, {
                                  "value": {
                                    "subquery": {
                                      "scalar": {
                                        "input": {
                                          "aggregate": {
                                            "common": {
                                              "direct": {
                                              }
                                            },
                                            "input": {
                                              "project": {
                                                "common": {
                                                  "emit": {
                                                    "outputMapping": [8]
                                                  }
                                                },
                                                "input": {
                                                  "filter": {
                                                    "common": {
                                                      "direct": {
                                                      }
                                                    },
                                                    "input": {
                                                      "read": {
                                                        "common": {
                                                          "direct": {
                                                          }
                                                        },
                                                        "baseSchema": {
                                                          "names": ["C_CUSTKEY", "C_NAME", "C_ADDRESS", "C_NATIONKEY", "C_PHONE", "C_ACCTBAL", "C_MKTSEGMENT", "C_COMMENT"],
                                                          "struct": {
                                                            "types": [{
                                                              "i64": {
                                                                "typeVariationReference": 0,
                                                                "nullability": "NULLABILITY_REQUIRED"
                                                              }
                                                            }, {
                                                              "varchar": {
                                                                "length": 25,
                                                                "typeVariationReference": 0,
                                                                "nullability": "NULLABILITY_NULLABLE"
                                                              }
                                                            }, {
                                                              "varchar": {
                                                                "length": 40,
                                                                "typeVariationReference": 0,
                                                                "nullability": "NULLABILITY_NULLABLE"
                                                              }
                                                            }, {
                                                              "i64": {
                                                                "typeVariationReference": 0,
                                                                "nullability": "NULLABILITY_REQUIRED"
                                                              }
                                                            }, {
                                                              "fixedChar": {
                                                                "length": 15,
                                                                "typeVariationReference": 0,
                                                                "nullability": "NULLABILITY_NULLABLE"
                                                              }
                                                            }, {
                                                              "decimal": {
                                                                "scale": 0,
                                                                "precision": 19,
                                                                "typeVariationReference": 0,
                                                                "nullability": "NULLABILITY_NULLABLE"
                                                              }
                                                            }, {
                                                              "fixedChar": {
                                                                "length": 10,
                                                                "typeVariationReference": 0,
                                                                "nullability": "NULLABILITY_NULLABLE"
                                                              }
                                                            }, {
                                                              "varchar": {
                                                                "length": 117,
                                                                "typeVariationReference": 0,
                                                                "nullability": "NULLABILITY_NULLABLE"
                                                              }
                                                            }],
                                                            "typeVariationReference": 0,
                                                            "nullability": "NULLABILITY_REQUIRED"
                                                          }
                                                        },
                                                        "namedTable": {
                                                          "names": ["CUSTOMER"]
                                                        }
                                                      }
                                                    },
                                                    "condition": {
                                                      "scalarFunction": {
                                                        "functionReference": 0,
                                                        "args": [],
                                                        "outputType": {
                                                          "bool": {
                                                            "typeVariationReference": 0,
                                                            "nullability": "NULLABILITY_NULLABLE"
                                                          }
                                                        },
                                                        "arguments": [{
                                                          "value": {
                                                            "scalarFunction": {
                                                              "functionReference": 4,
                                                              "args": [],
                                                              "outputType": {
                                                                "bool": {
                                                                  "typeVariationReference": 0,
                                                                  "nullability": "NULLABILITY_NULLABLE"
                                                                }
                                                              },
                                                              "arguments": [{
                                                                "value": {
                                                                  "selection": {
                                                                    "directReference": {
                                                                      "structField": {
                                                                        "field": 5
                                                                      }
                                                                    },
                                                                    "rootReference": {
                                                                    }
                                                                  }
                                                                }
                                                              }, {
                                                                "value": {
                                                                  "literal": {
                                                                    "decimal": {
                                                                      "value": "AAAAAAAAAAAAAAAAAAAAAA==",
                                                                      "precision": 3,
                                                                      "scale": 2
                                                                    },
                                                                    "nullable": false,
                                                                    "typeVariationReference": 0
                                                                  }
                                                                }
                                                              }],
                                                              "options": []
                                                            }
                                                          }
                                                        }, {
                                                          "value": {
                                                            "scalarFunction": {
                                                              "functionReference": 1,
                                                              "args": [],
                                                              "outputType": {
                                                                "bool": {
                                                                  "typeVariationReference": 0,
                                                                  "nullability": "NULLABILITY_NULLABLE"
                                                                }
                                                              },
                                                              "arguments": [{
                                                                "value": {
                                                                  "scalarFunction": {
                                                                    "functionReference": 2,
                                                                    "args": [],
                                                                    "outputType": {
                                                                      "bool": {
                                                                        "typeVariationReference": 0,
                                                                        "nullability": "NULLABILITY_NULLABLE"
                                                                      }
                                                                    },
                                                                    "arguments": [{
                                                                      "value": {
                                                                        "scalarFunction": {
                                                                          "functionReference": 3,
                                                                          "args": [],
                                                                          "outputType": {
                                                                            "varchar": {
                                                                              "length": 15,
                                                                              "typeVariationReference": 0,
                                                                              "nullability": "NULLABILITY_NULLABLE"
                                                                            }
                                                                          },
                                                                          "arguments": [{
                                                                            "value": {
                                                                              "selection": {
                                                                                "directReference": {
                                                                                  "structField": {
                                                                                    "field": 4
                                                                                  }
                                                                                },
                                                                                "rootReference": {
                                                                                }
                                                                              }
                                                                            }
                                                                          }, {
                                                                            "value": {
                                                                              "literal": {
                                                                                "i32": 1,
                                                                                "nullable": false,
                                                                                "typeVariationReference": 0
                                                                              }
                                                                            }
                                                                          }, {
                                                                            "value": {
                                                                              "literal": {
                                                                                "i32": 2,
                                                                                "nullable": false,
                                                                                "typeVariationReference": 0
                                                                              }
                                                                            }
                                                                          }],
                                                                          "options": []
                                                                        }
                                                                      }
                                                                    }, {
                                                                      "value": {
                                                                        "cast": {
                                                                          "type": {
                                                                            "varchar": {
                                                                              "length": 15,
                                                                              "typeVariationReference": 0,
                                                                              "nullability": "NULLABILITY_NULLABLE"
                                                                            }
                                                                          },
                                                                          "input": {
                                                                            "literal": {
                                                                              "fixedChar": "24",
                                                                              "nullable": false,
                                                                              "typeVariationReference": 0
                                                                            }
                                                                          },
                                                                          "failureBehavior": "FAILURE_BEHAVIOR_UNSPECIFIED"
                                                                        }
                                                                      }
                                                                    }],
                                                                    "options": []
                                                                  }
                                                                }
                                                              }, {
                                                                "value": {
                                                                  "scalarFunction": {
                                                                    "functionReference": 2,
                                                                    "args": [],
                                                                    "outputType": {
                                                                      "bool": {
                                                                        "typeVariationReference": 0,
                                                                        "nullability": "NULLABILITY_NULLABLE"
                                                                      }
                                                                    },
                                                                    "arguments": [{
                                                                      "value": {
                                                                        "scalarFunction": {
                                                                          "functionReference": 3,
                                                                          "args": [],
                                                                          "outputType": {
                                                                            "varchar": {
                                                                              "length": 15,
                                                                              "typeVariationReference": 0,
                                                                              "nullability": "NULLABILITY_NULLABLE"
                                                                            }
                                                                          },
                                                                          "arguments": [{
                                                                            "value": {
                                                                              "selection": {
                                                                                "directReference": {
                                                                                  "structField": {
                                                                                    "field": 4
                                                                                  }
                                                                                },
                                                                                "rootReference": {
                                                                                }
                                                                              }
                                                                            }
                                                                          }, {
                                                                            "value": {
                                                                              "literal": {
                                                                                "i32": 1,
                                                                                "nullable": false,
                                                                                "typeVariationReference": 0
                                                                              }
                                                                            }
                                                                          }, {
                                                                            "value": {
                                                                              "literal": {
                                                                                "i32": 2,
                                                                                "nullable": false,
                                                                                "typeVariationReference": 0
                                                                              }
                                                                            }
                                                                          }],
                                                                          "options": []
                                                                        }
                                                                      }
                                                                    }, {
                                                                      "value": {
                                                                        "cast": {
                                                                          "type": {
                                                                            "varchar": {
                                                                              "length": 15,
                                                                              "typeVariationReference": 0,
                                                                              "nullability": "NULLABILITY_NULLABLE"
                                                                            }
                                                                          },
                                                                          "input": {
                                                                            "literal": {
                                                                              "fixedChar": "31",
                                                                              "nullable": false,
                                                                              "typeVariationReference": 0
                                                                            }
                                                                          },
                                                                          "failureBehavior": "FAILURE_BEHAVIOR_UNSPECIFIED"
                                                                        }
                                                                      }
                                                                    }],
                                                                    "options": []
                                                                  }
                                                                }
                                                              }, {
                                                                "value": {
                                                                  "scalarFunction": {
                                                                    "functionReference": 2,
                                                                    "args": [],
                                                                    "outputType": {
                                                                      "bool": {
                                                                        "typeVariationReference": 0,
                                                                        "nullability": "NULLABILITY_NULLABLE"
                                                                      }
                                                                    },
                                                                    "arguments": [{
                                                                      "value": {
                                                                        "scalarFunction": {
                                                                          "functionReference": 3,
                                                                          "args": [],
                                                                          "outputType": {
                                                                            "varchar": {
                                                                              "length": 15,
                                                                              "typeVariationReference": 0,
                                                                              "nullability": "NULLABILITY_NULLABLE"
                                                                            }
                                                                          },
                                                                          "arguments": [{
                                                                            "value": {
                                                                              "selection": {
                                                                                "directReference": {
                                                                                  "structField": {
                                                                                    "field": 4
                                                                                  }
                                                                                },
                                                                                "rootReference": {
                                                                                }
                                                                              }
                                                                            }
                                                                          }, {
                                                                            "value": {
                                                                              "literal": {
                                                                                "i32": 1,
                                                                                "nullable": false,
                                                                                "typeVariationReference": 0
                                                                              }
                                                                            }
                                                                          }, {
                                                                            "value": {
                                                                              "literal": {
                                                                                "i32": 2,
                                                                                "nullable": false,
                                                                                "typeVariationReference": 0
                                                                              }
                                                                            }
                                                                          }],
                                                                          "options": []
                                                                        }
                                                                      }
                                                                    }, {
                                                                      "value": {
                                                                        "cast": {
                                                                          "type": {
                                                                            "varchar": {
                                                                              "length": 15,
                                                                              "typeVariationReference": 0,
                                                                              "nullability": "NULLABILITY_NULLABLE"
                                                                            }
                                                                          },
                                                                          "input": {
                                                                            "literal": {
                                                                              "fixedChar": "11",
                                                                              "nullable": false,
                                                                              "typeVariationReference": 0
                                                                            }
                                                                          },
                                                                          "failureBehavior": "FAILURE_BEHAVIOR_UNSPECIFIED"
                                                                        }
                                                                      }
                                                                    }],
                                                                    "options": []
                                                                  }
                                                                }
                                                              }, {
                                                                "value": {
                                                                  "scalarFunction": {
                                                                    "functionReference": 2,
                                                                    "args": [],
                                                                    "outputType": {
                                                                      "bool": {
                                                                        "typeVariationReference": 0,
                                                                        "nullability": "NULLABILITY_NULLABLE"
                                                                      }
                                                                    },
                                                                    "arguments": [{
                                                                      "value": {
                                                                        "scalarFunction": {
                                                                          "functionReference": 3,
                                                                          "args": [],
                                                                          "outputType": {
                                                                            "varchar": {
                                                                              "length": 15,
                                                                              "typeVariationReference": 0,
                                                                              "nullability": "NULLABILITY_NULLABLE"
                                                                            }
                                                                          },
                                                                          "arguments": [{
                                                                            "value": {
                                                                              "selection": {
                                                                                "directReference": {
                                                                                  "structField": {
                                                                                    "field": 4
                                                                                  }
                                                                                },
                                                                                "rootReference": {
                                                                                }
                                                                              }
                                                                            }
                                                                          }, {
                                                                            "value": {
                                                                              "literal": {
                                                                                "i32": 1,
                                                                                "nullable": false,
                                                                                "typeVariationReference": 0
                                                                              }
                                                                            }
                                                                          }, {
                                                                            "value": {
                                                                              "literal": {
                                                                                "i32": 2,
                                                                                "nullable": false,
                                                                                "typeVariationReference": 0
                                                                              }
                                                                            }
                                                                          }],
                                                                          "options": []
                                                                        }
                                                                      }
                                                                    }, {
                                                                      "value": {
                                                                        "cast": {
                                                                          "type": {
                                                                            "varchar": {
                                                                              "length": 15,
                                                                              "typeVariationReference": 0,
                                                                              "nullability": "NULLABILITY_NULLABLE"
                                                                            }
                                                                          },
                                                                          "input": {
                                                                            "literal": {
                                                                              "fixedChar": "16",
                                                                              "nullable": false,
                                                                              "typeVariationReference": 0
                                                                            }
                                                                          },
                                                                          "failureBehavior": "FAILURE_BEHAVIOR_UNSPECIFIED"
                                                                        }
                                                                      }
                                                                    }],
                                                                    "options": []
                                                                  }
                                                                }
                                                              }, {
                                                                "value": {
                                                                  "scalarFunction": {
                                                                    "functionReference": 2,
                                                                    "args": [],
                                                                    "outputType": {
                                                                      "bool": {
                                                                        "typeVariationReference": 0,
                                                                        "nullability": "NULLABILITY_NULLABLE"
                                                                      }
                                                                    },
                                                                    "arguments": [{
                                                                      "value": {
                                                                        "scalarFunction": {
                                                                          "functionReference": 3,
                                                                          "args": [],
                                                                          "outputType": {
                                                                            "varchar": {
                                                                              "length": 15,
                                                                              "typeVariationReference": 0,
                                                                              "nullability": "NULLABILITY_NULLABLE"
                                                                            }
                                                                          },
                                                                          "arguments": [{
                                                                            "value": {
                                                                              "selection": {
                                                                                "directReference": {
                                                                                  "structField": {
                                                                                    "field": 4
                                                                                  }
                                                                                },
                                                                                "rootReference": {
                                                                                }
                                                                              }
                                                                            }
                                                                          }, {
                                                                            "value": {
                                                                              "literal": {
                                                                                "i32": 1,
                                                                                "nullable": false,
                                                                                "typeVariationReference": 0
                                                                              }
                                                                            }
                                                                          }, {
                                                                            "value": {
                                                                              "literal": {
                                                                                "i32": 2,
                                                                                "nullable": false,
                                                                                "typeVariationReference": 0
                                                                              }
                                                                            }
                                                                          }],
                                                                          "options": []
                                                                        }
                                                                      }
                                                                    }, {
                                                                      "value": {
                                                                        "cast": {
                                                                          "type": {
                                                                            "varchar": {
                                                                              "length": 15,
                                                                              "typeVariationReference": 0,
                                                                              "nullability": "NULLABILITY_NULLABLE"
                                                                            }
                                                                          },
                                                                          "input": {
                                                                            "literal": {
                                                                              "fixedChar": "21",
                                                                              "nullable": false,
                                                                              "typeVariationReference": 0
                                                                            }
                                                                          },
                                                                          "failureBehavior": "FAILURE_BEHAVIOR_UNSPECIFIED"
                                                                        }
                                                                      }
                                                                    }],
                                                                    "options": []
                                                                  }
                                                                }
                                                              }, {
                                                                "value": {
                                                                  "scalarFunction": {
                                                                    "functionReference": 2,
                                                                    "args": [],
                                                                    "outputType": {
                                                                      "bool": {
                                                                        "typeVariationReference": 0,
                                                                        "nullability": "NULLABILITY_NULLABLE"
                                                                      }
                                                                    },
                                                                    "arguments": [{
                                                                      "value": {
                                                                        "scalarFunction": {
                                                                          "functionReference": 3,
                                                                          "args": [],
                                                                          "outputType": {
                                                                            "varchar": {
                                                                              "length": 15,
                                                                              "typeVariationReference": 0,
                                                                              "nullability": "NULLABILITY_NULLABLE"
                                                                            }
                                                                          },
                                                                          "arguments": [{
                                                                            "value": {
                                                                              "selection": {
                                                                                "directReference": {
                                                                                  "structField": {
                                                                                    "field": 4
                                                                                  }
                                                                                },
                                                                                "rootReference": {
                                                                                }
                                                                              }
                                                                            }
                                                                          }, {
                                                                            "value": {
                                                                              "literal": {
                                                                                "i32": 1,
                                                                                "nullable": false,
                                                                                "typeVariationReference": 0
                                                                              }
                                                                            }
                                                                          }, {
                                                                            "value": {
                                                                              "literal": {
                                                                                "i32": 2,
                                                                                "nullable": false,
                                                                                "typeVariationReference": 0
                                                                              }
                                                                            }
                                                                          }],
                                                                          "options": []
                                                                        }
                                                                      }
                                                                    }, {
                                                                      "value": {
                                                                        "cast": {
                                                                          "type": {
                                                                            "varchar": {
                                                                              "length": 15,
                                                                              "typeVariationReference": 0,
                                                                              "nullability": "NULLABILITY_NULLABLE"
                                                                            }
                                                                          },
                                                                          "input": {
                                                                            "literal": {
                                                                              "fixedChar": "20",
                                                                              "nullable": false,
                                                                              "typeVariationReference": 0
                                                                            }
                                                                          },
                                                                          "failureBehavior": "FAILURE_BEHAVIOR_UNSPECIFIED"
                                                                        }
                                                                      }
                                                                    }],
                                                                    "options": []
                                                                  }
                                                                }
                                                              }, {
                                                                "value": {
                                                                  "scalarFunction": {
                                                                    "functionReference": 2,
                                                                    "args": [],
                                                                    "outputType": {
                                                                      "bool": {
                                                                        "typeVariationReference": 0,
                                                                        "nullability": "NULLABILITY_NULLABLE"
                                                                      }
                                                                    },
                                                                    "arguments": [{
                                                                      "value": {
                                                                        "scalarFunction": {
                                                                          "functionReference": 3,
                                                                          "args": [],
                                                                          "outputType": {
                                                                            "varchar": {
                                                                              "length": 15,
                                                                              "typeVariationReference": 0,
                                                                              "nullability": "NULLABILITY_NULLABLE"
                                                                            }
                                                                          },
                                                                          "arguments": [{
                                                                            "value": {
                                                                              "selection": {
                                                                                "directReference": {
                                                                                  "structField": {
                                                                                    "field": 4
                                                                                  }
                                                                                },
                                                                                "rootReference": {
                                                                                }
                                                                              }
                                                                            }
                                                                          }, {
                                                                            "value": {
                                                                              "literal": {
                                                                                "i32": 1,
                                                                                "nullable": false,
                                                                                "typeVariationReference": 0
                                                                              }
                                                                            }
                                                                          }, {
                                                                            "value": {
                                                                              "literal": {
                                                                                "i32": 2,
                                                                                "nullable": false,
                                                                                "typeVariationReference": 0
                                                                              }
                                                                            }
                                                                          }],
                                                                          "options": []
                                                                        }
                                                                      }
                                                                    }, {
                                                                      "value": {
                                                                        "cast": {
                                                                          "type": {
                                                                            "varchar": {
                                                                              "length": 15,
                                                                              "typeVariationReference": 0,
                                                                              "nullability": "NULLABILITY_NULLABLE"
                                                                            }
                                                                          },
                                                                          "input": {
                                                                            "literal": {
                                                                              "fixedChar": "34",
                                                                              "nullable": false,
                                                                              "typeVariationReference": 0
                                                                            }
                                                                          },
                                                                          "failureBehavior": "FAILURE_BEHAVIOR_UNSPECIFIED"
                                                                        }
                                                                      }
                                                                    }],
                                                                    "options": []
                                                                  }
                                                                }
                                                              }],
                                                              "options": []
                                                            }
                                                          }
                                                        }],
                                                        "options": []
                                                      }
                                                    }
                                                  }
                                                },
                                                "expressions": [{
                                                  "selection": {
                                                    "directReference": {
                                                      "structField": {
                                                        "field": 5
                                                      }
                                                    },
                                                    "rootReference": {
                                                    }
                                                  }
                                                }]
                                              }
                                            },
                                            "groupings": [{
                                              "groupingExpressions": []
                                            }],
                                            "measures": [{
                                              "measure": {
                                                "functionReference": 5,
                                                "args": [],
                                                "sorts": [],
                                                "phase": "AGGREGATION_PHASE_INITIAL_TO_RESULT",
                                                "outputType": {
                                                  "decimal": {
                                                    "scale": 0,
                                                    "precision": 19,
                                                    "typeVariationReference": 0,
                                                    "nullability": "NULLABILITY_NULLABLE"
                                                  }
                                                },
                                                "invocation": "AGGREGATION_INVOCATION_ALL",
                                                "arguments": [{
                                                  "value": {
                                                    "selection": {
                                                      "directReference": {
                                                        "structField": {
                                                          "field": 0
                                                        }
                                                      },
                                                      "rootReference": {
                                                      }
                                                    }
                                                  }
                                                }],
                                                "options": []
                                              }
                                            }]
                                          }
                                        }
                                      }
                                    }
                                  }
                                }],
                                "options": []
                              }
                            }
                          }, {
                            "value": {
                              "scalarFunction": {
                                "functionReference": 6,
                                "args": [],
                                "outputType": {
                                  "bool": {
                                    "typeVariationReference": 0,
                                    "nullability": "NULLABILITY_REQUIRED"
                                  }
                                },
                                "arguments": [{
                                  "value": {
                                    "subquery": {
                                      "setPredicate": {
                                        "predicateOp": "PREDICATE_OP_EXISTS",
                                        "tuples": {
                                          "filter": {
                                            "common": {
                                              "direct": {
                                              }
                                            },
                                            "input": {
                                              "read": {
                                                "common": {
                                                  "direct": {
                                                  }
                                                },
                                                "baseSchema": {
                                                  "names": ["O_ORDERKEY", "O_CUSTKEY", "O_ORDERSTATUS", "O_TOTALPRICE", "O_ORDERDATE", "O_ORDERPRIORITY", "O_CLERK", "O_SHIPPRIORITY", "O_COMMENT"],
                                                  "struct": {
                                                    "types": [{
                                                      "i64": {
                                                        "typeVariationReference": 0,
                                                        "nullability": "NULLABILITY_REQUIRED"
                                                      }
                                                    }, {
                                                      "i64": {
                                                        "typeVariationReference": 0,
                                                        "nullability": "NULLABILITY_REQUIRED"
                                                      }
                                                    }, {
                                                      "fixedChar": {
                                                        "length": 1,
                                                        "typeVariationReference": 0,
                                                        "nullability": "NULLABILITY_NULLABLE"
                                                      }
                                                    }, {
                                                      "decimal": {
                                                        "scale": 0,
                                                        "precision": 19,
                                                        "typeVariationReference": 0,
                                                        "nullability": "NULLABILITY_NULLABLE"
                                                      }
                                                    }, {
                                                      "date": {
                                                        "typeVariationReference": 0,
                                                        "nullability": "NULLABILITY_NULLABLE"
                                                      }
                                                    }, {
                                                      "fixedChar": {
                                                        "length": 15,
                                                        "typeVariationReference": 0,
                                                        "nullability": "NULLABILITY_NULLABLE"
                                                      }
                                                    }, {
                                                      "fixedChar": {
                                                        "length": 15,
                                                        "typeVariationReference": 0,
                                                        "nullability": "NULLABILITY_NULLABLE"
                                                      }
                                                    }, {
                                                      "i32": {
                                                        "typeVariationReference": 0,
                                                        "nullability": "NULLABILITY_NULLABLE"
                                                      }
                                                    }, {
                                                      "varchar": {
                                                        "length": 79,
                                                        "typeVariationReference": 0,
                                                        "nullability": "NULLABILITY_NULLABLE"
                                                      }
                                                    }],
                                                    "typeVariationReference": 0,
                                                    "nullability": "NULLABILITY_REQUIRED"
                                                  }
                                                },
                                                "namedTable": {
                                                  "names": ["ORDERS"]
                                                }
                                              }
                                            },
                                            "condition": {
                                              "scalarFunction": {
                                                "functionReference": 2,
                                                "args": [],
                                                "outputType": {
                                                  "bool": {
                                                    "typeVariationReference": 0,
                                                    "nullability": "NULLABILITY_REQUIRED"
                                                  }
                                                },
                                                "arguments": [{
                                                  "value": {
                                                    "selection": {
                                                      "directReference": {
                                                        "structField": {
                                                          "field": 1
                                                        }
                                                      },
                                                      "rootReference": {
                                                      }
                                                    }
                                                  }
                                                }, {
                                                  "value": {
                                                    "selection": {
                                                      "directReference": {
                                                        "structField": {
                                                          "field": 0
                                                        }
                                                      },
                                                      "outerReference": {
                                                        "stepsOut": 1
                                                      }
                                                    }
                                                  }
                                                }],
                                                "options": []
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }],
                                "options": []
                              }
                            }
                          }],
                          "options": []
                        }
                      }
                    }
                  },
                  "expressions": [{
                    "scalarFunction": {
                      "functionReference": 3,
                      "args": [],
                      "outputType": {
                        "varchar": {
                          "length": 15,
                          "typeVariationReference": 0,
                          "nullability": "NULLABILITY_NULLABLE"
                        }
                      },
                      "arguments": [{
                        "value": {
                          "selection": {
                            "directReference": {
                              "structField": {
                                "field": 4
                              }
                            },
                            "rootReference": {
                            }
                          }
                        }
                      }, {
                        "value": {
                          "literal": {
                            "i32": 1,
                            "nullable": false,
                            "typeVariationReference": 0
                          }
                        }
                      }, {
                        "value": {
                          "literal": {
                            "i32": 2,
                            "nullable": false,
                            "typeVariationReference": 0
                          }
                        }
                      }],
                      "options": []
                    }
                  }, {
                    "selection": {
                      "directReference": {
                        "structField": {
                          "field": 5
                        }
                      },
                      "rootReference": {
                      }
                    }
                  }]
                }
              },
              "groupings": [{
                "groupingExpressions": [{
                  "selection": {
                    "directReference": {
                      "structField": {
                        "field": 0
                      }
                    },
                    "rootReference": {
                    }
                  }
                }]
              }],
              "measures": [{
                "measure": {
                  "functionReference": 7,
                  "args": [],
                  "sorts": [],
                  "phase": "AGGREGATION_PHASE_INITIAL_TO_RESULT",
                  "outputType": {
                    "i64": {
                      "typeVariationReference": 0,
                      "nullability": "NULLABILITY_REQUIRED"
                    }
                  },
                  "invocation": "AGGREGATION_INVOCATION_ALL",
                  "arguments": [],
                  "options": []
                }
              }, {
                "measure": {
                  "functionReference": 8,
                  "args": [],
                  "sorts": [],
                  "phase": "AGGREGATION_PHASE_INITIAL_TO_RESULT",
                  "outputType": {
                    "decimal": {
                      "scale": 0,
                      "precision": 19,
                      "typeVariationReference": 0,
                      "nullability": "NULLABILITY_NULLABLE"
                    }
                  },
                  "invocation": "AGGREGATION_INVOCATION_ALL",
                  "arguments": [{
                    "value": {
                      "selection": {
                        "directReference": {
                          "structField": {
                            "field": 1
                          }
                        },
                        "rootReference": {
                        }
                      }
                    }
                  }],
                  "options": []
                }
              }]
            }
          },
          "sorts": [{
            "expr": {
              "selection": {
                "directReference": {
                  "structField": {
                    "field": 0
                  }
                },
                "rootReference": {
                }
              }
            },
            "direction": "SORT_DIRECTION_ASC_NULLS_LAST"
          }]
        }
      },
      "names": ["CNTRYCODE", "NUMCUST", "TOTACCTBAL"]
    }
  }],
  "expectedTypeUrls": []
}
