joewee commented on PR #4326:
URL: https://github.com/apache/calcite/pull/4326#issuecomment-2822805219

   > I add a test in `SqlParserTest`, it can work. Did I miss something?
   > 
   > ```
   >   @Test void test01() {
   >     sql("delete from emp where deptno = 1")
   >             .ok("DELETE FROM `EMP`\n"
   >             + "WHERE (`DEPTNO` = 1)");
   >   }
   > ```
   
   You can reproduce this case as below:
   ```
   @Test void testSqlDeleteSqlBasicCallToString() {
       final SqlParserPos parserPos = SqlParserPos.ZERO;
       final SqlIdentifier employees = new SqlIdentifier("employees", 
parserPos);
       final SqlCall where = SqlStdOperatorTable.EQUALS.createCall(
           parserPos,
           new SqlIdentifier("id", parserPos),
           SqlLiteral.createExactNumeric("1", parserPos));
       SqlDelete sqlDelete = new SqlDelete(parserPos,employees, where, null, 
null);
       final SqlCall call =
               SqlDelete.OPERATOR.createCall(sqlDelete.getFunctionQuantifier(),
               sqlDelete.getParserPosition(),
               sqlDelete.getOperandList());
       assertThat(call, hasToString(sqlDelete.toString()));
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to