[BUG] JSQLParser 4.8 : Clickhouse : Optional specifier not visualizing
danielpetrov01 opened this issue · comments
Failing SQL Feature:
When creating a new AlterExpression and setting an optionalSpecifier, it isnt added to the AlterExpression.
This is needed for ClickHouse due to the fact that for example in MySql CHANGE [COLUMN] col1 col2 has an optional specifier COLUMN. In Clickhouse this change statement, when col1 <> col2, is equivalent to RENAME COLUMN col1 TO col2 and then MODIFY COLUMN col2.
Java Example:
AlterExpression renameExpression = new AlterExpression();
renameExpression.setOperation(AlterOperation.RENAME);
renameExpression.setOptionalSpecifier("COLUMN");
renameExpression.setColumnOldName("col1");
renameExpression.setColumnName("col2");
Software Information:
- JSqlParser version 4.8
- Database Clickhouse