| 1066 | } |
| 1067 | |
| 1068 | fn sql_to_op(&self, op: &BinaryOperator) -> Result<Operator> { |
| 1069 | match op { |
| 1070 | BinaryOperator::Eq => Ok(Operator::Eq), |
| 1071 | BinaryOperator::NotEq => Ok(Operator::NotEq), |
| 1072 | BinaryOperator::Lt => Ok(Operator::Lt), |
| 1073 | BinaryOperator::LtEq => Ok(Operator::LtEq), |
| 1074 | BinaryOperator::Gt => Ok(Operator::Gt), |
| 1075 | BinaryOperator::GtEq => Ok(Operator::GtEq), |
| 1076 | BinaryOperator::Plus => Ok(Operator::Plus), |
| 1077 | BinaryOperator::Minus => Ok(Operator::Minus), |
| 1078 | BinaryOperator::Multiply => Ok(Operator::Multiply), |
| 1079 | BinaryOperator::Divide => Ok(Operator::Divide), |
| 1080 | BinaryOperator::Modulo => Ok(Operator::Modulo), |
| 1081 | BinaryOperator::And => Ok(Operator::And), |
| 1082 | BinaryOperator::Or => Ok(Operator::Or), |
| 1083 | BinaryOperator::PGRegexMatch => Ok(Operator::RegexMatch), |
| 1084 | BinaryOperator::PGRegexIMatch => Ok(Operator::RegexIMatch), |
| 1085 | BinaryOperator::PGRegexNotMatch => Ok(Operator::RegexNotMatch), |
| 1086 | BinaryOperator::PGRegexNotIMatch => Ok(Operator::RegexNotIMatch), |
| 1087 | BinaryOperator::PGILikeMatch => Ok(Operator::ILikeMatch), |
| 1088 | BinaryOperator::PGNotLikeMatch => Ok(Operator::NotLikeMatch), |
| 1089 | BinaryOperator::PGLikeMatch => Ok(Operator::LikeMatch), |
| 1090 | BinaryOperator::PGNotILikeMatch => Ok(Operator::NotILikeMatch), |
| 1091 | BinaryOperator::BitwiseAnd => Ok(Operator::BitwiseAnd), |
| 1092 | BinaryOperator::BitwiseOr => Ok(Operator::BitwiseOr), |
| 1093 | BinaryOperator::BitwiseXor => Ok(Operator::BitwiseXor), |
| 1094 | BinaryOperator::PGBitwiseShiftRight => Ok(Operator::BitwiseShiftRight), |
| 1095 | BinaryOperator::PGBitwiseShiftLeft => Ok(Operator::BitwiseShiftLeft), |
| 1096 | BinaryOperator::StringConcat => Ok(Operator::StringConcat), |
| 1097 | BinaryOperator::AtArrow => Ok(Operator::AtArrow), |
| 1098 | BinaryOperator::ArrowAt => Ok(Operator::ArrowAt), |
| 1099 | BinaryOperator::Arrow => Ok(Operator::Arrow), |
| 1100 | BinaryOperator::LongArrow => Ok(Operator::LongArrow), |
| 1101 | BinaryOperator::HashArrow => Ok(Operator::HashArrow), |
| 1102 | BinaryOperator::HashLongArrow => Ok(Operator::HashLongArrow), |
| 1103 | BinaryOperator::AtAt => Ok(Operator::AtAt), |
| 1104 | BinaryOperator::DuckIntegerDivide | BinaryOperator::MyIntegerDivide => { |
| 1105 | Ok(Operator::IntegerDivide) |
| 1106 | } |
| 1107 | BinaryOperator::HashMinus => Ok(Operator::HashMinus), |
| 1108 | BinaryOperator::AtQuestion => Ok(Operator::AtQuestion), |
| 1109 | BinaryOperator::Question => Ok(Operator::Question), |
| 1110 | BinaryOperator::QuestionAnd => Ok(Operator::QuestionAnd), |
| 1111 | BinaryOperator::QuestionPipe => Ok(Operator::QuestionPipe), |
| 1112 | _ => not_impl_err!("unsupported operation: {op:?}"), |
| 1113 | } |
| 1114 | } |
| 1115 | |
| 1116 | fn op_to_sql(&self, op: &Operator) -> Result<BinaryOperator> { |
| 1117 | match op { |