fn parse_operator_name(&mut self) -> Result<Op, ParserError> {
        let mut schema = vec![];
        let original_pos = self.index;
        while !matches!(self.peek_token(), Some(Token::Op(_)) | Some(Token::Star)) {
            schema.push(self.parse_identifier()?);
            self.expect_token(&Token::Dot)?;
        }

        // Supporting qualified operators fully is difficult, so we simplify the
        // problem by requiring that the operator's schema is `pg_catalog`.
        // See #9282 for details.
        // Once materialize supports the creation of custom operators, this code can be removed
        if !(schema.is_empty() || (schema.len() == 1 && schema[0].as_str() == "pg_catalog")) {
            return parser_err!(
                self,
                original_pos,
                "Expected {}, found {}",
                "pg_catalog",
                schema.iter().map(|e| e.to_string()).join("."),
            );
        }

        match self.next_token() {
            Some(Token::Op(op)) => Ok(Op::Qualified { schema, name: op }),
            Some(Token::Star) => Ok(Op::Qualified {
                schema,
                name: String::from("*"),
            }),
            _ => self.expected(self.peek_pos(), "operator", self.peek_token()),
        }
    }
/// Parse a possibly qualified, possibly quoted operator, e.g.
/// `+`, `pg_catalog.+`, or `"pg_catalog".+`
Parse a possibly qualified, possibly quoted operator, e.g.
Parse a possibly qualified possibly quoted operator e . g .
fn parse_operator_name(&mut self) -> Result<Op, ParserError> {
        let mut schema = vec![];
        let original_pos = self.index;
        while !matches!(self.peek_token(), Some(Token::Op(_)) | Some(Token::Star)) {
            schema.push(self.parse_identifier()?);
            self.expect_token(&Token::Dot)?;
        }
        // Supporting qualified operators fully is difficult, so we simplify the
        // problem by requiring that the operator's schema is `pg_catalog`.
        // See #9282 for details.
        // Once materialize supports the creation of custom operators, this code can be removed
        if !(schema.is_empty() || (schema.len() == 1 && schema[0].as_str() == "pg_catalog")) {
            return parser_err!(
                self,
                original_pos,
                "Expected {}, found {}",
                "pg_catalog",
                schema.iter().map(|e| e.to_string()).join("."),
            );
        }
        match self.next_token() {
            Some(Token::Op(op)) => Ok(Op::Qualified { schema, name: op }),
            Some(Token::Star) => Ok(Op::Qualified {
                schema,
                name: String::from("*"),
            }),
            _ => self.expected(self.peek_pos(), "operator", self.peek_token()),
        }
    }
fn parse_operator_name ( & mut self ) -> Result < Op , ParserError > { let mut schema = vec ! [ ] ; let original_pos = self . index ; while ! matches ! ( self peek_token ( ) Some ( Token Op ( ) ) Some ( Token Star ) ) { schema . push ( self . parse_identifier ( ) ? ) ; self . expect_token ( & Token :: Dot ) ? ; } // Supporting qualified operators fully is difficult, so we simplify the // problem by requiring that the operator's schema is `pg_catalog`. // See #9282 for details. // Once materialize supports the creation of custom operators, this code can be removed if ! ( schema . is_empty ( ) || ( schema . len ( ) == 1 && schema [ 0 ] . as_str ( ) == " " ) ) { return parser_err ! ( self original_pos " " " " schema iter ( ) map ( e e to_string ( ) ) join ( " " ) ) ; } match self . next_token ( ) { Some ( Token :: Op ( op ) ) => Ok ( Op :: Qualified { schema , name : op } ) , Some ( Token :: Star ) => Ok ( Op :: Qualified { schema , name : String :: from ( " " ) , } ) , _ => self . expected ( self . peek_pos ( ) , " " , self . peek_token ( ) ) , } }
Parse a possibly qualified, possibly quoted operator, e.g.
Parse a possibly qualified possibly quoted operator e . g .
&mut self
&mut self