Kevin Liew created CALCITE-1727:
-----------------------------------

             Summary: Update to a target column with a source value of 
incorrect data-type does not fail
                 Key: CALCITE-1727
                 URL: https://issues.apache.org/jira/browse/CALCITE-1727
             Project: Calcite
          Issue Type: Bug
            Reporter: Kevin Liew
            Assignee: Julian Hyde


The following test case fails to throw any exception:
{code:java}
  @Test public void testUpdateFailDataType() {
    tester.checkQueryFails("update emp"
        + " set empno = '5', deptno = 1, ename = 'Bob'"
        + " where deptno = 10",
        "Cannot assign to target field 'EMPNO' of type INTEGER from source 
field 'EXPR$0' of type CHAR(1)");
  }
{code}

An exception is thrown for the {{INSERT}} case and we expect an exception for 
the {{UPDATE}} case as well.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to