Search in sources :

Example 6 with RowExpression

use of com.alibaba.cobar.parser.ast.expression.primary.RowExpression in project cobar by alibaba.

the class MySQLDMLInsertReplaceParser method rowList.

protected List<RowExpression> rowList() throws SQLSyntaxErrorException {
    List<RowExpression> valuesList;
    List<Expression> tempRowValue = rowValue();
    if (lexer.token() == PUNC_COMMA) {
        valuesList = new LinkedList<RowExpression>();
        valuesList.add(new RowExpression(tempRowValue));
        for (; lexer.token() == PUNC_COMMA; ) {
            lexer.nextToken();
            tempRowValue = rowValue();
            valuesList.add(new RowExpression(tempRowValue));
        }
    } else {
        valuesList = new ArrayList<RowExpression>(1);
        valuesList.add(new RowExpression(tempRowValue));
    }
    return valuesList;
}
Also used : RowExpression(com.alibaba.cobar.parser.ast.expression.primary.RowExpression) Expression(com.alibaba.cobar.parser.ast.expression.Expression) RowExpression(com.alibaba.cobar.parser.ast.expression.primary.RowExpression)

Example 7 with RowExpression

use of com.alibaba.cobar.parser.ast.expression.primary.RowExpression in project cobar by alibaba.

the class MySQLOutputASTVisitor method visit.

@Override
public void visit(DMLReplaceStatement node) {
    appendable.append("REPLACE ");
    switch(node.getMode()) {
        case DELAY:
            appendable.append("DELAYED ");
            break;
        case LOW:
            appendable.append("LOW_PRIORITY ");
            break;
        case UNDEF:
            break;
        default:
            throw new IllegalArgumentException("unknown mode for INSERT: " + node.getMode());
    }
    appendable.append("INTO ");
    node.getTable().accept(this);
    appendable.append(' ');
    List<Identifier> cols = node.getColumnNameList();
    if (cols != null && !cols.isEmpty()) {
        appendable.append('(');
        printList(cols);
        appendable.append(") ");
    }
    QueryExpression select = node.getSelect();
    if (select == null) {
        appendable.append("VALUES ");
        List<RowExpression> rows = node.getRowList();
        if (rows != null && !rows.isEmpty()) {
            boolean isFst = true;
            for (RowExpression row : rows) {
                if (row == null || row.getRowExprList().isEmpty())
                    continue;
                if (isFst)
                    isFst = false;
                else
                    appendable.append(", ");
                appendable.append('(');
                printList(row.getRowExprList());
                appendable.append(')');
            }
        } else {
            throw new IllegalArgumentException("at least one row for REPLACE");
        }
    } else {
        select.accept(this);
    }
}
Also used : Identifier(com.alibaba.cobar.parser.ast.expression.primary.Identifier) RowExpression(com.alibaba.cobar.parser.ast.expression.primary.RowExpression) QueryExpression(com.alibaba.cobar.parser.ast.expression.misc.QueryExpression)

Example 8 with RowExpression

use of com.alibaba.cobar.parser.ast.expression.primary.RowExpression in project cobar by alibaba.

the class PartitionKeyVisitor method insertReplace.

