core/src/test/java/org/apache/hop/core/sql/SqlConditionTest.java
@Test
  public void testInNumberDecimalCondition() throws Exception {
    IRowMeta rowMeta = SqlTest.generateNumberRowMeta();

    String fieldsClause = "A";
    String conditionClause = "A IN (123.456, -123.456)";

    // Correctness of the next statement is tested in SqlFieldsTest
    //
    SqlFields fields = new SqlFields("Service", rowMeta, fieldsClause);

    SqlCondition sqlCondition = new SqlCondition("Service", conditionClause, rowMeta, fields);
    Condition condition = sqlCondition.getCondition();

    assertNotNull(condition);
    assertFalse(condition.isEmpty());
    assertTrue(condition.isAtomic());
    assertEquals(Condition.FUNC_IN_LIST, condition.getFunction());

    assertEquals(fieldsClause, condition.getLeftValuename());
    assertEquals("123.456;-123.456", condition.getRightExactString());
  }
/**
   * Test IN-clause with decimal numbers should not truncate the number.
   *
   * @throws Exception
   */
Test IN-clause with decimal numbers should not truncate the number.
@throws Exception
Test IN - clause with decimal numbers should not truncate the number . @throws Exception
@Test
  public void testInNumberDecimalCondition() throws Exception {
    IRowMeta rowMeta = SqlTest.generateNumberRowMeta();
    String fieldsClause = "A";
    String conditionClause = "A IN (123.456, -123.456)";
    SqlFields fields = new SqlFields("Service", rowMeta, fieldsClause);
    SqlCondition sqlCondition = new SqlCondition("Service", conditionClause, rowMeta, fields);
    Condition condition = sqlCondition.getCondition();
    assertNotNull(condition);
    assertFalse(condition.isEmpty());
    assertTrue(condition.isAtomic());
    assertEquals(Condition.FUNC_IN_LIST, condition.getFunction());
    assertEquals(fieldsClause, condition.getLeftValuename());
    assertEquals("123.456;-123.456", condition.getRightExactString());
  }
@ Test public void testInNumberDecimalCondition ( ) throws Exception { IRowMeta rowMeta = SqlTest . generateNumberRowMeta ( ) ; String fieldsClause = "A" ; String conditionClause = "A IN (123.456, -123.456)" ; SqlFields fields = new SqlFields ( "Service" , rowMeta , fieldsClause ) ; SqlCondition sqlCondition = new SqlCondition ( "Service" , conditionClause , rowMeta , fields ) ; Condition condition = sqlCondition . getCondition ( ) ; assertNotNull ( condition ) ; assertFalse ( condition . isEmpty ( ) ) ; assertTrue ( condition . isAtomic ( ) ) ; assertEquals ( Condition . FUNC_IN_LIST , condition . getFunction ( ) ) ; assertEquals ( fieldsClause , condition . getLeftValuename ( ) ) ; assertEquals ( "123.456;-123.456" , condition . getRightExactString ( ) ) ; }
Test IN-clause with decimal numbers should not truncate the number.
Test IN - clause with decimal numbers should not truncate the number .
// Correctness of the next statement is tested in SqlFieldsTest //