core/src/main/java/org/apache/hop/core/sql/SqlCondition.java
private List<String> splitConditionClause(String clause) throws HopSqlException {
    List<String> strings = new ArrayList<>();

    String[] operators =
        new String[] {
          "<>",
          ">=",
          "=>",
          "<=",
          "=<",
          "<",
          ">",
          "=",
          " REGEX ",
          " IN ",
          " IS NOT NULL",
          " IS NULL",
          " LIKE",
          "CONTAINS "
        };
    int[] functions =
        new int[] {
          Condition.FUNC_NOT_EQUAL,
          Condition.FUNC_LARGER_EQUAL,
          Condition.FUNC_LARGER_EQUAL,
          Condition.FUNC_SMALLER_EQUAL,
          Condition.FUNC_SMALLER_EQUAL,
          Condition.FUNC_SMALLER,
          Condition.FUNC_LARGER,
          Condition.FUNC_EQUAL,
          Condition.FUNC_REGEXP,
          Condition.FUNC_IN_LIST,
          Condition.FUNC_NOT_NULL,
          Condition.FUNC_NULL,
          Condition.FUNC_LIKE,
          Condition.FUNC_CONTAINS
        };
    int index = 0;

    while (index < clause.length()) {
      index = ThinUtil.skipChars(clause, index, '\'', '"');
      for (String operator : operators) {
        if (index <= clause.length() - operator.length()) {
          if (clause.substring(index).toUpperCase().startsWith(operator)) {
            int functionIndex = Const.indexOfString(operator, operators);

            // OK, we found an operator.
            // The part before is the first string
            //
            String left = Const.trim(clause.substring(0, index));
            String op = Condition.functions[functions[functionIndex]];
            String right = Const.trim(clause.substring(index + operator.length()));

            return Arrays.asList(left, op, right);
          }
        }
      }

      index++;
    }

    return strings;
  }
/**
   * We need to split conditions on a single operator (for now)
   *
   * @param clause
   * @return 3 string list (left, operator, right)
   * @throws HopSqlException
   */
We need to split conditions on a single operator (for now)
@param clause
@return 3 string list (left, operator, right)
@throws HopSqlException
We need to split conditions on a single operator ( for now ) @param clause @return 3 string list ( left operator right ) @throws HopSqlException
private List<String> splitConditionClause(String clause) throws HopSqlException {
    List<String> strings = new ArrayList<>();
    String[] operators =
        new String[] {
          "<>",
          ">=",
          "=>",
          "<=",
          "=<",
          "<",
          ">",
          "=",
          " REGEX ",
          " IN ",
          " IS NOT NULL",
          " IS NULL",
          " LIKE",
          "CONTAINS "
        };
    int[] functions =
        new int[] {
          Condition.FUNC_NOT_EQUAL,
          Condition.FUNC_LARGER_EQUAL,
          Condition.FUNC_LARGER_EQUAL,
          Condition.FUNC_SMALLER_EQUAL,
          Condition.FUNC_SMALLER_EQUAL,
          Condition.FUNC_SMALLER,
          Condition.FUNC_LARGER,
          Condition.FUNC_EQUAL,
          Condition.FUNC_REGEXP,
          Condition.FUNC_IN_LIST,
          Condition.FUNC_NOT_NULL,
          Condition.FUNC_NULL,
          Condition.FUNC_LIKE,
          Condition.FUNC_CONTAINS
        };
    int index = 0;
    while (index < clause.length()) {
      index = ThinUtil.skipChars(clause, index, '\'', '"');
      for (String operator : operators) {
        if (index <= clause.length() - operator.length()) {
          if (clause.substring(index).toUpperCase().startsWith(operator)) {
            int functionIndex = Const.indexOfString(operator, operators);
            String left = Const.trim(clause.substring(0, index));
            String op = Condition.functions[functions[functionIndex]];
            String right = Const.trim(clause.substring(index + operator.length()));
            return Arrays.asList(left, op, right);
          }
        }
      }
      index++;
    }
    return strings;
  }
private List < String > splitConditionClause ( String clause ) throws HopSqlException { List < String > strings = new ArrayList < > ( ) ; String [ ] operators = new String [ ] { "<>" , ">=" , "=>" , "<=" , "=<" , "<" , ">" , "=" , " REGEX " , " IN " , " IS NOT NULL" , " IS NULL" , " LIKE" , "CONTAINS " } ; int [ ] functions = new int [ ] { Condition . FUNC_NOT_EQUAL , Condition . FUNC_LARGER_EQUAL , Condition . FUNC_LARGER_EQUAL , Condition . FUNC_SMALLER_EQUAL , Condition . FUNC_SMALLER_EQUAL , Condition . FUNC_SMALLER , Condition . FUNC_LARGER , Condition . FUNC_EQUAL , Condition . FUNC_REGEXP , Condition . FUNC_IN_LIST , Condition . FUNC_NOT_NULL , Condition . FUNC_NULL , Condition . FUNC_LIKE , Condition . FUNC_CONTAINS } ; int index = 0 ; while ( index < clause . length ( ) ) { index = ThinUtil . skipChars ( clause , index , '\'' , '"' ) ; for ( String operator : operators ) { if ( index <= clause . length ( ) - operator . length ( ) ) { if ( clause . substring ( index ) . toUpperCase ( ) . startsWith ( operator ) ) { int functionIndex = Const . indexOfString ( operator , operators ) ; String left = Const . trim ( clause . substring ( 0 , index ) ) ; String op = Condition . functions [ functions [ functionIndex ] ] ; String right = Const . trim ( clause . substring ( index + operator . length ( ) ) ) ; return Arrays . asList ( left , op , right ) ; } } } index ++ ; } return strings ; }
We need to split conditions on a single operator (for now)
 @param clause
 @return 3 string list (left, operator, right)
 @throws HopSqlException
We need to split conditions on a single operator ( for now ) @param clause @return 3 string list ( left operator right ) @throws HopSqlException
// OK, we found an operator. // The part before is the first string //