private void insertReplace(DMLInsertReplaceStatement node) {
    Identifier table = node.getTable();
    List<Identifier> collist = node.getColumnNameList();
    QueryExpression query = node.getSelect();
    List<RowExpression> rows = node.getRowList();
    tableAsTableFactor(table);
    String tableName = table.getIdTextUpUnescape();
    visitChild(2, false, false, collist);
    if (query != null) {
        query.accept(this);
        return;
    }
    for (RowExpression row : rows) {
        visitChild(2, false, false, row);
    }
    Map<String, List<Object>> colVals = ensureColumnValueByTable(tableName);
    Map<String, Map<Object, Set<Pair<Expression, ASTNode>>>> colValsIndex = ensureColumnValueIndexByTable(tableName);
    if (collist != null) {
        for (int i = 0; i < collist.size(); ++i) {
            String colName = collist.get(i).getIdTextUpUnescape();
            if (isRuledColumn(tableName, colName)) {
                List<Object> valueList = ensureColumnValueList(colVals, colName);
                Map<Object, Set<Pair<Expression, ASTNode>>> valMap = ensureColumnValueIndexObjMap(colValsIndex, colName);
                for (RowExpression row : rows) {
                    Expression expr = row.getRowExprList().get(i);
                    Object value = expr == null ? null : expr.evaluation(evaluationParameter);
                    if (value != Expression.UNEVALUATABLE) {
                        valueList.add(value);
                        addIntoColumnValueIndex(valMap, value, row, node);
                    }
                }
            }
        }
    }
}
Also used : SmallSet(com.alibaba.cobar.util.SmallSet) Set(java.util.Set) HashSet(java.util.HashSet) ShowCharaterSet(com.alibaba.cobar.parser.ast.stmt.dal.ShowCharaterSet) RowExpression(com.alibaba.cobar.parser.ast.expression.primary.RowExpression) LiteralString(com.alibaba.cobar.parser.ast.expression.primary.literal.LiteralString) IndexHint(com.alibaba.cobar.parser.ast.fragment.tableref.IndexHint) Identifier(com.alibaba.cobar.parser.ast.expression.primary.Identifier) BetweenAndExpression(com.alibaba.cobar.parser.ast.expression.comparison.BetweenAndExpression) ComparisionEqualsExpression(com.alibaba.cobar.parser.ast.expression.comparison.ComparisionEqualsExpression) QueryExpression(com.alibaba.cobar.parser.ast.expression.misc.QueryExpression) InExpression(com.alibaba.cobar.parser.ast.expression.comparison.InExpression) FunctionExpression(com.alibaba.cobar.parser.ast.expression.primary.function.FunctionExpression) MatchExpression(com.alibaba.cobar.parser.ast.expression.primary.MatchExpression) ComparisionIsExpression(com.alibaba.cobar.parser.ast.expression.comparison.ComparisionIsExpression) LogicalOrExpression(com.alibaba.cobar.parser.ast.expression.logical.LogicalOrExpression) ReplacableExpression(com.alibaba.cobar.parser.ast.expression.ReplacableExpression) LogicalAndExpression(com.alibaba.cobar.parser.ast.expression.logical.LogicalAndExpression) UnaryOperatorExpression(com.alibaba.cobar.parser.ast.expression.UnaryOperatorExpression) ComparisionNullSafeEqualsExpression(com.alibaba.cobar.parser.ast.expression.comparison.ComparisionNullSafeEqualsExpression) LikeExpression(com.alibaba.cobar.parser.ast.expression.string.LikeExpression) CollateExpression(com.alibaba.cobar.parser.ast.expression.type.CollateExpression) Expression(com.alibaba.cobar.parser.ast.expression.Expression) CaseWhenOperatorExpression(com.alibaba.cobar.parser.ast.expression.primary.CaseWhenOperatorExpression) UserExpression(com.alibaba.cobar.parser.ast.expression.misc.UserExpression) PolyadicOperatorExpression(com.alibaba.cobar.parser.ast.expression.PolyadicOperatorExpression) BinaryOperatorExpression(com.alibaba.cobar.parser.ast.expression.BinaryOperatorExpression) RowExpression(com.alibaba.cobar.parser.ast.expression.primary.RowExpression) ASTNode(com.alibaba.cobar.parser.ast.ASTNode) InExpressionList(com.alibaba.cobar.parser.ast.expression.misc.InExpressionList) ArrayList(java.util.ArrayList) List(java.util.List) LinkedList(java.util.LinkedList) QueryExpression(com.alibaba.cobar.parser.ast.expression.misc.QueryExpression) Map(java.util.Map) HashMap(java.util.HashMap) Pair(com.alibaba.cobar.parser.util.Pair)

Example 9 with RowExpression

use of com.alibaba.cobar.parser.ast.expression.primary.RowExpression in project cobar by alibaba.

the class ServerRouter method dispatchInsertReplace.

