I agree that that query should throw when executed. If it doesn’t, you should log a bug.However, that test in SqlToRelConverterTest doesn’t prove that Calcite doesn’t throw at execute time.On Feb 8, 2023, at 11:20 PM, stanilovsky evgeny <[email protected]> wrote:Hello, seems sql standard regulate situation when insertion (char, varchar) data exceeds fixed len column as :If the declared type T is fixed length string with length in characters L and thelength in characters M of V is larger than L, then Case:a) If the right part M–L characters of V are all space`s, then the value of T is set to the firstL characters of V.b) If one or more of the right part M–L characters of V are not space`s, then exception is raised.But fast test [1] in SqlToRelConverterTest highlights that calcite not satisfy of such a rule.I miss something or need to fill the issue ? Thanks ! [1] @Test void testInsert1() { String moreThanVarcharLimit = "a".repeat(30);final String sql = "insert into emp (empno, ename, job, mgr, hiredate,\n"+ " sal, comm, deptno, slacker)\n" + "values(1, '" + moreThanVarcharLimit + "', 'job', 0,\n" + " timestamp '1970-01-01 00:00:00', 1, 1, 1, false)"; sql(sql).ok(); }
Ok, thanks i understand what you are talking about, i will move the test
and fill issue if it necessary.
- Insert data exceeding fixed length column. stanilovsky evgeny
- Re: Insert data exceeding fixed length column. Julian Hyde
- Re: Insert data exceeding fixed length column. stanilovsky evgeny
- Re: Insert data exceeding fixed length col... stanilovsky evgeny
