You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "zstan (via GitHub)" <gi...@apache.org> on 2024/05/07 07:38:04 UTC
Re: [PR] IGNITE-22000 Get rid of unnecessary conversion of DDL commands [ignite-3]
zstan commented on code in PR #3691:
URL: https://github.com/apache/ignite-3/pull/3691#discussion_r1591949243
##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/AlterTableDropColumnCommand.java:
##########
@@ -146,6 +148,8 @@ private static class Builder implements AlterTableDropColumnCommandBuilder {
private String tableName;
+ private boolean ifExists;
Review Comment:
if column exists or table exists ?
##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/AlterZoneSetDefaultCommand.java:
##########
@@ -31,20 +31,24 @@
/**
* A command that set specified zone as default.
*/
-public class AlterZoneSetDefaultCatalogCommand extends AbstractZoneCommand {
+public class AlterZoneSetDefaultCommand extends AbstractZoneCommand {
/** Returns builder to create a command that set specified zone as default. */
public static Builder builder() {
- return new AlterZoneSetDefaultCatalogCommand.Builder();
+ return new AlterZoneSetDefaultCommand.Builder();
}
+ private final boolean ifExists;
+
/**
* Constructor.
*
* @param zoneName Name of the zone.
* @throws CatalogValidationException if any of restrictions above is violated.
*/
- private AlterZoneSetDefaultCatalogCommand(String zoneName) throws CatalogValidationException {
+ private AlterZoneSetDefaultCommand(String zoneName, boolean ifExists) throws CatalogValidationException {
Review Comment:
fix javadoc
##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/AlterTableAddColumnCommand.java:
##########
@@ -53,15 +53,17 @@ public static AlterTableAddColumnCommandBuilder builder() {
*
* @param tableName Name of the table to add new columns to. Should not be null or blank.
* @param schemaName Name of the schema the table of interest belongs to. Should not be null or blank.
+ * @param ifTableExists Flag indicating whether the {@code IF EXISTS} was specified.
* @param columns List of the columns to add to the table. There should be at least one column.
* @throws CatalogValidationException if any of restrictions above is violated.
*/
private AlterTableAddColumnCommand(
String tableName,
String schemaName,
+ boolean ifTableExists,
List<ColumnParams> columns
) throws CatalogValidationException {
- super(schemaName, tableName);
+ super(schemaName, tableName, ifTableExists);
Review Comment:
it`s strange to see such a flag here.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org