@SuppressWarnings("unchecked")
private static void dispatchInsertReplace(RouteResultsetNode[] rn, DMLInsertReplaceStatement stmt, List<String> ruleColumns, Map<Integer, List<Object[]>> dataNodeMap, TableConfig matchedTable, String originalSQL, PartitionKeyVisitor visitor) {
    if (stmt.getSelect() != null) {
        dispatchWhereBasedStmt(rn, stmt, ruleColumns, dataNodeMap, matchedTable, originalSQL, visitor);
        return;
    }
    Map<String, Map<Object, Set<Pair<Expression, ASTNode>>>> colsIndex = visitor.getColumnIndex(stmt.getTable().getIdTextUpUnescape());
    if (colsIndex == null || colsIndex.isEmpty()) {
        throw new IllegalArgumentException("columns index is empty: " + originalSQL);
    }
    ArrayList<Map<Object, Set<Pair<Expression, ASTNode>>>> colsIndexList = new ArrayList<Map<Object, Set<Pair<Expression, ASTNode>>>>(ruleColumns.size());
    for (int i = 0, len = ruleColumns.size(); i < len; ++i) {
        colsIndexList.add(colsIndex.get(ruleColumns.get(i)));
    }
    int dataNodeId = -1;
    for (Entry<Integer, List<Object[]>> en : dataNodeMap.entrySet()) {
        List<Object[]> tuples = en.getValue();
        HashSet<RowExpression> replaceRowList = new HashSet<RowExpression>(tuples.size());
        for (Object[] tuple : tuples) {
            Set<Pair<Expression, ASTNode>> tupleExprs = null;
            for (int i = 0; i < tuple.length; ++i) {
                Map<Object, Set<Pair<Expression, ASTNode>>> valueMap = colsIndexList.get(i);
                Object value = tuple[i];
                Set<Pair<Expression, ASTNode>> set = getExpressionSet(valueMap, value);
                tupleExprs = (Set<Pair<Expression, ASTNode>>) CollectionUtil.intersectSet(tupleExprs, set);
            }
            if (tupleExprs == null || tupleExprs.isEmpty()) {
                throw new IllegalArgumentException("route: empty expression list for insertReplace stmt: " + originalSQL);
            }
            for (Pair<Expression, ASTNode> p : tupleExprs) {
                if (p.getValue() == stmt && p.getKey() instanceof RowExpression) {
                    replaceRowList.add((RowExpression) p.getKey());
                }
            }
        }
        stmt.setReplaceRowList(new ArrayList<RowExpression>(replaceRowList));
        String sql = genSQL(stmt, originalSQL);
        stmt.clearReplaceRowList();
        String dataNodeName = matchedTable.getDataNodes()[en.getKey()];
        rn[++dataNodeId] = new RouteResultsetNode(dataNodeName, sql);
    }
}
Also used : HashSet(java.util.HashSet) Set(java.util.Set) ArrayList(java.util.ArrayList) ASTNode(com.alibaba.cobar.parser.ast.ASTNode) ArrayList(java.util.ArrayList) LinkedList(java.util.LinkedList) List(java.util.List) InExpressionList(com.alibaba.cobar.parser.ast.expression.misc.InExpressionList) Pair(com.alibaba.cobar.parser.util.Pair) HashSet(java.util.HashSet) RowExpression(com.alibaba.cobar.parser.ast.expression.primary.RowExpression) CobarHint(com.alibaba.cobar.route.hint.CobarHint) Expression(com.alibaba.cobar.parser.ast.expression.Expression) ReplacableExpression(com.alibaba.cobar.parser.ast.expression.ReplacableExpression) RowExpression(com.alibaba.cobar.parser.ast.expression.primary.RowExpression) InExpression(com.alibaba.cobar.parser.ast.expression.comparison.InExpression) HashMap(java.util.HashMap) Map(java.util.Map)

Example 10 with RowExpression

use of com.alibaba.cobar.parser.ast.expression.primary.RowExpression in project cobar by alibaba.

the class MySQLExprParserTest method testPrimary.

public void testPrimary() throws Exception {
    String sql = "(1,2,existS (select id.* from t1))";
    MySQLExprParser parser = new MySQLExprParser(new MySQLLexer(sql));
    Expression expr = parser.expression();
    String output = output2MySQL(expr, sql);
    Assert.assertEquals("ROW(1, 2, EXISTS (SELECT id.* FROM t1))", output);
    RowExpression row = (RowExpression) expr;
    Assert.assertEquals(3, row.getRowExprList().size());
    sql = "*";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("*", output);
    Assert.assertTrue(Wildcard.class.isAssignableFrom(expr.getClass()));
    sql = "case v1 when `index` then a when 2 then b else c end";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("CASE v1 WHEN `index` THEN a WHEN 2 THEN b ELSE c END", output);
    CaseWhenOperatorExpression cw = (CaseWhenOperatorExpression) expr;
    Assert.assertEquals("v1", ((Identifier) cw.getComparee()).getIdText());
    Assert.assertEquals(2, cw.getWhenList().size());
    Assert.assertEquals("c", ((Identifier) cw.getElseResult()).getIdText());
    sql = "case  when 1=value then a  end";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("CASE WHEN 1 = value THEN a END", output);
    cw = (CaseWhenOperatorExpression) expr;
    Assert.assertNull(cw.getComparee());
    Assert.assertEquals(1, cw.getWhenList().size());
    Assert.assertNull(cw.getElseResult());
    sql = "case  when 1=`in` then a  end";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("CASE WHEN 1 = `in` THEN a END", output);
    sql = " ${INSENSITIVE}. ";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("${INSENSITIVE}", output);
    sql = "current_date, ";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("CURDATE()", output);
    sql = "CurRent_Date  (  ) ";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("CURDATE()", output);
    sql = "CurRent_TiMe   ";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("CURTIME()", output);
    sql = "CurRent_TiMe  () ";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("CURTIME()", output);
    sql = "CurRent_TimesTamp ";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("NOW()", output);
    sql = "CurRent_TimesTamp  ()";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("NOW()", output);
    sql = "localTimE";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("NOW()", output);
    sql = "localTimE  () ";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("NOW()", output);
    sql = "localTimesTamP  ";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("NOW()", output);
    sql = "localTimesTamP  () ";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("NOW()", output);
    sql = "CurRent_user ";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("CURRENT_USER()", output);
    sql = "CurRent_user  () ";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("CURRENT_USER()", output);
    sql = "default  () ";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("DEFAULT()", output);
    sql = "vaLueS(1,col1*2)";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("VALUES(1, col1 * 2)", output);
    sql = "(1,2,mod(m,n))";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("ROW(1, 2, m % n)", output);
    sql = "chaR (77,121,'77.3')";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("CHAR(77, 121, '77.3')", output);
    sql = "CHARSET(CHAR(0x65 USING utf8))";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("CHARSET(CHAR(x'65' USING utf8))", output);
    sql = "CONVERT(_latin1'Müller' USING utf8)";
    parser = new MySQLExprParser(new MySQLLexer(sql));
    expr = parser.expression();
    output = output2MySQL(expr, sql);
    Assert.assertEquals("CONVERT(_latin1'Müller' USING utf8)", output);
// QS_TODO
}
Also used : MySQLLexer(com.alibaba.cobar.parser.recognizer.mysql.lexer.MySQLLexer) CaseWhenOperatorExpression(com.alibaba.cobar.parser.ast.expression.primary.CaseWhenOperatorExpression) RegexpExpression(com.alibaba.cobar.parser.ast.expression.string.RegexpExpression) LogicalAndExpression(com.alibaba.cobar.parser.ast.expression.logical.LogicalAndExpression) UnaryOperatorExpression(com.alibaba.cobar.parser.ast.expression.UnaryOperatorExpression) MinusExpression(com.alibaba.cobar.parser.ast.expression.arithmeic.MinusExpression) ArithmeticMultiplyExpression(com.alibaba.cobar.parser.ast.expression.arithmeic.ArithmeticMultiplyExpression) ComparisionLessThanOrEqualsExpression(com.alibaba.cobar.parser.ast.expression.comparison.ComparisionLessThanOrEqualsExpression) ComparisionNullSafeEqualsExpression(com.alibaba.cobar.parser.ast.expression.comparison.ComparisionNullSafeEqualsExpression) BetweenAndExpression(com.alibaba.cobar.parser.ast.expression.comparison.BetweenAndExpression) LikeExpression(com.alibaba.cobar.parser.ast.expression.string.LikeExpression) TernaryOperatorExpression(com.alibaba.cobar.parser.ast.expression.TernaryOperatorExpression) ArithmeticSubtractExpression(com.alibaba.cobar.parser.ast.expression.arithmeic.ArithmeticSubtractExpression) BitAndExpression(com.alibaba.cobar.parser.ast.expression.bit.BitAndExpression) ComparisionEqualsExpression(com.alibaba.cobar.parser.ast.expression.comparison.ComparisionEqualsExpression) NegativeValueExpression(com.alibaba.cobar.parser.ast.expression.logical.NegativeValueExpression) SoundsLikeExpression(com.alibaba.cobar.parser.ast.expression.string.SoundsLikeExpression) QueryExpression(com.alibaba.cobar.parser.ast.expression.misc.QueryExpression) CastBinaryExpression(com.alibaba.cobar.parser.ast.expression.type.CastBinaryExpression) InExpression(com.alibaba.cobar.parser.ast.expression.comparison.InExpression) ArithmeticIntegerDivideExpression(com.alibaba.cobar.parser.ast.expression.arithmeic.ArithmeticIntegerDivideExpression) CollateExpression(com.alibaba.cobar.parser.ast.expression.type.CollateExpression) BitInvertExpression(com.alibaba.cobar.parser.ast.expression.bit.BitInvertExpression) BitXORExpression(com.alibaba.cobar.parser.ast.expression.bit.BitXORExpression) LogicalNotExpression(com.alibaba.cobar.parser.ast.expression.logical.LogicalNotExpression) Expression(com.alibaba.cobar.parser.ast.expression.Expression) BitShiftExpression(com.alibaba.cobar.parser.ast.expression.bit.BitShiftExpression) AssignmentExpression(com.alibaba.cobar.parser.ast.expression.misc.AssignmentExpression) CaseWhenOperatorExpression(com.alibaba.cobar.parser.ast.expression.primary.CaseWhenOperatorExpression) BitOrExpression(com.alibaba.cobar.parser.ast.expression.bit.BitOrExpression) ComparisionGreaterThanOrEqualsExpression(com.alibaba.cobar.parser.ast.expression.comparison.ComparisionGreaterThanOrEqualsExpression) LogicalXORExpression(com.alibaba.cobar.parser.ast.expression.logical.LogicalXORExpression) UserExpression(com.alibaba.cobar.parser.ast.expression.misc.UserExpression) ArithmeticAddExpression(com.alibaba.cobar.parser.ast.expression.arithmeic.ArithmeticAddExpression) PolyadicOperatorExpression(com.alibaba.cobar.parser.ast.expression.PolyadicOperatorExpression) ComparisionNotEqualsExpression(com.alibaba.cobar.parser.ast.expression.comparison.ComparisionNotEqualsExpression) BinaryOperatorExpression(com.alibaba.cobar.parser.ast.expression.BinaryOperatorExpression) RowExpression(com.alibaba.cobar.parser.ast.expression.primary.RowExpression) ComparisionIsExpression(com.alibaba.cobar.parser.ast.expression.comparison.ComparisionIsExpression) LogicalOrExpression(com.alibaba.cobar.parser.ast.expression.logical.LogicalOrExpression) ComparisionLessThanExpression(com.alibaba.cobar.parser.ast.expression.comparison.ComparisionLessThanExpression) ArithmeticModExpression(com.alibaba.cobar.parser.ast.expression.arithmeic.ArithmeticModExpression) ComparisionGreaterThanExpression(com.alibaba.cobar.parser.ast.expression.comparison.ComparisionGreaterThanExpression) ArithmeticDivideExpression(com.alibaba.cobar.parser.ast.expression.arithmeic.ArithmeticDivideExpression) ComparisionLessOrGreaterThanExpression(com.alibaba.cobar.parser.ast.expression.comparison.ComparisionLessOrGreaterThanExpression) Wildcard(com.alibaba.cobar.parser.ast.expression.primary.Wildcard) RowExpression(com.alibaba.cobar.parser.ast.expression.primary.RowExpression) LiteralString(com.alibaba.cobar.parser.ast.expression.primary.literal.LiteralString)

Aggregations

RowExpression (com.alibaba.cobar.parser.ast.expression.primary.RowExpression)11 Expression (com.alibaba.cobar.parser.ast.expression.Expression)9 QueryExpression (com.alibaba.cobar.parser.ast.expression.misc.QueryExpression)8 InExpression (com.alibaba.cobar.parser.ast.expression.comparison.InExpression)6 Identifier (com.alibaba.cobar.parser.ast.expression.primary.Identifier)6 BetweenAndExpression (com.alibaba.cobar.parser.ast.expression.comparison.BetweenAndExpression)5 ComparisionEqualsExpression (com.alibaba.cobar.parser.ast.expression.comparison.ComparisionEqualsExpression)5 ComparisionIsExpression (com.alibaba.cobar.parser.ast.expression.comparison.ComparisionIsExpression)5 ComparisionNullSafeEqualsExpression (com.alibaba.cobar.parser.ast.expression.comparison.ComparisionNullSafeEqualsExpression)5 LogicalAndExpression (com.alibaba.cobar.parser.ast.expression.logical.LogicalAndExpression)5 LogicalOrExpression (com.alibaba.cobar.parser.ast.expression.logical.LogicalOrExpression)5 UserExpression (com.alibaba.cobar.parser.ast.expression.misc.UserExpression)5 CaseWhenOperatorExpression (com.alibaba.cobar.parser.ast.expression.primary.CaseWhenOperatorExpression)5 LikeExpression (com.alibaba.cobar.parser.ast.expression.string.LikeExpression)5 CollateExpression (com.alibaba.cobar.parser.ast.expression.type.CollateExpression)5 Pair (com.alibaba.cobar.parser.util.Pair)4 BinaryOperatorExpression (com.alibaba.cobar.parser.ast.expression.BinaryOperatorExpression)3 PolyadicOperatorExpression (com.alibaba.cobar.parser.ast.expression.PolyadicOperatorExpression)3 UnaryOperatorExpression (com.alibaba.cobar.parser.ast.expression.UnaryOperatorExpression)3 ArithmeticAddExpression (com.alibaba.cobar.parser.ast.expression.arithmeic.ArithmeticAddExpression)3