You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/04/17 14:55:43 UTC
[shardingsphere] branch master updated: Spotless formatting code (#16886)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new a1719f43219 Spotless formatting code (#16886)
a1719f43219 is described below
commit a1719f432192df6f513752cef27a81ed0a72b18e
Author: 龙台 Long Tai <77...@users.noreply.github.com>
AuthorDate: Sun Apr 17 22:55:34 2022 +0800
Spotless formatting code (#16886)
* Optimize code format according to spotless.
* Optimize code format according to spotless.
* Fix ci errors caused by spotless code formatting.
---
.../agent/api/point/PluginInterceptorPoint.java | 2 +-
.../core/plugin/PluginBootServiceManager.java | 2 +-
.../agent/core/spi/AgentServiceLoader.java | 2 +-
.../InstanceMethodAroundInterceptorTest.java | 4 +-
.../api/advice/CommandExecutorTaskAdvice.java | 2 +-
.../metrics/api/advice/SQLRouteEngineAdvice.java | 2 +-
.../metrics/prometheus/wrapper/CounterWrapper.java | 2 +-
.../prometheus/wrapper/HistogramWrapper.java | 2 +-
.../tracing/jaeger/constant/JaegerConstants.java | 8 +--
.../advice/CommandExecutorTaskAdvice.java | 8 +--
.../advice/JDBCExecutorCallbackAdvice.java | 8 +--
.../advice/SQLParserEngineAdvice.java | 8 +--
...penTelemetryTracingPluginDefinitionService.java | 24 +++----
.../OpenTelemetryTracingPluginBootService.java | 4 +-
.../service/ZipkinTracingPluginBootService.java | 2 +-
.../db/protocol/error/CommonErrorCode.java | 2 +-
.../mysql/constant/MySQLBinaryColumnType.java | 10 +--
.../mysql/constant/MySQLServerErrorCode.java | 4 +-
.../column/value/time/MySQLFractionalSeconds.java | 2 +-
.../packet/command/MySQLCommandPacketType.java | 2 +-
.../command/query/MySQLColumnFieldDetailFlag.java | 30 ++++----
.../query/text/MySQLTextResultSetRowPacket.java | 4 +-
.../MySQLStringLenencBinaryProtocolValueTest.java | 4 +-
.../text/MySQLTextResultSetRowPacketTest.java | 2 +-
.../MySQLAuthSwitchRequestPacketTest.java | 2 +-
.../MySQLHandshakeResponse41PacketTest.java | 32 ++++-----
.../mysql/payload/MySQLPacketPayloadTest.java | 6 +-
.../constant/PostgreSQLAuthenticationMethod.java | 2 +-
.../constant/PostgreSQLMessageSeverityLevel.java | 22 +++---
.../command/query/PostgreSQLColumnDescription.java | 2 +-
.../bind/protocol/PostgreSQLByteConverter.java | 2 +-
...PostgreSQLBoolArrayBinaryProtocolValueTest.java | 2 +-
.../bind/protocol/PostgreSQLByteConverterTest.java | 13 ++--
...stgreSQLFloat4ArrayBinaryProtocolValueTest.java | 2 +-
...stgreSQLFloat8ArrayBinaryProtocolValueTest.java | 2 +-
...PostgreSQLInt2ArrayBinaryProtocolValueTest.java | 2 +-
...PostgreSQLInt4ArrayBinaryProtocolValueTest.java | 2 +-
...PostgreSQLInt8ArrayBinaryProtocolValueTest.java | 2 +-
.../PostgreSQLNumericBinaryProtocolValueTest.java | 13 ++--
...stgreSQLStringArrayBinaryProtocolValueTest.java | 2 +-
...tabaseDiscoveryDataSourceRuleConfiguration.java | 2 +-
.../DatabaseDiscoveryRuleStatementConverter.java | 3 +-
.../mysql/type/MGRDatabaseDiscoveryTypeTest.java | 2 +-
.../opengauss/OpenGaussDatabaseDiscoveryType.java | 10 +--
.../encrypt/spi/context/EncryptColumnDataType.java | 2 +-
.../encrypt/algorithm/SM4EncryptAlgorithm.java | 2 +-
.../merge/dal/impl/EncryptColumnsMergedResult.java | 4 +-
.../metadata/EncryptTableMetaDataBuilder.java | 2 +-
.../condition/impl/EncryptEqualCondition.java | 2 +-
.../rewrite/condition/impl/EncryptInCondition.java | 2 +-
.../context/EncryptSQLRewriteContextDecorator.java | 2 +-
.../rewrite/token/EncryptTokenGenerateBuilder.java | 2 +-
.../EncryptInsertOnUpdateTokenGenerator.java | 2 +-
.../token/pojo/EncryptFunctionAssignmentToken.java | 2 +-
.../token/pojo/EncryptLiteralAssignmentToken.java | 2 +-
.../impl/EncryptCreateTableTokenGeneratorTest.java | 2 +-
.../rewrite/impl/EncryptEqualConditionTest.java | 2 +-
.../encrypt/rule/EncryptRuleTest.java | 4 +-
.../encrypt/rule/EncryptTableTest.java | 2 +-
...cryptTableRuleConfigurationYamlSwapperTest.java | 4 +-
.../DropEncryptRuleStatementUpdaterTest.java | 2 +-
.../boot/EncryptRuleSpringBootConfiguration.java | 1 -
.../WeightReplicaLoadBalanceAlgorithm.java | 2 +-
.../ReadwriteSplittingDistSQLStatementVisitor.java | 2 +-
.../dml/ShadowDeleteStatementRoutingEngine.java | 2 +-
.../dml/ShadowInsertStatementRoutingEngine.java | 2 +-
.../dml/ShadowUpdateStatementRoutingEngine.java | 2 +-
.../AlterShadowAlgorithmStatementUpdater.java | 2 +-
.../CreateShadowAlgorithmStatementUpdaterTest.java | 4 +-
.../statement/AlterShadowAlgorithmStatement.java | 2 +-
.../parser/statement/AlterShadowRuleStatement.java | 2 +-
.../CreateDefaultShadowAlgorithmStatement.java | 2 +-
.../statement/CreateShadowRuleStatement.java | 2 +-
.../parser/statement/DropShadowRuleStatement.java | 2 +-
.../api/config/ShardingRuleConfiguration.java | 2 +-
...AlgorithmProvidedShardingRuleConfiguration.java | 2 +-
.../keygen/SnowflakeKeyGenerateAlgorithm.java | 2 +-
.../classbased/ClassBasedShardingAlgorithm.java | 30 ++++----
.../ClassBasedShardingAlgorithmStrategyType.java | 6 +-
.../metadata/ShardingTableMetaDataBuilder.java | 6 +-
.../ShardingSQLRewriteContextDecorator.java | 2 +-
.../impl/ShardingPaginationParameterRewriter.java | 2 +-
.../generator/impl/ProjectionsTokenGenerator.java | 2 +-
.../sharding/route/engine/condition/Column.java | 2 +-
.../engine/condition/ExpressionConditionUtils.java | 4 +-
.../type/complex/ShardingComplexRoutingEngine.java | 4 +-
.../type/unicast/ShardingUnicastRoutingEngine.java | 2 +-
.../ddl/ShardingDDLStatementValidator.java | 2 +-
.../dml/impl/ShardingInsertStatementValidator.java | 4 +-
.../dml/impl/ShardingUpdateStatementValidator.java | 6 +-
.../type/standard/StandardShardingStrategy.java | 4 +-
.../yaml/config/YamlShardingRuleConfiguration.java | 2 +-
.../ClassBasedShardingAlgorithmTest.java | 4 +-
...osIdSnowflakeIntervalShardingAlgorithmTest.java | 4 +-
.../AutoIntervalShardingAlgorithmTest.java | 16 ++---
.../inline/InlineShardingAlgorithmTest.java | 10 +--
.../sharding/mod/HashModShardingAlgorithmTest.java | 4 +-
.../sharding/mod/ModShardingAlgorithmTest.java | 8 +--
.../iterator/IteratorStreamMergedResultTest.java | 2 +-
.../merge/dql/orderby/OrderByValueTest.java | 36 +++++-----
.../metadata/ShardingTableMetaDataBuilderTest.java | 2 +-
.../complex/ShardingComplexRoutingEngineTest.java | 6 +-
.../engine/type/standard/AbstractSQLRouteTest.java | 2 +-
.../ShardingStandardRoutingEngineTest.java | 8 +--
.../ShardingAlterTableStatementValidatorTest.java | 8 +--
.../ShardingCreateTableStatementValidatorTest.java | 8 +--
.../ShardingDropIndexStatementValidatorTest.java | 8 +--
.../ShardingDropTableStatementValidatorTest.java | 8 +--
.../ddl/ShardingPrepareStatementValidatorTest.java | 6 +-
.../dml/ShardingInsertStatementValidatorTest.java | 14 ++--
.../dml/ShardingUpdateStatementValidatorTest.java | 4 +-
.../AlgorithmProvidedShardingRuleBuilderTest.java | 2 +-
.../rule/builder/ShardingRuleBuilderTest.java | 2 +-
...rdingTableRulesUsedAlgorithmQueryResultSet.java | 14 ++--
.../AlterShardingAlgorithmStatementUpdater.java | 2 +-
.../AlterShardingKeyGeneratorStatementUpdater.java | 2 +-
.../statement/segment/InputOrOutputSegment.java | 4 +-
.../ShardingScalingRuleConfigurationSegment.java | 10 +--
.../parser/segment/ShardingStrategySegment.java | 2 +-
.../DropShardingKeyGeneratorStatement.java | 2 +-
...owShardingTableRulesUsedAlgorithmStatement.java | 6 +-
.../factorybean/ShardingAlgorithmFactoryBean.java | 2 +-
.../segment/insert/values/InsertValueContext.java | 2 +-
.../insert/values/OnDuplicateUpdateContext.java | 2 +-
.../select/pagination/PaginationContext.java | 5 +-
.../engine/TopPaginationContextEngine.java | 3 +-
.../segment/select/projection/DerivedColumn.java | 10 +--
.../select/projection/engine/ProjectionEngine.java | 6 +-
.../projection/impl/ParameterMarkerProjection.java | 12 ++--
.../infra/binder/segment/table/TablesContext.java | 2 +-
.../statement/ddl/CreateTableStatementContext.java | 2 +-
.../engine/GeneratedKeyContextEngineTest.java | 2 +-
.../insert/values/InsertValueContextTest.java | 7 +-
.../select/pagination/PaginationContextTest.java | 4 +-
.../binder/segment/table/TablesContextTest.java | 8 +--
.../statement/impl/InsertStatementContextTest.java | 2 +-
.../DataSourceGeneratedDatabaseConfiguration.java | 3 +-
.../config/props/ConfigurationPropertyKey.java | 4 +-
.../metadata/dialect/H2DataSourceMetaData.java | 8 +--
.../shardingsphere/infra/datanode/DataNode.java | 2 +-
.../pool/creator/DataSourcePoolCreator.java | 2 +-
.../datasource/props/DataSourceProperties.java | 12 ++--
.../registry/GlobalDataSourceRegistry.java | 10 +--
.../infra/datasource/registry/Instance.java | 5 +-
.../rule/RequiredAlgorithmMissedException.java | 2 +-
.../schema/builder/SystemSchemaBuilderRule.java | 4 +-
.../loader/dialect/H2TableMetaDataLoader.java | 26 +++----
.../loader/dialect/MySQLTableMetaDataLoader.java | 6 +-
.../dialect/PostgreSQLTableMetaDataLoader.java | 6 +-
.../user/yaml/swapper/UserYamlSwapper.java | 4 +-
.../shardingsphere/infra/schedule/CronJob.java | 2 +-
.../infra/storage/StorageNodeDataSource.java | 2 +-
.../YamlOnRuleAlteredActionConfiguration.java | 4 +-
.../dialect/PostgreSQLTableMetaDataLoaderTest.java | 6 +-
.../schema/util/TableMetaDataUtilTest.java | 2 +-
.../infra/context/kernel/KernelProcessorTest.java | 2 +-
.../infra/executor/check/SQLCheckEngine.java | 8 +--
.../original/FederationTableStatistic.java | 10 +--
.../converter/SQLNodeConverterEngine.java | 2 +-
.../segment/expression/ExpressionConverter.java | 2 +-
.../impl/BetweenExpressionConverter.java | 2 +-
.../impl/BinaryOperationExpressionConverter.java | 2 +-
.../segment/expression/impl/FunctionConverter.java | 2 +-
.../expression/impl/InExpressionConverter.java | 2 +-
.../expression/impl/ListExpressionConverter.java | 2 +-
.../segment/from/impl/SimpleTableConverter.java | 2 +-
.../segment/from/impl/SubqueryTableConverter.java | 2 +-
.../segment/orderby/OrderByConverter.java | 2 +-
.../orderby/item/ColumnOrderByItemConverter.java | 4 +-
.../item/ExpressionOrderByItemConverter.java | 2 +-
.../segment/projection/ProjectionsConverter.java | 4 +-
.../impl/AggregationProjectionConverter.java | 6 +-
.../impl/ShorthandProjectionConverter.java | 2 +-
.../statement/SelectStatementConverter.java | 2 +-
.../metadata/FederationTableMetaData.java | 2 +-
.../parser/cache/SQLStatementCacheBuilder.java | 4 +-
.../infra/parser/sql/SQLStatementParserEngine.java | 2 +-
.../builder/impl/StandardParameterBuilder.java | 4 +-
.../infra/rewrite/sql/impl/AbstractSQLBuilder.java | 4 +-
.../generator/generic/RemoveTokenGenerator.java | 2 +-
.../rewrite/context/SQLRewriteContextTest.java | 8 +--
.../engine/GenericSQLRewriteEngineTest.java | 2 +-
.../rewrite/engine/RouteSQLRewriteEngineTest.java | 12 ++--
.../ShardingSpherePipelineDataSourceCreator.java | 2 +-
.../driver/executor/DriverJDBCExecutor.java | 2 +-
.../metadata/ShardingSphereDatabaseMetaData.java | 14 ++--
.../core/resultset/DatabaseMetaDataResultSet.java | 4 +-
.../core/resultset/GeneratedKeysResultSet.java | 4 +-
.../driver/jdbc/core/resultset/ResultSetUtil.java | 6 +-
.../core/resultset/ShardingSphereResultSet.java | 6 +-
.../AbstractUnsupportedOperationConnection.java | 2 +-
.../AbstractUnsupportedOperationStatement.java | 2 +-
.../driver/state/DriverStateContext.java | 2 +-
.../connection/CircuitBreakerConnection.java | 4 +-
.../circuit/resultset/CircuitBreakerResultSet.java | 4 +-
.../circuit/statement/CircuitBreakerStatement.java | 6 +-
.../batch/BatchPreparedStatementExecutorTest.java | 14 ++--
.../jdbc/adapter/ResultSetGetterAdapterTest.java | 8 +--
.../resultset/ShardingSphereResultSetTest.java | 8 +--
.../driver/state/DriverStateContextTest.java | 2 +-
.../spring/boot/util/PropertyUtil.java | 4 +-
.../ShardingSphereAlgorithmBeanRegistryTest.java | 2 +-
...vilegesPermittedAuthorityProviderAlgorithm.java | 8 +--
.../core/api/impl/RuleAlteredJobAPIImpl.java | 2 +-
.../datasource/AbstractDataSourcePreparer.java | 4 +-
.../rulealtered/RuleAlteredJobPreparer.java | 8 +--
.../scenario/rulealtered/RuleAlteredJobWorker.java | 6 +-
.../pipeline/mysql/ingest/client/ConnectInfo.java | 10 +--
.../mysql/ingest/client/InternalResultSet.java | 1 -
.../ingest/wal/decode/MppdbDecodingPlugin.java | 1 -
.../datasource/OpenGaussDataSourcePreparer.java | 2 +-
.../ingest/wal/decode/MppdbDecodingPluginTest.java | 4 +-
.../postgresql/importer/PostgreSQLImporter.java | 1 -
.../postgresql/ingest/wal/WalEventConverter.java | 2 +-
.../ingest/wal/decode/BaseLogSequenceNumber.java | 2 +-
.../ingest/wal/decode/BaseTimestampUtils.java | 2 +-
.../wal/decode/PostgreSQLLogSequenceNumber.java | 4 +-
.../wal/decode/PostgreSQLTimestampUtils.java | 4 +-
.../data/pipeline/api/ingest/record/Record.java | 2 +-
.../parser/constant/SQLParserOrder.java | 2 +-
.../DefaultSQLParserRuleConfigurationBuilder.java | 2 +-
...LParserCacheOptionConfigurationYamlSwapper.java | 1 -
.../SQLParserRuleConfigurationYamlSwapper.java | 4 +-
.../metadata/SingleTableMetaDataBuilderTest.java | 2 +-
.../route/SingleTableRouteEngineTest.java | 6 +-
.../singletable/rule/SingleTableRuleTest.java | 32 ++++-----
.../annotation/ShardingSphereTransactionType.java | 1 -
.../spi/ShardingSphereTransactionManager.java | 2 +-
.../SeataATShardingSphereTransactionManager.java | 8 +--
...eataATShardingSphereTransactionManagerTest.java | 2 +-
.../xa/XAShardingSphereTransactionManager.java | 4 +-
.../dialect/SQLServerXADataSourceDefinition.java | 1 -
.../config/NarayanaConfigurationFileGenerator.java | 6 +-
.../DataSourceXAResourceRecoveryHelper.java | 2 +-
.../mode/metadata/MetaDataContexts.java | 2 +-
.../mode/metadata/MetaDataContextsBuilderTest.java | 2 +-
.../mode/metadata/MetaDataContextsTest.java | 2 +-
.../persist/MetaDataPersistServiceTest.java | 2 +-
.../ClusterContextManagerCoordinator.java | 8 +--
.../config/event/schema/SchemaChangedEvent.java | 2 +-
.../metadata/watcher/MetaDataChangedWatcher.java | 10 +--
.../status/compute/event/WorkerIdEvent.java | 2 +-
.../watcher/ComputeNodeStateChangedWatcher.java | 2 +-
.../ComputeNodeStateChangedWatcherTest.java | 6 +-
.../cluster/etcd/props/EtcdPropertyKey.java | 2 +-
.../cluster/etcd/EtcdRepositoryTest.java | 8 +--
.../jdbc/JDBCDatabaseCommunicationEngine.java | 4 +-
.../swapper/YamlProxyConfigurationSwapper.java | 12 ++--
.../YamlProxyDataSourceConfigurationSwapper.java | 2 +-
.../proxy/backend/session/ConnectionSession.java | 14 ++--
.../session/transaction/TransactionStatus.java | 6 +-
.../backend/text/admin/FunctionWithException.java | 2 +-
.../executor/AbstractDatabaseMetadataExecutor.java | 8 +--
.../distsql/ral/common/enums/VariableEnum.java | 4 +-
.../ral/common/updatable/ApplyDistSQLHandler.java | 2 +-
.../common/updatable/DiscardDistSQLHandler.java | 2 +-
.../common/updatable/PrepareDistSQLHandler.java | 2 +-
.../rql/resource/DataSourceQueryResultSet.java | 2 +-
.../transaction/TransactionBackendHandler.java | 2 +-
.../text/transaction/TransactionSetHandler.java | 6 +-
.../text/transaction/TransactionXAHandler.java | 14 ++--
.../proxy/backend/util/TransactionUtil.java | 4 +-
.../jdbc/datasource/JDBCBackendDataSourceTest.java | 2 +-
.../context/BackendExecutorContextTest.java | 2 +-
.../query/impl/MySQLQueryHeaderBuilderTest.java | 4 +-
.../DatabaseOperateBackendHandlerFactoryTest.java | 2 +-
.../mysql/executor/UseDatabaseExecutorTest.java | 2 +-
.../distsql/DistSQLBackendHandlerFactoryTest.java | 4 +-
.../queryable/ShowInstanceModeHandlerTest.java | 2 +-
.../updatable/AlterTrafficRuleHandlerTest.java | 4 +-
.../updatable/CreateTrafficRuleHandlerTest.java | 4 +-
.../updatable/SetVariableBackendHandlerTest.java | 2 +-
.../proxy/frontend/ShardingSphereProxy.java | 2 +-
.../frontend/command/CommandExecutorTask.java | 2 +-
.../FrontendTooManyConnectionsException.java | 2 +-
.../FrontDatabaseProtocolTypeFactoryTest.java | 4 +-
.../authentication/MySQLAuthenticationHandler.java | 2 +-
.../binary/prepare/MySQLComStmtPrepareChecker.java | 20 +++---
.../prepare/MySQLComStmtPrepareCheckerTest.java | 23 ++++---
.../bind/OpenGaussComBatchBindExecutorTest.java | 2 +-
.../PostgreSQLAuthenticationHandler.java | 2 +-
.../PostgreSQLBatchedStatementsExecutor.java | 6 +-
.../PostgreSQLAuthenticationHandlerTest.java | 2 +-
.../PostgreSQLMD5PasswordAuthenticatorTest.java | 4 +-
.../PostgreSQLPasswordAuthenticatorTest.java | 4 +-
...egatedBatchedStatementsCommandExecutorTest.java | 2 +-
.../PostgreSQLComDescribeExecutorTest.java | 2 +-
.../mysql/command/ReactiveMySQLFrontendEngine.java | 4 +-
.../frontend/authentication/Authenticator.java | 2 +-
.../parser/mysql/visitor/MySQLSQLStatVisitor.java | 2 +-
.../visitor/format/impl/MySQLFormatSQLVisitor.java | 6 +-
.../impl/MySQLDALStatementSQLVisitor.java | 20 +++---
.../impl/MySQLDCLStatementSQLVisitor.java | 2 +-
.../statement/impl/MySQLRLStatementSQLVisitor.java | 3 +-
.../statement/impl/MySQLStatementSQLVisitor.java | 32 +++++----
.../impl/MySQLTCLStatementSQLVisitor.java | 2 +-
.../impl/OpenGaussDALStatementSQLVisitor.java | 2 +-
.../impl/OpenGaussDDLStatementSQLVisitor.java | 10 +--
.../impl/OpenGaussStatementSQLVisitor.java | 8 +--
.../impl/OracleDCLStatementSQLVisitor.java | 2 +-
.../impl/OracleDDLStatementSQLVisitor.java | 74 ++++++++++----------
.../impl/OracleDMLStatementSQLVisitor.java | 18 ++---
.../statement/impl/OracleStatementSQLVisitor.java | 12 ++--
.../impl/OracleTCLStatementSQLVisitor.java | 2 +-
.../impl/PostgreSQLDALStatementSQLVisitor.java | 2 +-
.../impl/PostgreSQLDDLStatementSQLVisitor.java | 48 ++++++-------
.../impl/PostgreSQLStatementSQLVisitor.java | 8 +--
.../impl/SQL92DDLStatementSQLVisitor.java | 2 +-
.../statement/impl/SQL92StatementSQLVisitor.java | 4 +-
.../impl/SQL92TCLStatementSQLVisitor.java | 4 +-
.../impl/SQLServerDCLStatementSQLVisitor.java | 2 +-
.../impl/SQLServerDDLStatementSQLVisitor.java | 80 +++++++++++-----------
.../impl/SQLServerStatementSQLVisitor.java | 28 ++++----
.../core/database/visitor/SQLVisitorRule.java | 26 +++----
.../sql/parser/sql/common/constant/JoinType.java | 6 +-
.../parser/sql/common/constant/OperationScope.java | 4 +-
.../sql/common/constant/TransactionAccessType.java | 4 +-
.../common/constant/TransactionIsolationLevel.java | 4 +-
.../ddl/index/DropIndexDefinitionSegment.java | 6 +-
.../sql/common/segment/ddl/index/IndexSegment.java | 3 +-
.../common/segment/dml/expr/BetweenExpression.java | 1 -
.../order/item/ExpressionOrderByItemSegment.java | 4 +-
.../sql/common/util/ExpressionExtractUtil.java | 2 +-
.../sql/parser/sql/common/util/SQLUtil.java | 4 +-
.../handler/dml/DeleteStatementHandler.java | 2 +-
.../statement/mysql/dml/MySQLSelectStatement.java | 2 +-
.../mysql/segment/CloneActionSegment.java | 8 +--
.../ddl/OpenGaussCreateSequenceStatement.java | 1 -
.../ddl/PostgreSQLCreateSequenceStatement.java | 1 -
.../driver/AbstractYamlDataSourceTest.java | 2 +-
.../test/mysql/env/config/SourceConfiguration.java | 2 +-
.../scaling/test/mysql/util/ScalingUtil.java | 4 +-
.../atomic/storage/StorageContainerFactory.java | 2 +-
.../compose/ComposedContainerRegistry.java | 2 +-
.../integration/framework/watcher/ITWatcher.java | 4 +-
.../segment/assignment/AssignmentAssert.java | 2 +-
.../asserts/segment/lock/LockClauseAssert.java | 2 +-
.../asserts/segment/output/OutputClauseAssert.java | 4 +-
.../asserts/segment/packages/PackageAssert.java | 3 +-
.../segment/projection/ProjectionAssert.java | 10 +--
.../asserts/segment/table/TableAssert.java | 8 +--
.../asserts/segment/type/TypeAssert.java | 2 +-
.../asserts/segment/with/WithClauseAssert.java | 4 +-
.../statement/AbstractSQLStatementAssert.java | 2 +-
.../asserts/statement/SQLStatementAssert.java | 2 +-
.../dal/impl/ShowReplicaStatusStatementAssert.java | 2 +-
.../dal/impl/ShowSlaveHostsStatementAssert.java | 2 +-
.../dal/impl/ShowSlaveStatusStatementAssert.java | 2 +-
.../dal/impl/ShowTriggersStatementAssert.java | 2 +-
.../dcl/impl/mysql/MySQLRevokeStatementAssert.java | 1 -
.../sqlserver/SQLServerRevokeStatementAssert.java | 1 -
.../ddl/impl/AlterSynonymStatementAssert.java | 2 +-
.../ddl/impl/FlashbackTableStatementAssert.java | 2 +-
.../ExportSchemaConfigurationStatementAssert.java | 2 +-
.../UpdatableScalingRALStatementAssert.java | 2 +-
.../rdl/alter/AlterRuleStatementAssert.java | 2 +-
...lterDefaultShardingStrategyStatementAssert.java | 8 +--
...AlterDefaultSingleTableRuleStatementAssert.java | 4 +-
.../impl/AlterShadowAlgorithmStatementAssert.java | 2 +-
.../alter/impl/AlterShadowRuleStatementAssert.java | 4 +-
.../DisableShardingScalingRuleStatementAssert.java | 2 +-
.../EnableShardingScalingRuleStatementAssert.java | 2 +-
...reateDefaultShadowAlgorithmStatementAssert.java | 2 +-
...eateDefaultShardingStrategyStatementAssert.java | 8 +--
...reateDefaultSingleTableRuleStatementAssert.java | 4 +-
.../impl/CreateEncryptRuleStatementAssert.java | 2 +-
.../impl/CreateShadowAlgorithmStatementAssert.java | 2 +-
.../impl/CreateShadowRuleStatementAssert.java | 4 +-
.../DropShardingScalingRuleStatementAssert.java | 2 +-
.../statement/dml/impl/DeleteStatementAssert.java | 2 +-
.../statement/dml/impl/InsertStatementAssert.java | 6 +-
.../statement/dml/impl/MergeStatementAssert.java | 4 +-
.../statement/dml/impl/SelectStatementAssert.java | 4 +-
.../statement/dml/impl/UpdateStatementAssert.java | 4 +-
.../jaxb/cases/domain/SQLParserTestCases.java | 42 ++++++------
.../AbstractExpectedDelimiterSQLSegment.java | 2 +-
.../AbstractExpectedIdentifierSQLSegment.java | 2 +-
.../impl/call/ExpectedProcedureParameters.java | 2 +-
.../segment/impl/clone/ExpectedInstance.java | 8 +--
.../segment/impl/distsql/ExpectedAlgorithm.java | 2 +-
.../segment/impl/distsql/ExpectedCacheOption.java | 4 +-
.../impl/distsql/ExpectedSQLParserRule.java | 4 +-
.../impl/distsql/rdl/ExpectedEncryptColumn.java | 2 +-
.../impl/distsql/rdl/ExpectedShardingStrategy.java | 2 +-
.../scaling/ExpectedInputOrOutputSegment.java | 6 +-
.../segment/impl/expr/ExpectedExpression.java | 2 +-
.../segment/impl/function/ExpectedFunction.java | 4 +-
.../domain/segment/impl/index/ExpectedIndex.java | 2 +-
.../segment/impl/index/ExpectedIndextype.java | 2 +-
.../segment/impl/lock/ExpectedLockClause.java | 2 +-
.../impl/orderby/item/ExpectedOrderByItem.java | 2 +-
.../item/impl/ExpectedExpressionOrderByItem.java | 2 +-
.../segment/impl/packages/ExpectedPackage.java | 2 +-
.../impl/projection/ExpectedProjections.java | 2 +-
.../expression/ExpectedExpressionProjection.java | 8 +--
.../impl/reset/ExpectedResetOptionSegment.java | 6 +-
.../segment/impl/table/ExpectedJoinTable.java | 8 +--
.../domain/segment/impl/table/ExpectedTable.java | 2 +-
.../domain/segment/impl/type/ExpectedType.java | 2 +-
.../segment/impl/where/ExpectedWhereClause.java | 2 +-
.../statement/dal/CloneStatementTestCase.java | 1 -
.../statement/dal/ShowIndexStatementTestCase.java | 2 +-
.../statement/ddl/AnalyzeStatementTestCase.java | 3 +-
.../ddl/CreateTableStatementTestCase.java | 2 +-
.../ddl/FlashbackTableStatementTestCase.java | 2 +-
.../ral/AlterTrafficRuleStatementTestCase.java | 2 +-
.../ral/CreateTrafficRuleStatementTestCase.java | 2 +-
...ExportSchemaConfigurationStatementTestCase.java | 2 +-
.../ral/ShowTrafficRulesStatementTestCase.java | 2 +-
...isableShardingScalingRuleStatementTestCase.java | 2 +-
...EnableShardingScalingRuleStatementTestCase.java | 2 +-
...CreateShardingScalingRuleStatementTestCase.java | 4 +-
...ropDefaultSingleTableRuleStatementTestCase.java | 2 +-
.../DropShardingScalingRuleStatementTestCase.java | 2 +-
.../statement/dml/CallStatementTestCase.java | 4 +-
.../statement/dml/SelectStatementTestCase.java | 6 +-
.../statement/tcl/RollbackStatementTestCase.java | 2 +-
.../statement/tcl/SavepointStatementTestCase.java | 2 +-
.../jaxb/sql/loader/SQLCasesLoader.java | 4 +-
.../rulealtered/RuleAlteredJobPreparerTest.java | 2 +-
.../AbstractSQLRewriterParameterizedTest.java | 9 +--
.../SQLRewriteEngineTestParametersBuilder.java | 2 +-
422 files changed, 1071 insertions(+), 1086 deletions(-)
diff --git a/shardingsphere-agent/shardingsphere-agent-api/src/main/java/org/apache/shardingsphere/agent/api/point/PluginInterceptorPoint.java b/shardingsphere-agent/shardingsphere-agent-api/src/main/java/org/apache/shardingsphere/agent/api/point/PluginInterceptorPoint.java
index c28259b1832..557bda0e3a1 100644
--- a/shardingsphere-agent/shardingsphere-agent-api/src/main/java/org/apache/shardingsphere/agent/api/point/PluginInterceptorPoint.java
+++ b/shardingsphere-agent/shardingsphere-agent-api/src/main/java/org/apache/shardingsphere/agent/api/point/PluginInterceptorPoint.java
@@ -232,7 +232,7 @@ public final class PluginInterceptorPoint {
private final Builder builder;
private final ElementMatcher<? super MethodDescription> matcher;
-
+
private String classNameOfAdvice;
private ConstructorPointBuilder(final Builder builder, final ElementMatcher<? super MethodDescription> matcher) {
diff --git a/shardingsphere-agent/shardingsphere-agent-core/src/main/java/org/apache/shardingsphere/agent/core/plugin/PluginBootServiceManager.java b/shardingsphere-agent/shardingsphere-agent-core/src/main/java/org/apache/shardingsphere/agent/core/plugin/PluginBootServiceManager.java
index fb4aba8d974..4574ac7a4d8 100644
--- a/shardingsphere-agent/shardingsphere-agent-core/src/main/java/org/apache/shardingsphere/agent/core/plugin/PluginBootServiceManager.java
+++ b/shardingsphere-agent/shardingsphere-agent-core/src/main/java/org/apache/shardingsphere/agent/core/plugin/PluginBootServiceManager.java
@@ -44,7 +44,7 @@ public final class PluginBootServiceManager {
*/
public static void startAllServices(final Map<String, PluginConfiguration> pluginConfigurationMap) {
Set<String> ignoredPluginNames = AgentConfigurationRegistry.INSTANCE.get(AgentConfiguration.class).getIgnoredPluginNames();
- for (Entry<String, PluginConfiguration> entry: pluginConfigurationMap.entrySet()) {
+ for (Entry<String, PluginConfiguration> entry : pluginConfigurationMap.entrySet()) {
if (!ignoredPluginNames.isEmpty() && ignoredPluginNames.contains(entry.getKey())) {
continue;
}
diff --git a/shardingsphere-agent/shardingsphere-agent-core/src/main/java/org/apache/shardingsphere/agent/core/spi/AgentServiceLoader.java b/shardingsphere-agent/shardingsphere-agent-core/src/main/java/org/apache/shardingsphere/agent/core/spi/AgentServiceLoader.java
index 9a1715017c9..49036404f44 100644
--- a/shardingsphere-agent/shardingsphere-agent-core/src/main/java/org/apache/shardingsphere/agent/core/spi/AgentServiceLoader.java
+++ b/shardingsphere-agent/shardingsphere-agent-core/src/main/java/org/apache/shardingsphere/agent/core/spi/AgentServiceLoader.java
@@ -34,7 +34,7 @@ public final class AgentServiceLoader<T> {
private final Map<Class<?>, Collection<T>> serviceMap = new ConcurrentHashMap<>();
private final Class<T> service;
-
+
private AgentServiceLoader(final Class<T> service) {
this.service = service;
register(service);
diff --git a/shardingsphere-agent/shardingsphere-agent-core/src/test/java/org/apache/shardingsphere/agent/core/plugin/interceptor/InstanceMethodAroundInterceptorTest.java b/shardingsphere-agent/shardingsphere-agent-core/src/test/java/org/apache/shardingsphere/agent/core/plugin/interceptor/InstanceMethodAroundInterceptorTest.java
index c0359f4e1b5..fabbb71df99 100644
--- a/shardingsphere-agent/shardingsphere-agent-core/src/test/java/org/apache/shardingsphere/agent/core/plugin/interceptor/InstanceMethodAroundInterceptorTest.java
+++ b/shardingsphere-agent/shardingsphere-agent-core/src/test/java/org/apache/shardingsphere/agent/core/plugin/interceptor/InstanceMethodAroundInterceptorTest.java
@@ -69,8 +69,8 @@ public final class InstanceMethodAroundInterceptorTest {
@Parameters
public static Collection<Object[]> prepareData() {
return Arrays.asList(
- new Object[]{false, "mock", "invocation", new String[]{"before", "on", "after"}},
- new Object[]{true, "mock", "rebase invocation method", new String[]{"before", "after"}},
+ new Object[]{false, "mock", "invocation", new String[]{"before", "on", "after"}},
+ new Object[]{true, "mock", "rebase invocation method", new String[]{"before", "after"}},
new Object[]{false, "mockWithException", null, new String[]{"before", "exception", "after"}});
}
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-api/src/main/java/org/apache/shardingsphere/agent/metrics/api/advice/CommandExecutorTaskAdvice.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-api/src/main/java/org/apache/shardingsphere/agent/metrics/api/advice/CommandExecutorTaskAdvice.java
index 60ae528d8be..96485f04af0 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-api/src/main/java/org/apache/shardingsphere/agent/metrics/api/advice/CommandExecutorTaskAdvice.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-api/src/main/java/org/apache/shardingsphere/agent/metrics/api/advice/CommandExecutorTaskAdvice.java
@@ -47,7 +47,7 @@ public final class CommandExecutorTaskAdvice implements InstanceMethodAroundAdvi
ElapsedTimeThreadLocal.INSTANCE.set(System.currentTimeMillis());
}
}
-
+
@Override
public void afterMethod(final AdviceTargetObject target, final Method method, final Object[] args, final MethodInvocationResult result) {
if (COMMAND_EXECUTOR_RUN.equals(method.getName())) {
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-api/src/main/java/org/apache/shardingsphere/agent/metrics/api/advice/SQLRouteEngineAdvice.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-api/src/main/java/org/apache/shardingsphere/agent/metrics/api/advice/SQLRouteEngineAdvice.java
index 6b2e292a339..7247fd1571c 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-api/src/main/java/org/apache/shardingsphere/agent/metrics/api/advice/SQLRouteEngineAdvice.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-api/src/main/java/org/apache/shardingsphere/agent/metrics/api/advice/SQLRouteEngineAdvice.java
@@ -64,7 +64,7 @@ public final class SQLRouteEngineAdvice implements InstanceMethodAroundAdvice {
MetricsPool.get(MetricIds.ROUTE_SQL_SELECT).ifPresent(MetricsWrapper::inc);
}
}
-
+
@Override
public void afterMethod(final AdviceTargetObject target, final Method method, final Object[] args, final MethodInvocationResult result) {
RouteContext routeContext = (RouteContext) result.getResult();
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-prometheus/src/main/java/org/apache/shardingsphere/agent/metrics/prometheus/wrapper/CounterWrapper.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-prometheus/src/main/java/org/apache/shardingsphere/agent/metrics/prometheus/wrapper/CounterWrapper.java
index 7eb852f621f..89fe6b29968 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-prometheus/src/main/java/org/apache/shardingsphere/agent/metrics/prometheus/wrapper/CounterWrapper.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-prometheus/src/main/java/org/apache/shardingsphere/agent/metrics/prometheus/wrapper/CounterWrapper.java
@@ -30,7 +30,7 @@ public final class CounterWrapper implements MetricsWrapper {
private final Counter counter;
@Override
- public void inc(final double value) {
+ public void inc(final double value) {
counter.inc(value);
}
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-prometheus/src/main/java/org/apache/shardingsphere/agent/metrics/prometheus/wrapper/HistogramWrapper.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-prometheus/src/main/java/org/apache/shardingsphere/agent/metrics/prometheus/wrapper/HistogramWrapper.java
index e42a7b89351..ebc64fd541f 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-prometheus/src/main/java/org/apache/shardingsphere/agent/metrics/prometheus/wrapper/HistogramWrapper.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-prometheus/src/main/java/org/apache/shardingsphere/agent/metrics/prometheus/wrapper/HistogramWrapper.java
@@ -30,7 +30,7 @@ public final class HistogramWrapper implements MetricsWrapper {
private final Histogram histogram;
@Override
- public void observe(final double value) {
+ public void observe(final double value) {
histogram.observe(value);
}
}
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-jaeger/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/jaeger/constant/JaegerConstants.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-jaeger/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/jaeger/constant/JaegerConstants.java
index 5e5bc3c3a59..cba3dc4efbf 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-jaeger/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/jaeger/constant/JaegerConstants.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-jaeger/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/jaeger/constant/JaegerConstants.java
@@ -38,13 +38,13 @@ public final class JaegerConstants {
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public static final class ErrorLogTagKeys {
-
+
public static final String EVENT = "event";
-
+
public static final String EVENT_ERROR_TYPE = "error";
-
+
public static final String ERROR_KIND = "error.kind";
-
+
public static final String MESSAGE = "message";
}
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/CommandExecutorTaskAdvice.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/CommandExecutorTaskAdvice.java
index 3e183d98eba..334054b161a 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/CommandExecutorTaskAdvice.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/CommandExecutorTaskAdvice.java
@@ -34,9 +34,9 @@ import java.lang.reflect.Method;
* Command executor task advice.
*/
public class CommandExecutorTaskAdvice implements InstanceMethodAroundAdvice {
-
+
private static final String OPERATION_NAME = "/ShardingSphere/rootInvoke/";
-
+
@Override
public void beforeMethod(final AdviceTargetObject target, final Method method, final Object[] args, final MethodInvocationResult result) {
SpanBuilder spanBuilder = GlobalOpenTelemetry.getTracer("shardingsphere-agent")
@@ -47,13 +47,13 @@ public class CommandExecutorTaskAdvice implements InstanceMethodAroundAdvice {
target.setAttachment(span);
ExecutorDataMap.getValue().put(OpenTelemetryConstants.ROOT_SPAN, span);
}
-
+
@Override
public void afterMethod(final AdviceTargetObject target, final Method method, final Object[] args, final MethodInvocationResult result) {
((Span) target.getAttachment()).end();
ExecutorDataMap.getValue().remove(OpenTelemetryConstants.ROOT_SPAN);
}
-
+
@Override
public void onThrowing(final AdviceTargetObject target, final Method method, final Object[] args, final Throwable throwable) {
((Span) target.getAttachment()).setStatus(StatusCode.ERROR).recordException(throwable);
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/JDBCExecutorCallbackAdvice.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/JDBCExecutorCallbackAdvice.java
index 851f93da17b..4935ef128e2 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/JDBCExecutorCallbackAdvice.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/JDBCExecutorCallbackAdvice.java
@@ -40,9 +40,9 @@ import java.util.Map;
* JDBC executor callback advice.
*/
public class JDBCExecutorCallbackAdvice implements InstanceMethodAroundAdvice {
-
+
private static final String OPERATION_NAME = "/ShardingSphere/executeSQL/";
-
+
@Override
@SneakyThrows
@SuppressWarnings("unchecked")
@@ -66,12 +66,12 @@ public class JDBCExecutorCallbackAdvice implements InstanceMethodAroundAdvice {
.setAttribute(OpenTelemetryConstants.DB_BIND_VARIABLES, executionUnit.getExecutionUnit().getSqlUnit().getParameters().toString());
target.setAttachment(spanBuilder.startSpan());
}
-
+
@Override
public void afterMethod(final AdviceTargetObject target, final Method method, final Object[] args, final MethodInvocationResult result) {
((Span) target.getAttachment()).end();
}
-
+
@Override
public void onThrowing(final AdviceTargetObject target, final Method method, final Object[] args, final Throwable throwable) {
((Span) target.getAttachment()).setStatus(StatusCode.ERROR).recordException(throwable);
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/SQLParserEngineAdvice.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/SQLParserEngineAdvice.java
index 82d9b563cd7..61845ff8b89 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/SQLParserEngineAdvice.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/SQLParserEngineAdvice.java
@@ -35,9 +35,9 @@ import java.lang.reflect.Method;
* SQL parser engine advice.
*/
public class SQLParserEngineAdvice implements InstanceMethodAroundAdvice {
-
+
private static final String OPERATION_NAME = "/ShardingSphere/parseSQL/";
-
+
@Override
public void beforeMethod(final AdviceTargetObject target, final Method method, final Object[] args, final MethodInvocationResult result) {
Span root = (Span) ExecutorDataMap.getValue().get(OpenTelemetryConstants.ROOT_SPAN);
@@ -51,12 +51,12 @@ public class SQLParserEngineAdvice implements InstanceMethodAroundAdvice {
}
target.setAttachment(spanBuilder.startSpan());
}
-
+
@Override
public void afterMethod(final AdviceTargetObject target, final Method method, final Object[] args, final MethodInvocationResult result) {
((Span) target.getAttachment()).end();
}
-
+
@Override
public void onThrowing(final AdviceTargetObject target, final Method method, final Object[] args, final Throwable throwable) {
((Span) target.getAttachment()).setStatus(StatusCode.ERROR).recordException(throwable);
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/definition/OpenTelemetryTracingPluginDefinitionService.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/definition [...]
index 2be8e0fd76b..f5d0f332ef1 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/definition/OpenTelemetryTracingPluginDefinitionService.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/definition/OpenTelemetryTracingPluginDefinitionService.java
@@ -24,27 +24,27 @@ import org.apache.shardingsphere.agent.spi.definition.AbstractPluginDefinitionSe
* OpenTelemetry plugin definition service.
*/
public class OpenTelemetryTracingPluginDefinitionService extends AbstractPluginDefinitionService {
-
+
private static final String COMMAND_EXECUTOR_TASK_ENHANCE_CLASS = "org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask";
-
+
private static final String COMMAND_EXECUTOR_METHOD_NAME = "run";
-
+
private static final String COMMAND_EXECUTOR_TASK_ADVICE_CLASS = "org.apache.shardingsphere.agent.plugin.tracing.opentelemetry.advice.CommandExecutorTaskAdvice";
-
+
private static final String SQL_PARSER_ENGINE_ENHANCE_CLASS = "org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine";
-
+
private static final String SQL_PARSER_ENGINE_METHOD_NAME = "parse";
-
+
private static final String SQL_PARSER_ENGINE_ADVICE_CLASS = "org.apache.shardingsphere.agent.plugin.tracing.opentelemetry.advice.SQLParserEngineAdvice";
-
+
private static final String JDBC_EXECUTOR_CALLBACK_ENGINE_ENHANCE_CLASS = "org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback";
-
+
private static final String JDBC_EXECUTOR_METHOD_NAME = "execute";
-
+
private static final String JDBC_EXECUTOR_UNIT_ENGINE_ENHANCE_CLASS = "org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutionUnit";
-
+
private static final String JDBC_EXECUTOR_CALLBACK_ADVICE_CLASS = "org.apache.shardingsphere.agent.plugin.tracing.opentelemetry.advice.JDBCExecutorCallbackAdvice";
-
+
@Override
public void defineInterceptors() {
defineInterceptor(COMMAND_EXECUTOR_TASK_ENHANCE_CLASS)
@@ -62,7 +62,7 @@ public class OpenTelemetryTracingPluginDefinitionService extends AbstractPluginD
.implement(JDBC_EXECUTOR_CALLBACK_ADVICE_CLASS)
.build();
}
-
+
@Override
public String getType() {
return "OpenTelemetry";
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/service/OpenTelemetryTracingPluginBootService.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/service/OpenTelemet [...]
index 4b44f6e7d6b..16380aa7082 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/service/OpenTelemetryTracingPluginBootService.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/service/OpenTelemetryTracingPluginBootService.java
@@ -30,11 +30,11 @@ public class OpenTelemetryTracingPluginBootService implements PluginBootService
// tracer will be created
sdk.getTracer("shardingsphere-agent");
}
-
+
@Override
public void close() {
}
-
+
@Override
public String getType() {
return "OpenTelemetry";
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/service/ZipkinTracingPluginBootService.java b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/service/ZipkinTracingPluginBootService.java
index 7a205dafed4..9072f9af8b7 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/service/ZipkinTracingPluginBootService.java
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracing/shardingsphere-agent-tracing-zipkin/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/zipkin/service/ZipkinTracingPluginBootService.java
@@ -64,7 +64,7 @@ public final class ZipkinTracingPluginBootService implements PluginBootService {
zipkinSpanHandler.close();
}
if (null != sender) {
- sender.close();
+ sender.close();
}
}
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-core/src/main/java/org/apache/shardingsphere/db/protocol/error/CommonErrorCode.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-core/src/main/java/org/apache/shardingsphere/db/protocol/error/CommonErrorCode.java
index b20bc4b0593..f7a145d62c1 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-core/src/main/java/org/apache/shardingsphere/db/protocol/error/CommonErrorCode.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-core/src/main/java/org/apache/shardingsphere/db/protocol/error/CommonErrorCode.java
@@ -40,7 +40,7 @@ public enum CommonErrorCode implements SQLErrorCode {
TABLE_LOCKED(1302, "C1302", "The table %s of schema %s is locked"),
TOO_MANY_CONNECTIONS_EXCEPTION(1040, "08004", "Too many connections"),
-
+
RUNTIME_EXCEPTION(1997, "C1997", "Runtime exception: [%s]"),
UNSUPPORTED_COMMAND(1998, "C1998", "Unsupported command: [%s]"),
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLBinaryColumnType.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLBinaryColumnType.java
index 7f9d46a0755..3172c0832bc 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLBinaryColumnType.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLBinaryColumnType.java
@@ -35,15 +35,15 @@ import java.util.Map;
@Getter
public enum MySQLBinaryColumnType implements BinaryColumnType {
- MYSQL_TYPE_DECIMAL(0x00),
+ MYSQL_TYPE_DECIMAL(0x00),
- MYSQL_TYPE_TINY(0x01),
+ MYSQL_TYPE_TINY(0x01),
- MYSQL_TYPE_SHORT(0x02),
+ MYSQL_TYPE_SHORT(0x02),
- MYSQL_TYPE_LONG(0x03),
+ MYSQL_TYPE_LONG(0x03),
- MYSQL_TYPE_FLOAT(0x04),
+ MYSQL_TYPE_FLOAT(0x04),
MYSQL_TYPE_DOUBLE(0x05),
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCode.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCode.java
index f7b1eb0fcb9..2580c41ff85 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCode.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLServerErrorCode.java
@@ -58,8 +58,8 @@ public enum MySQLServerErrorCode implements SQLErrorCode {
ER_UNKNOWN_CHARACTER_SET(1115, "42000", "Unknown character set: '%s'"),
- ER_ERROR_ON_MODIFYING_GTID_EXECUTED_TABLE(3176, "HY000",
- "Please do not modify the %s table with an XA transaction. This is an internal system table used to store GTIDs for committed transactions. "
+ ER_ERROR_ON_MODIFYING_GTID_EXECUTED_TABLE(3176, "HY000",
+ "Please do not modify the %s table with an XA transaction. This is an internal system table used to store GTIDs for committed transactions. "
+ "Although modifying it can lead to an inconsistent GTID state, if necessary you can modify it with a non-XA transaction.");
private final int errorCode;
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/binlog/row/column/value/time/MySQLFractionalSeconds.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/binlog/row/column/value/time/MySQLFractionalSeconds.java
index 90f89126d65..0525e567285 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/binlog/row/column/value/time/MySQLFractionalSeconds.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/binlog/row/column/value/time/MySQLFractionalSeconds.java
@@ -25,7 +25,7 @@ import org.apache.shardingsphere.db.protocol.mysql.payload.MySQLPacketPayload;
* @see <a href="https://dev.mysql.com/doc/internals/en/date-and-time-data-type-representation.html">Date and Time Data Type Representation</a>
*/
public final class MySQLFractionalSeconds {
-
+
private final int fraction;
private final int fractionalSecondsPrecision;
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/MySQLCommandPacketType.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/MySQLCommandPacketType.java
index f91b1967ee9..6395e16ae12 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/MySQLCommandPacketType.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/MySQLCommandPacketType.java
@@ -254,7 +254,7 @@ public enum MySQLCommandPacketType implements CommandPacketType {
* @see <a href="https://dev.mysql.com/doc/internals/en/com-reset-connection.html">COM_RESET_CONNECTION</a>
*/
COM_RESET_CONNECTION(0x1f);
-
+
private static final Map<Integer, MySQLCommandPacketType> MYSQL_COMMAND_PACKET_TYPE_CACHE = new HashMap<>();
private final int value;
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/MySQLColumnFieldDetailFlag.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/MySQLColumnFieldDetailFlag.java
index d08644639c7..110aae7d0b1 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/MySQLColumnFieldDetailFlag.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/MySQLColumnFieldDetailFlag.java
@@ -28,35 +28,35 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Getter
public enum MySQLColumnFieldDetailFlag {
-
+
NOT_NULL(0x00000001),
-
+
PRIMARY_KEY(0x00000002),
-
+
UNIQUE_KEY(0x00000004),
-
+
MULTIPLE_KEY(0x00000008),
-
+
BLOB(0x00000010),
-
+
UNSIGNED(0x00000020),
-
+
ZEROFILL_FLAG(0x00000040),
-
+
BINARY_COLLATION(0x00000080),
-
+
ENUM(0x00000100),
-
+
AUTO_INCREMENT(0x00000200),
-
+
TIMESTAMP(0x00000400),
-
+
SET(0x00000800),
-
+
NO_DEFAULT_VALUE_FLAG(0x00001000),
-
+
ON_UPDATE_NOW_FLAG(0x00002000),
-
+
NUM_FLAG(0x00008000);
private final int value;
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/text/MySQLTextResultSetRowPacket.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/text/MySQLTextResultSetRowPacket.java
index c1b6f1c2b84..caf25f42208 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/text/MySQLTextResultSetRowPacket.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/text/MySQLTextResultSetRowPacket.java
@@ -39,9 +39,9 @@ import java.util.Collection;
public final class MySQLTextResultSetRowPacket implements MySQLPacket {
private static final int NULL = 0xfb;
-
+
private static final DateTimeFormatter DT_FMT = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-
+
private final int sequenceId;
private final Collection<Object> data;
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/binary/execute/protocol/MySQLStringLenencBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/binary/execute/protocol/MySQLStringLenencBinaryProtocolValueTest.java
index a41bc06c799..b77986333d2 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/binary/execute/protocol/MySQLStringLenencBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/binary/execute/protocol/MySQLStringLenencBinaryProtocolValueTest.java
@@ -48,7 +48,7 @@ public final class MySQLStringLenencBinaryProtocolValueTest {
@Test
public void assertWriteByteArray() {
- new MySQLStringLenencBinaryProtocolValue().write(payload, new byte[] {});
- verify(payload).writeBytesLenenc(new byte[] {});
+ new MySQLStringLenencBinaryProtocolValue().write(payload, new byte[]{});
+ verify(payload).writeBytesLenenc(new byte[]{});
}
}
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/text/MySQLTextResultSetRowPacketTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/text/MySQLTextResultSetRowPacketTest.java
index bc7072e5f08..2ca09f6642f 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/text/MySQLTextResultSetRowPacketTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/command/query/text/MySQLTextResultSetRowPacketTest.java
@@ -54,7 +54,7 @@ public final class MySQLTextResultSetRowPacketTest {
public void assertWrite() {
long now = System.currentTimeMillis();
Timestamp timestamp = new Timestamp(now);
- MySQLTextResultSetRowPacket actual = new MySQLTextResultSetRowPacket(1, Arrays.asList(null, "value", BigDecimal.ONE, new byte[] {}, timestamp));
+ MySQLTextResultSetRowPacket actual = new MySQLTextResultSetRowPacket(1, Arrays.asList(null, "value", BigDecimal.ONE, new byte[]{}, timestamp));
actual.write(payload);
verify(payload).writeInt1(0xfb);
verify(payload).writeStringLenenc("value");
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/handshake/MySQLAuthSwitchRequestPacketTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/handshake/MySQLAuthSwitchRequestPacketTest.java
index 467ed9fc6cd..ffbe13dab79 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/handshake/MySQLAuthSwitchRequestPacketTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/handshake/MySQLAuthSwitchRequestPacketTest.java
@@ -39,7 +39,7 @@ public final class MySQLAuthSwitchRequestPacketTest {
@Test
public void assertWrite() {
- when(authPluginData.getAuthenticationPluginData()).thenReturn(new byte[] {0x11, 0x22});
+ when(authPluginData.getAuthenticationPluginData()).thenReturn(new byte[]{0x11, 0x22});
MySQLAuthSwitchRequestPacket authSwitchRequestPacket = new MySQLAuthSwitchRequestPacket(1, "plugin", authPluginData);
authSwitchRequestPacket.write(payload);
verify(payload).writeInt1(0xfe);
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/handshake/MySQLHandshakeResponse41PacketTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/handshake/MySQLHandshakeResponse41PacketTest.java
index 2d3761e6fc1..b4c15331926 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/handshake/MySQLHandshakeResponse41PacketTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/packet/handshake/MySQLHandshakeResponse41PacketTest.java
@@ -43,13 +43,13 @@ public final class MySQLHandshakeResponse41PacketTest {
when(payload.readInt1()).thenReturn(1, MySQLServerInfo.DEFAULT_CHARSET.getId());
when(payload.readInt4()).thenReturn(MySQLCapabilityFlag.CLIENT_CONNECT_WITH_DB.getValue(), 1000);
when(payload.readStringNul()).thenReturn("root", "sharding_db");
- when(payload.readStringNulByBytes()).thenReturn(new byte[] {1});
+ when(payload.readStringNulByBytes()).thenReturn(new byte[]{1});
MySQLHandshakeResponse41Packet actual = new MySQLHandshakeResponse41Packet(payload);
assertThat(actual.getSequenceId(), is(1));
assertThat(actual.getMaxPacketSize(), is(1000));
assertThat(actual.getCharacterSet(), is(MySQLServerInfo.DEFAULT_CHARSET.getId()));
assertThat(actual.getUsername(), is("root"));
- assertThat(actual.getAuthResponse(), is(new byte[] {1}));
+ assertThat(actual.getAuthResponse(), is(new byte[]{1}));
assertThat(actual.getCapabilityFlags(), is(MySQLCapabilityFlag.CLIENT_CONNECT_WITH_DB.getValue()));
assertThat(actual.getDatabase(), is("sharding_db"));
assertNull(actual.getAuthPluginName());
@@ -61,13 +61,13 @@ public final class MySQLHandshakeResponse41PacketTest {
when(payload.readInt1()).thenReturn(1, MySQLServerInfo.DEFAULT_CHARSET.getId());
when(payload.readInt4()).thenReturn(MySQLCapabilityFlag.CLIENT_PLUGIN_AUTH.getValue(), 1000);
when(payload.readStringNul()).thenReturn("root", MySQLAuthenticationMethod.SECURE_PASSWORD_AUTHENTICATION.getMethodName());
- when(payload.readStringNulByBytes()).thenReturn(new byte[] {1});
+ when(payload.readStringNulByBytes()).thenReturn(new byte[]{1});
MySQLHandshakeResponse41Packet actual = new MySQLHandshakeResponse41Packet(payload);
assertThat(actual.getSequenceId(), is(1));
assertThat(actual.getMaxPacketSize(), is(1000));
assertThat(actual.getCharacterSet(), is(MySQLServerInfo.DEFAULT_CHARSET.getId()));
assertThat(actual.getUsername(), is("root"));
- assertThat(actual.getAuthResponse(), is(new byte[] {1}));
+ assertThat(actual.getAuthResponse(), is(new byte[]{1}));
assertThat(actual.getCapabilityFlags(), is(MySQLCapabilityFlag.CLIENT_PLUGIN_AUTH.getValue()));
assertNull(actual.getDatabase());
assertThat(actual.getAuthPluginName(), is(MySQLAuthenticationMethod.SECURE_PASSWORD_AUTHENTICATION.getMethodName()));
@@ -79,13 +79,13 @@ public final class MySQLHandshakeResponse41PacketTest {
when(payload.readInt1()).thenReturn(1, MySQLServerInfo.DEFAULT_CHARSET.getId());
when(payload.readInt4()).thenReturn(MySQLCapabilityFlag.CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA.getValue(), 1000);
when(payload.readStringNul()).thenReturn("root");
- when(payload.readStringLenencByBytes()).thenReturn(new byte[] {1});
+ when(payload.readStringLenencByBytes()).thenReturn(new byte[]{1});
MySQLHandshakeResponse41Packet actual = new MySQLHandshakeResponse41Packet(payload);
assertThat(actual.getSequenceId(), is(1));
assertThat(actual.getMaxPacketSize(), is(1000));
assertThat(actual.getCharacterSet(), is(MySQLServerInfo.DEFAULT_CHARSET.getId()));
assertThat(actual.getUsername(), is("root"));
- assertThat(actual.getAuthResponse(), is(new byte[] {1}));
+ assertThat(actual.getAuthResponse(), is(new byte[]{1}));
assertThat(actual.getCapabilityFlags(), is(MySQLCapabilityFlag.CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA.getValue()));
assertNull(actual.getDatabase());
assertNull(actual.getAuthPluginName());
@@ -97,13 +97,13 @@ public final class MySQLHandshakeResponse41PacketTest {
when(payload.readInt1()).thenReturn(1, MySQLServerInfo.DEFAULT_CHARSET.getId(), 1);
when(payload.readInt4()).thenReturn(MySQLCapabilityFlag.CLIENT_SECURE_CONNECTION.getValue(), 1000);
when(payload.readStringNul()).thenReturn("root");
- when(payload.readStringFixByBytes(1)).thenReturn(new byte[] {1});
+ when(payload.readStringFixByBytes(1)).thenReturn(new byte[]{1});
MySQLHandshakeResponse41Packet actual = new MySQLHandshakeResponse41Packet(payload);
assertThat(actual.getSequenceId(), is(1));
assertThat(actual.getMaxPacketSize(), is(1000));
assertThat(actual.getCharacterSet(), is(MySQLServerInfo.DEFAULT_CHARSET.getId()));
assertThat(actual.getUsername(), is("root"));
- assertThat(actual.getAuthResponse(), is(new byte[] {1}));
+ assertThat(actual.getAuthResponse(), is(new byte[]{1}));
assertThat(actual.getCapabilityFlags(), is(MySQLCapabilityFlag.CLIENT_SECURE_CONNECTION.getValue()));
assertNull(actual.getDatabase());
assertNull(actual.getAuthPluginName());
@@ -113,7 +113,7 @@ public final class MySQLHandshakeResponse41PacketTest {
@Test
public void assertWriteWithDatabase() {
MySQLHandshakeResponse41Packet actual = new MySQLHandshakeResponse41Packet(1, 100, MySQLServerInfo.DEFAULT_CHARSET.getId(), "root");
- actual.setAuthResponse(new byte[] {1});
+ actual.setAuthResponse(new byte[]{1});
actual.setDatabase("sharding_db");
actual.write(payload);
verify(payload).writeInt4(MySQLCapabilityFlag.CLIENT_CONNECT_WITH_DB.getValue());
@@ -121,14 +121,14 @@ public final class MySQLHandshakeResponse41PacketTest {
verify(payload).writeInt1(MySQLServerInfo.DEFAULT_CHARSET.getId());
verify(payload).writeReserved(23);
verify(payload).writeStringNul("root");
- verify(payload).writeStringNul(new String(new byte[] {1}));
+ verify(payload).writeStringNul(new String(new byte[]{1}));
verify(payload).writeStringNul("sharding_db");
}
@Test
public void assertWriteWithAuthPluginName() {
MySQLHandshakeResponse41Packet actual = new MySQLHandshakeResponse41Packet(1, 100, MySQLServerInfo.DEFAULT_CHARSET.getId(), "root");
- actual.setAuthResponse(new byte[] {1});
+ actual.setAuthResponse(new byte[]{1});
actual.setAuthPluginName(MySQLAuthenticationMethod.SECURE_PASSWORD_AUTHENTICATION);
actual.write(payload);
verify(payload).writeInt4(MySQLCapabilityFlag.CLIENT_PLUGIN_AUTH.getValue());
@@ -136,7 +136,7 @@ public final class MySQLHandshakeResponse41PacketTest {
verify(payload).writeInt1(MySQLServerInfo.DEFAULT_CHARSET.getId());
verify(payload).writeReserved(23);
verify(payload).writeStringNul("root");
- verify(payload).writeStringNul(new String(new byte[] {1}));
+ verify(payload).writeStringNul(new String(new byte[]{1}));
verify(payload).writeStringNul(MySQLAuthenticationMethod.SECURE_PASSWORD_AUTHENTICATION.getMethodName());
}
@@ -144,21 +144,21 @@ public final class MySQLHandshakeResponse41PacketTest {
public void assertWriteWithClientPluginAuthLenencClientData() {
MySQLHandshakeResponse41Packet actual = new MySQLHandshakeResponse41Packet(1, 100, MySQLServerInfo.DEFAULT_CHARSET.getId(), "root");
actual.setCapabilityFlags(MySQLCapabilityFlag.CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA.getValue());
- actual.setAuthResponse(new byte[] {1});
+ actual.setAuthResponse(new byte[]{1});
actual.write(payload);
verify(payload).writeInt4(MySQLCapabilityFlag.CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA.getValue());
verify(payload).writeInt4(100);
verify(payload).writeInt1(MySQLServerInfo.DEFAULT_CHARSET.getId());
verify(payload).writeReserved(23);
verify(payload).writeStringNul("root");
- verify(payload).writeStringLenenc(new String(new byte[] {1}));
+ verify(payload).writeStringLenenc(new String(new byte[]{1}));
}
@Test
public void assertWriteWithClientSecureConnection() {
MySQLHandshakeResponse41Packet actual = new MySQLHandshakeResponse41Packet(1, 100, MySQLServerInfo.DEFAULT_CHARSET.getId(), "root");
actual.setCapabilityFlags(MySQLCapabilityFlag.CLIENT_SECURE_CONNECTION.getValue());
- actual.setAuthResponse(new byte[] {1});
+ actual.setAuthResponse(new byte[]{1});
actual.write(payload);
verify(payload).writeInt4(MySQLCapabilityFlag.CLIENT_SECURE_CONNECTION.getValue());
verify(payload).writeInt4(100);
@@ -166,6 +166,6 @@ public final class MySQLHandshakeResponse41PacketTest {
verify(payload).writeReserved(23);
verify(payload).writeStringNul("root");
verify(payload).writeInt1(1);
- verify(payload).writeBytes(new byte[] {1});
+ verify(payload).writeBytes(new byte[]{1});
}
}
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/payload/MySQLPacketPayloadTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/payload/MySQLPacketPayloadTest.java
index 614b9aedfc9..ef14ead4b1e 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/payload/MySQLPacketPayloadTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/payload/MySQLPacketPayloadTest.java
@@ -179,7 +179,7 @@ public final class MySQLPacketPayloadTest {
@Test
public void assertReadStringLenencByBytes() {
when(byteBuf.readUnsignedByte()).thenReturn((short) 0);
- assertThat(new MySQLPacketPayload(byteBuf, StandardCharsets.UTF_8).readStringLenencByBytes(), is(new byte[] {}));
+ assertThat(new MySQLPacketPayload(byteBuf, StandardCharsets.UTF_8).readStringLenencByBytes(), is(new byte[]{}));
}
@Test
@@ -215,7 +215,7 @@ public final class MySQLPacketPayloadTest {
@Test
public void assertReadStringFixByBytes() {
- assertThat(new MySQLPacketPayload(byteBuf, StandardCharsets.UTF_8).readStringFixByBytes(0), is(new byte[] {}));
+ assertThat(new MySQLPacketPayload(byteBuf, StandardCharsets.UTF_8).readStringFixByBytes(0), is(new byte[]{}));
}
@Test
@@ -250,7 +250,7 @@ public final class MySQLPacketPayloadTest {
@Test
public void assertReadStringNulByBytes() {
when(byteBuf.bytesBefore((byte) 0)).thenReturn(0);
- assertThat(new MySQLPacketPayload(byteBuf, StandardCharsets.UTF_8).readStringNulByBytes(), is(new byte[] {}));
+ assertThat(new MySQLPacketPayload(byteBuf, StandardCharsets.UTF_8).readStringNulByBytes(), is(new byte[]{}));
verify(byteBuf).skipBytes(1);
}
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/constant/PostgreSQLAuthenticationMethod.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/constant/PostgreSQLAuthenticationMethod.java
index 0d2d9106261..4fdfcc89df0 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/constant/PostgreSQLAuthenticationMethod.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/constant/PostgreSQLAuthenticationMethod.java
@@ -32,7 +32,7 @@ public enum PostgreSQLAuthenticationMethod {
MD5("md5"),
PASSWORD("password"),
-
+
SCRAM_SHA256("scram-sha-256");
private final String methodName;
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/constant/PostgreSQLMessageSeverityLevel.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/constant/PostgreSQLMessageSeverityLevel.java
index 4df6d747dcf..1f73ba40dc8 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/constant/PostgreSQLMessageSeverityLevel.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/constant/PostgreSQLMessageSeverityLevel.java
@@ -25,26 +25,26 @@ package org.apache.shardingsphere.db.protocol.postgresql.constant;
public final class PostgreSQLMessageSeverityLevel {
public static final String DEBUG1 = "DEBUG1";
-
+
public static final String DEBUG2 = "DEBUG2";
-
+
public static final String DEBUG3 = "DEBUG3";
-
+
public static final String DEBUG4 = "DEBUG4";
-
+
public static final String DEBUG5 = "DEBUG5";
-
+
public static final String INFO = "INFO";
-
+
public static final String NOTICE = "NOTICE";
-
+
public static final String WARNING = "WARNING";
-
+
public static final String ERROR = "ERROR";
-
+
public static final String LOG = "LOG";
-
+
public static final String FATAL = "FATAL";
-
+
public static final String PANIC = "PANIC";
}
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/PostgreSQLColumnDescription.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/PostgreSQLColumnDescription.java
index 86c97f27ca7..f6d9e38e6c5 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/PostgreSQLColumnDescription.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/PostgreSQLColumnDescription.java
@@ -36,7 +36,7 @@ public final class PostgreSQLColumnDescription {
private final int columnIndex;
private final int columnLength;
-
+
private final int typeOID;
private final int typeModifier = -1;
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLByteConverter.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLByteConverter.java
index a43d86b57a6..88ac3026128 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLByteConverter.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLByteConverter.java
@@ -123,7 +123,7 @@ public final class PostgreSQLByteConverter {
}
private static byte[] initBytesZeroCase(final int scale) {
- final byte[] bytes = new byte[] {0, 0, -1, -1, 0, 0, 0, 0};
+ final byte[] bytes = new byte[]{0, 0, -1, -1, 0, 0, 0, 0};
int2(bytes, 6, Math.max(0, scale));
return bytes;
}
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLBoolArrayBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLBoolArrayBinaryProtocolValueTest.java
index 5da3044f11f..43d8dec0629 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLBoolArrayBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLBoolArrayBinaryProtocolValueTest.java
@@ -50,7 +50,7 @@ public final class PostgreSQLBoolArrayBinaryProtocolValueTest {
PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
Object result = newInstance().read(payload, parameterValue.length());
assertNotNull(result);
- assertThat(result, is(new boolean[] {true, false}));
+ assertThat(result, is(new boolean[]{true, false}));
assertThat(byteBuf.readerIndex(), is(expectedLength));
}
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLByteConverterTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLByteConverterTest.java
index a91d1e03cda..05520d7df0b 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLByteConverterTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLByteConverterTest.java
@@ -39,13 +39,12 @@ public final class PostgreSQLByteConverterTest {
@Parameterized.Parameters(name = "{0}")
public static Iterable<Object[]> textValues() {
return Arrays.asList(
- new Object[]{new BigDecimal("0"), new byte[] {0, 0, -1, -1, 0, 0, 0, 0}},
- new Object[]{new BigDecimal("0.00"), new byte[] {0, 0, -1, -1, 0, 0, 0, 2}},
- new Object[]{new BigDecimal("0.0001"), new byte[] {0, 1, -1, -1, 0, 0, 0, 4, 0, 1}},
- new Object[]{new BigDecimal("9999"), new byte[] {0, 1, 0, 0, 0, 0, 0, 0, 39, 15}},
- new Object[]{new BigDecimal("9999.0"), new byte[] {0, 1, 0, 0, 0, 0, 0, 1, 39, 15}},
- new Object[]{new BigDecimal("9999.9999"), new byte[] {0, 2, 0, 0, 0, 0, 0, 4, 39, 15, 39, 15}}
- );
+ new Object[]{new BigDecimal("0"), new byte[]{0, 0, -1, -1, 0, 0, 0, 0}},
+ new Object[]{new BigDecimal("0.00"), new byte[]{0, 0, -1, -1, 0, 0, 0, 2}},
+ new Object[]{new BigDecimal("0.0001"), new byte[]{0, 1, -1, -1, 0, 0, 0, 4, 0, 1}},
+ new Object[]{new BigDecimal("9999"), new byte[]{0, 1, 0, 0, 0, 0, 0, 0, 39, 15}},
+ new Object[]{new BigDecimal("9999.0"), new byte[]{0, 1, 0, 0, 0, 0, 0, 1, 39, 15}},
+ new Object[]{new BigDecimal("9999.9999"), new byte[]{0, 2, 0, 0, 0, 0, 0, 4, 39, 15, 39, 15}});
}
@Test
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat4ArrayBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat4ArrayBinaryProtocolValueTest.java
index 04d10ff05ed..e256293e6eb 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat4ArrayBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat4ArrayBinaryProtocolValueTest.java
@@ -50,7 +50,7 @@ public final class PostgreSQLFloat4ArrayBinaryProtocolValueTest {
PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
Object result = newInstance().read(payload, parameterValue.length());
assertNotNull(result);
- assertThat(result, is(new float[] {11.1F, 12.1F}));
+ assertThat(result, is(new float[]{11.1F, 12.1F}));
assertThat(byteBuf.readerIndex(), is(expectedLength));
}
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat8ArrayBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat8ArrayBinaryProtocolValueTest.java
index d22b168e719..417914f7753 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat8ArrayBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLFloat8ArrayBinaryProtocolValueTest.java
@@ -50,7 +50,7 @@ public final class PostgreSQLFloat8ArrayBinaryProtocolValueTest {
PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
Object result = newInstance().read(payload, parameterValue.length());
assertNotNull(result);
- assertThat(result, is(new double[] {11.1D, 12.1D}));
+ assertThat(result, is(new double[]{11.1D, 12.1D}));
assertThat(byteBuf.readerIndex(), is(expectedLength));
}
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt2ArrayBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt2ArrayBinaryProtocolValueTest.java
index f12922456a4..bba178a5af2 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt2ArrayBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt2ArrayBinaryProtocolValueTest.java
@@ -50,7 +50,7 @@ public final class PostgreSQLInt2ArrayBinaryProtocolValueTest {
PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
Object result = newInstance().read(payload, parameterValue.length());
assertNotNull(result);
- assertThat(result, is(new short[] {11, 12}));
+ assertThat(result, is(new short[]{11, 12}));
assertThat(byteBuf.readerIndex(), is(expectedLength));
}
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt4ArrayBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt4ArrayBinaryProtocolValueTest.java
index 7cb5b71b8ca..d5b6f19cfef 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt4ArrayBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt4ArrayBinaryProtocolValueTest.java
@@ -50,7 +50,7 @@ public final class PostgreSQLInt4ArrayBinaryProtocolValueTest {
PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
Object result = newInstance().read(payload, parameterValue.length());
assertNotNull(result);
- assertThat(result, is(new int[] {11, 12}));
+ assertThat(result, is(new int[]{11, 12}));
assertThat(byteBuf.readerIndex(), is(expectedLength));
}
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt8ArrayBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt8ArrayBinaryProtocolValueTest.java
index 76456377169..f59e2da7437 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt8ArrayBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLInt8ArrayBinaryProtocolValueTest.java
@@ -50,7 +50,7 @@ public final class PostgreSQLInt8ArrayBinaryProtocolValueTest {
PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
Object result = newInstance().read(payload, parameterValue.length());
assertNotNull(result);
- assertThat(result, is(new long[] {11, 12}));
+ assertThat(result, is(new long[]{11, 12}));
assertThat(byteBuf.readerIndex(), is(expectedLength));
}
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLNumericBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLNumericBinaryProtocolValueTest.java
index 011ae88d4ac..d849a9c85f6 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLNumericBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLNumericBinaryProtocolValueTest.java
@@ -45,13 +45,12 @@ public final class PostgreSQLNumericBinaryProtocolValueTest {
@Parameterized.Parameters(name = "{0}")
public static Iterable<Object[]> textValues() {
return Arrays.asList(
- new Object[]{new BigDecimal("0"), new byte[] {0, 0, -1, -1, 0, 0, 0, 0}},
- new Object[]{new BigDecimal("0.00"), new byte[] {0, 0, -1, -1, 0, 0, 0, 2}},
- new Object[]{new BigDecimal("0.0001"), new byte[] {0, 1, -1, -1, 0, 0, 0, 4, 0, 1}},
- new Object[]{new BigDecimal("9999"), new byte[] {0, 1, 0, 0, 0, 0, 0, 0, 39, 15}},
- new Object[]{new BigDecimal("9999.0"), new byte[] {0, 1, 0, 0, 0, 0, 0, 1, 39, 15}},
- new Object[]{new BigDecimal("9999.9999"), new byte[] {0, 2, 0, 0, 0, 0, 0, 4, 39, 15, 39, 15}}
- );
+ new Object[]{new BigDecimal("0"), new byte[]{0, 0, -1, -1, 0, 0, 0, 0}},
+ new Object[]{new BigDecimal("0.00"), new byte[]{0, 0, -1, -1, 0, 0, 0, 2}},
+ new Object[]{new BigDecimal("0.0001"), new byte[]{0, 1, -1, -1, 0, 0, 0, 4, 0, 1}},
+ new Object[]{new BigDecimal("9999"), new byte[]{0, 1, 0, 0, 0, 0, 0, 0, 39, 15}},
+ new Object[]{new BigDecimal("9999.0"), new byte[]{0, 1, 0, 0, 0, 0, 0, 1, 39, 15}},
+ new Object[]{new BigDecimal("9999.9999"), new byte[]{0, 2, 0, 0, 0, 0, 0, 4, 39, 15, 39, 15}});
}
@Test
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLStringArrayBinaryProtocolValueTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLStringArrayBinaryProtocolValueTest.java
index 5a155d29520..f654065ab25 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLStringArrayBinaryProtocolValueTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/extended/bind/protocol/PostgreSQLStringArrayBinaryProtocolValueTest.java
@@ -50,7 +50,7 @@ public final class PostgreSQLStringArrayBinaryProtocolValueTest {
PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf, StandardCharsets.UTF_8);
Object result = newInstance().read(payload, parameterValue.length());
assertNotNull(result);
- assertThat(result, is(new String[] {"a", "b"}));
+ assertThat(result, is(new String[]{"a", "b"}));
assertThat(byteBuf.readerIndex(), is(expectedLength));
}
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/config/rule/YamlDatabaseDiscoveryDataSourceRuleConfiguration.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/config/rule/YamlDatabaseDiscoveryDataSourceRuleConfiguration.java
index 03e081926cc..1f189673010 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/config/rule/YamlDatabaseDiscoveryDataSourceRuleConfiguration.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/config/rule/YamlDatabaseDiscoveryDataSourceRuleConfiguration.java
@@ -30,7 +30,7 @@ import java.util.List;
@Getter
@Setter
public final class YamlDatabaseDiscoveryDataSourceRuleConfiguration implements YamlConfiguration {
-
+
private List<String> dataSourceNames = new ArrayList<>();
private String discoveryHeartbeatName;
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/converter/DatabaseDiscoveryRuleStatementConverter.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/converter/DatabaseDisco [...]
index 26f7315fc38..6edfec0bde5 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/converter/DatabaseDiscoveryRuleStatementConverter.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/converter/DatabaseDiscoveryRuleStatementConverter.java
@@ -37,7 +37,6 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
-
/**
* Database discovery rule statement converter.
*/
@@ -102,7 +101,7 @@ public final class DatabaseDiscoveryRuleStatementConverter {
*/
public static DatabaseDiscoveryRuleConfiguration convertDiscoveryType(final Collection<DatabaseDiscoveryTypeSegment> typeSegment) {
final DatabaseDiscoveryRuleConfiguration result = new DatabaseDiscoveryRuleConfiguration(new LinkedList<>(), new LinkedHashMap<>(), new LinkedHashMap<>());
- typeSegment.forEach(each -> result.getDiscoveryTypes().put(each.getDiscoveryTypeName(),
+ typeSegment.forEach(each -> result.getDiscoveryTypes().put(each.getDiscoveryTypeName(),
new ShardingSphereAlgorithmConfiguration(each.getAlgorithmSegment().getName(), each.getAlgorithmSegment().getProps())));
return result;
}
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MGRDatabaseDiscoveryTypeTest.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MGRDatabaseDiscoveryTypeTest.java
index 2d27c7d3ab1..ab9429cb785 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MGRDatabaseDiscoveryTypeTest.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-mysql/src/test/java/org/apache/shardingsphere/dbdiscovery/mysql/type/MGRDatabaseDiscoveryTypeTest.java
@@ -126,7 +126,7 @@ public final class MGRDatabaseDiscoveryTypeTest {
assertThat(mgrDatabaseDiscoveryType.getPrimaryDataSource(), is("ds_2"));
}
- //TODO Fix me
+ // TODO Fix me
@Ignore
@Test
public void assertUpdateMemberState() throws SQLException, IllegalAccessException, NoSuchFieldException {
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-opengauss/src/main/java/org/apache/shardingsphere/dbdiscovery/opengauss/OpenGaussDatabaseDiscoveryType.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-opengauss/src/main/java/org/apache/shardingsphere/dbdiscovery/opengauss/OpenGaussDatabaseDiscoveryType.java
index 5ccc23ea04e..cd2dc0adf98 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-opengauss/src/main/java/org/apache/shardingsphere/dbdiscovery/opengauss/OpenGaussDatabaseDiscoveryType.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-opengauss/src/main/java/org/apache/shardingsphere/dbdiscovery/opengauss/OpenGaussDatabaseDiscoveryType.java
@@ -55,7 +55,7 @@ public final class OpenGaussDatabaseDiscoveryType implements DatabaseDiscoveryTy
@Override
public void checkDatabaseDiscoveryConfiguration(final String schemaName, final Map<String, DataSource> dataSourceMap) {
- //TODO Check openGauss configuration
+ // TODO Check openGauss configuration
}
@Override
@@ -75,8 +75,8 @@ public final class OpenGaussDatabaseDiscoveryType implements DatabaseDiscoveryTy
String result = "";
for (Entry<String, DataSource> entry : dataSourceMap.entrySet()) {
try (Connection connection = entry.getValue().getConnection();
- Statement statement = connection.createStatement();
- ResultSet resultSet = statement.executeQuery(DB_ROLE)) {
+ Statement statement = connection.createStatement();
+ ResultSet resultSet = statement.executeQuery(DB_ROLE)) {
if (resultSet.next()) {
if (resultSet.getString("local_role").equals("Primary") && resultSet.getString("db_state").equals("Normal")) {
return entry.getKey();
@@ -94,8 +94,8 @@ public final class OpenGaussDatabaseDiscoveryType implements DatabaseDiscoveryTy
for (Entry<String, DataSource> entry : dataSourceMap.entrySet()) {
boolean disable = true;
try (Connection connection = entry.getValue().getConnection();
- Statement statement = connection.createStatement();
- ResultSet resultSet = statement.executeQuery(DB_ROLE)) {
+ Statement statement = connection.createStatement();
+ ResultSet resultSet = statement.executeQuery(DB_ROLE)) {
if (resultSet.next()) {
if ((resultSet.getString("local_role").equals("Standby") && resultSet.getString("db_state").equals("Normal"))
|| entry.getKey().equals(oldPrimaryDataSource)) {
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/spi/context/EncryptColumnDataType.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/spi/context/EncryptColumnDataType.java
index 96fb2d58744..bce89a6a6dc 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/spi/context/EncryptColumnDataType.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/spi/context/EncryptColumnDataType.java
@@ -34,7 +34,7 @@ public final class EncryptColumnDataType {
public EncryptColumnDataType(final String typeName, final Map<String, Integer> dataTypes) {
this.typeName = typeName;
- this.dataType = getDataTypeByTypeName(typeName, dataTypes);
+ this.dataType = getDataTypeByTypeName(typeName, dataTypes);
}
private static Integer getDataTypeByTypeName(final String typeName, final Map<String, Integer> dataTypes) {
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/SM4EncryptAlgorithm.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/SM4EncryptAlgorithm.java
index b2033926649..c8c8a59bda0 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/SM4EncryptAlgorithm.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/SM4EncryptAlgorithm.java
@@ -139,7 +139,7 @@ public final class SM4EncryptAlgorithm implements EncryptAlgorithm<Object, Strin
private byte[] decrypt(final byte[] cipherValue) {
return handle(cipherValue, Cipher.DECRYPT_MODE);
}
-
+
@SneakyThrows
private byte[] handle(final byte[] input, final int mode) {
Cipher cipher = Cipher.getInstance(sm4ModePadding, BouncyCastleProvider.PROVIDER_NAME);
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/merge/dal/impl/EncryptColumnsMergedResult.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/merge/dal/impl/EncryptColumnsMergedResult.java
index 815ada065b0..b04bdcc0840 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/merge/dal/impl/EncryptColumnsMergedResult.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/merge/dal/impl/EncryptColumnsMergedResult.java
@@ -46,7 +46,7 @@ public abstract class EncryptColumnsMergedResult implements MergedResult {
}
@Override
- public final boolean next() throws SQLException {
+ public final boolean next() throws SQLException {
boolean hasNext = nextValue();
Optional<EncryptTable> encryptTable = encryptRule.findEncryptTable(tableName);
if (hasNext && !encryptTable.isPresent()) {
@@ -79,7 +79,7 @@ public abstract class EncryptColumnsMergedResult implements MergedResult {
}
return getOriginalValue(columnIndex, type);
}
-
+
@Override
public final Object getCalendarValue(final int columnIndex, final Class<?> type, final Calendar calendar) throws SQLException {
throw new SQLFeatureNotSupportedException("");
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/metadata/EncryptTableMetaDataBuilder.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/metadata/EncryptTableMetaDataBuilder.java
index 7d6e7786cd6..b2fe8395b66 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/metadata/EncryptTableMetaDataBuilder.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/metadata/EncryptTableMetaDataBuilder.java
@@ -70,7 +70,7 @@ public final class EncryptTableMetaDataBuilder implements RuleBasedTableMetaData
private TableMetaData decorate(final String tableName, final TableMetaData tableMetaData, final EncryptRule encryptRule) {
Optional<EncryptTable> encryptTable = encryptRule.findEncryptTable(tableName);
- return encryptTable.map(optional -> new TableMetaData(tableName, getEncryptColumnMetaDataList(optional, tableMetaData.getColumns().values()),
+ return encryptTable.map(optional -> new TableMetaData(tableName, getEncryptColumnMetaDataList(optional, tableMetaData.getColumns().values()),
tableMetaData.getIndexes().values(), tableMetaData.getConstrains().values())).orElse(tableMetaData);
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/condition/impl/EncryptEqualCondition.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/condition/impl/EncryptEqualCondition.java
index 8f6741ae3fe..64217678d19 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/condition/impl/EncryptEqualCondition.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/condition/impl/EncryptEqualCondition.java
@@ -42,7 +42,7 @@ public final class EncryptEqualCondition implements EncryptCondition {
private final String columnName;
private final String tableName;
-
+
private final int startIndex;
private final int stopIndex;
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/condition/impl/EncryptInCondition.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/condition/impl/EncryptInCondition.java
index a9f47b70f73..49191ed4b7b 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/condition/impl/EncryptInCondition.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/condition/impl/EncryptInCondition.java
@@ -42,7 +42,7 @@ public final class EncryptInCondition implements EncryptCondition {
private final String columnName;
private final String tableName;
-
+
private final int startIndex;
private final int stopIndex;
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/context/EncryptSQLRewriteContextDecorator.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/context/EncryptSQLRewriteContextDecorator.java
index 6ab523251ee..6ef904a3c8d 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/context/EncryptSQLRewriteContextDecorator.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/context/EncryptSQLRewriteContextDecorator.java
@@ -55,7 +55,7 @@ public final class EncryptSQLRewriteContextDecorator implements SQLRewriteContex
rewriteParameters(sqlRewriteContext, parameterRewriters);
}
if (containsEncryptTable) {
- Collection<SQLTokenGenerator> sqlTokenGenerators = new EncryptTokenGenerateBuilder(encryptRule,
+ Collection<SQLTokenGenerator> sqlTokenGenerators = new EncryptTokenGenerateBuilder(encryptRule,
sqlStatementContext, encryptConditions, sqlRewriteContext.getSchemaName()).getSQLTokenGenerators();
sqlRewriteContext.addSQLTokenGenerators(sqlTokenGenerators);
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptTokenGenerateBuilder.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptTokenGenerateBuilder.java
index f67cd9a0c88..52102b31691 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptTokenGenerateBuilder.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptTokenGenerateBuilder.java
@@ -76,7 +76,7 @@ public final class EncryptTokenGenerateBuilder implements SQLTokenGeneratorBuild
}
private void addSQLTokenGenerator(final Collection<SQLTokenGenerator> sqlTokenGenerators, final SQLTokenGenerator toBeAddedSQLTokenGenerator) {
- if (!((CommonSQLStatementContext) sqlStatementContext).getSqlHintExtractor().isHintEncryptRewriteNeeded()
+ if (!((CommonSQLStatementContext) sqlStatementContext).getSqlHintExtractor().isHintEncryptRewriteNeeded()
&& toBeAddedSQLTokenGenerator.isGenerateSQLToken(sqlStatementContext)) {
setUpSQLTokenGenerator(toBeAddedSQLTokenGenerator);
sqlTokenGenerators.add(toBeAddedSQLTokenGenerator);
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/EncryptInsertOnUpdateTokenGenerator.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/EncryptInsertOnUpdateTokenGenerator.java
index 0da4f768d87..281502e649c 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/EncryptInsertOnUpdateTokenGenerator.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/EncryptInsertOnUpdateTokenGenerator.java
@@ -167,7 +167,7 @@ public final class EncryptInsertOnUpdateTokenGenerator implements CollectionSQLT
private void addCipherAssignment(final String schemaName, final String tableName, final AssignmentSegment assignmentSegment, final EncryptLiteralAssignmentToken token) {
Object originalValue = ((LiteralExpressionSegment) assignmentSegment.getValue()).getLiterals();
- Object cipherValue = encryptRule.getEncryptValues(schemaName, tableName, assignmentSegment.getColumns().get(0).getIdentifier().getValue(),
+ Object cipherValue = encryptRule.getEncryptValues(schemaName, tableName, assignmentSegment.getColumns().get(0).getIdentifier().getValue(),
Collections.singletonList(originalValue)).iterator().next();
token.addAssignment(encryptRule.getCipherColumn(tableName, assignmentSegment.getColumns().get(0).getIdentifier().getValue()), cipherValue);
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/pojo/EncryptFunctionAssignmentToken.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/pojo/EncryptFunctionAssignmentToken.java
index 5268da0e4b7..b1de5878cca 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/pojo/EncryptFunctionAssignmentToken.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/pojo/EncryptFunctionAssignmentToken.java
@@ -68,7 +68,7 @@ public final class EncryptFunctionAssignmentToken extends EncryptAssignmentToken
public String toString() {
return String.format("%s = %s", columnName, toString(value));
}
-
+
private String toString(final Object value) {
return String.class == value.getClass() ? String.format("%s", value) : value.toString();
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/pojo/EncryptLiteralAssignmentToken.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/pojo/EncryptLiteralAssignmentToken.java
index 2ca4849553a..7fe00c7d5ba 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/pojo/EncryptLiteralAssignmentToken.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/pojo/EncryptLiteralAssignmentToken.java
@@ -60,7 +60,7 @@ public final class EncryptLiteralAssignmentToken extends EncryptAssignmentToken
public String toString() {
return columnName + " = " + toString(value);
}
-
+
private String toString(final Object value) {
return value instanceof String ? "'" + value + "'" : value.toString();
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/impl/EncryptCreateTableTokenGeneratorTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/impl/EncryptCreateTableTokenGeneratorTest.java
index 63ff61d492e..86522c88807 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/impl/EncryptCreateTableTokenGeneratorTest.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/impl/EncryptCreateTableTokenGeneratorTest.java
@@ -107,7 +107,7 @@ public final class EncryptCreateTableTokenGeneratorTest {
EncryptColumnDataType cipherDataType = new EncryptColumnDataType("varchar(200) not null default ''", dataTypes);
EncryptColumnDataType assistedQueryDataType = new EncryptColumnDataType("varchar(200) not null", dataTypes);
EncryptColumnDataType plainDataType = new EncryptColumnDataType("int(20) unsigned not null default 0", dataTypes);
- return new EncryptColumn(logicDataType, "cipher_certificate_number", cipherDataType,
+ return new EncryptColumn(logicDataType, "cipher_certificate_number", cipherDataType,
"assisted_certificate_number", assistedQueryDataType, "certificate_number_plain", plainDataType, "test");
}
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/impl/EncryptEqualConditionTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/impl/EncryptEqualConditionTest.java
index e5b16324293..be36aa5aa0c 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/impl/EncryptEqualConditionTest.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/impl/EncryptEqualConditionTest.java
@@ -31,7 +31,7 @@ public final class EncryptEqualConditionTest {
@Test
public void assertGetConditionValues() {
- List<Object> actual = new EncryptEqualCondition("col", null,
+ List<Object> actual = new EncryptEqualCondition("col", null,
0, 0, new LiteralExpressionSegment(0, 0, 1)).getValues(Collections.emptyList());
assertThat(actual.size(), is(1));
assertThat(actual.get(0), is(1));
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptRuleTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptRuleTest.java
index 71aa5431b22..d2463e38a4f 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptRuleTest.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptRuleTest.java
@@ -92,7 +92,7 @@ public final class EncryptRuleTest {
@Test
public void assertGetEncryptValues() {
- List<Object> encryptAssistedQueryValues = new EncryptRule(createEncryptRuleConfiguration(), Collections.emptyMap()).getEncryptValues(DefaultSchema.LOGIC_NAME, "t_encrypt", "pwd",
+ List<Object> encryptAssistedQueryValues = new EncryptRule(createEncryptRuleConfiguration(), Collections.emptyMap()).getEncryptValues(DefaultSchema.LOGIC_NAME, "t_encrypt", "pwd",
Collections.singletonList(null));
for (final Object value : encryptAssistedQueryValues) {
assertNull(value);
@@ -121,7 +121,7 @@ public final class EncryptRuleTest {
@Test
public void assertGetEncryptAssistedQueryValues() {
- List<Object> encryptAssistedQueryValues = new EncryptRule(createEncryptRuleConfiguration(), Collections.emptyMap()).getEncryptAssistedQueryValues(DefaultSchema.LOGIC_NAME, "t_encrypt", "pwd",
+ List<Object> encryptAssistedQueryValues = new EncryptRule(createEncryptRuleConfiguration(), Collections.emptyMap()).getEncryptAssistedQueryValues(DefaultSchema.LOGIC_NAME, "t_encrypt", "pwd",
Collections.singletonList(null));
for (final Object value : encryptAssistedQueryValues) {
assertNull(value);
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptTableTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptTableTest.java
index d656f173cfe..58a6c5b1747 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptTableTest.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptTableTest.java
@@ -39,7 +39,7 @@ public final class EncryptTableTest {
@Before
public void setUp() {
- encryptTable = new EncryptTable(new EncryptTableRuleConfiguration("t_encrypt",
+ encryptTable = new EncryptTable(new EncryptTableRuleConfiguration("t_encrypt",
Collections.singleton(new EncryptColumnRuleConfiguration("logicColumn", "cipherColumn", "assistedQueryColumn", "plainColumn", "myEncryptor")), null), Collections.emptyMap());
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptTableRuleConfigurationYamlSwapperTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptTableRuleConfigurationYamlSwapperTest.java
index 40dfa4d2e84..ea49ecb2ddf 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptTableRuleConfigurationYamlSwapperTest.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/rule/EncryptTableRuleConfigurationYamlSwapperTest.java
@@ -40,8 +40,8 @@ public final class EncryptTableRuleConfigurationYamlSwapperTest {
@Test
public void assertSwapToYamlConfiguration() {
Collection<EncryptColumnRuleConfiguration> encryptColumnRuleConfigs = Arrays.asList(
- new EncryptColumnRuleConfiguration("encrypt_column_1", "encrypt_cipher_1", "", "", "test_encryptor_1"),
- new EncryptColumnRuleConfiguration("encrypt_column_2", "encrypt_cipher_2", "", "", "test_encryptor_2"),
+ new EncryptColumnRuleConfiguration("encrypt_column_1", "encrypt_cipher_1", "", "", "test_encryptor_1"),
+ new EncryptColumnRuleConfiguration("encrypt_column_2", "encrypt_cipher_2", "", "", "test_encryptor_2"),
new EncryptColumnRuleConfiguration("encrypt_column_3", "encrypt_cipher_3", "", "", "test_encryptor_3"));
EncryptTableRuleConfiguration encryptTableRuleConfig = new EncryptTableRuleConfiguration("test_table", encryptColumnRuleConfigs, null);
YamlEncryptTableRuleConfiguration actualYamlEncryptTableRuleConfig = tableRuleConfigYamlSwapper.swapToYamlConfiguration(encryptTableRuleConfig);
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/test/java/org/apache/shardingsphere/encrypt/distsql/handler/update/DropEncryptRuleStatementUpdaterTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/test/java/org/apache/shardingsphere/encrypt/distsql/handler/update/DropEncryptRuleStatementUpdaterTest.java
index ef5c15f09d2..bbd559e4c9a 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/test/java/org/apache/shardingsphere/encrypt/distsql/handler/update/DropEncryptRuleStatementUpdaterTest.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/test/java/org/apache/shardingsphere/encrypt/distsql/handler/update/DropEncryptRuleStatementUpdaterTest.java
@@ -102,7 +102,7 @@ public final class DropEncryptRuleStatementUpdaterTest {
EncryptTableRuleConfiguration tableRuleConfig = new EncryptTableRuleConfiguration("t_encrypt", Collections.singleton(columnRuleConfig), null);
Map<String, ShardingSphereAlgorithmConfiguration> encryptors = new HashMap<>(1, 1);
encryptors.put("t_encrypt_user_id_MD5", new ShardingSphereAlgorithmConfiguration("TEST", new Properties()));
- return new EncryptRuleConfiguration(new LinkedList<>(Arrays.asList(tableRuleConfig,
+ return new EncryptRuleConfiguration(new LinkedList<>(Arrays.asList(tableRuleConfig,
new EncryptTableRuleConfiguration("t_encrypt_another", Collections.singleton(columnRuleConfig), null))), encryptors, true);
}
}
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-spring/shardingsphere-encrypt-spring-boot-starter/src/main/java/org/apache/shardingsphere/encrypt/spring/boot/EncryptRuleSpringBootConfiguration.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-spring/shardingsphere-encrypt-spring-boot-starter/src/main/java/org/apache/shardingsphere/encrypt/spring/boot/EncryptRuleSpringBootConfiguration.java
index 1a7bcca79b1..630958bb93c 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-spring/shardingsphere-encrypt-spring-boot-starter/src/main/java/org/apache/shardingsphere/encrypt/spring/boot/EncryptRuleSpringBootConfiguration.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-spring/shardingsphere-encrypt-spring-boot-starter/src/main/java/org/apache/shardingsphere/encrypt/spring/boot/EncryptRuleSpringBootConfiguration.java
@@ -77,4 +77,3 @@ public class EncryptRuleSpringBootConfiguration {
return new EncryptAlgorithmProvidedBeanRegistry(environment);
}
}
-
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/WeightReplicaLoadBalanceAlgorithm.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/WeightReplicaLoadBalanceAlgorithm.java
index c964e3d016f..9312dc18ee1 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/WeightReplicaLoadBalanceAlgorithm.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/WeightReplicaLoadBalanceAlgorithm.java
@@ -56,7 +56,7 @@ public final class WeightReplicaLoadBalanceAlgorithm implements ReplicaLoadBalan
}
return readDataSourceNames.get(index);
}
-
+
private double[] initWeight(final List<String> readDataSourceNames) {
double[] result = getWeights(readDataSourceNames);
if (result.length != 0 && Math.abs(result[result.length - 1] - 1.0D) >= ACCURACY_THRESHOLD) {
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-parser/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/parser/core/ReadwriteSplittingDistSQLStatementVisitor.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-parser/src/main/java/org/apache/shardingsphere/readwrit [...]
index 363fda18795..419278dedec 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-parser/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/parser/core/ReadwriteSplittingDistSQLStatementVisitor.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-parser/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/parser/core/ReadwriteSplittingDistSQLStatementVisitor.java
@@ -107,7 +107,7 @@ public final class ReadwriteSplittingDistSQLStatementVisitor extends ReadwriteSp
}
StaticReadwriteSplittingRuleDefinitionContext staticRuleDefinitionCtx = ctx.staticReadwriteSplittingRuleDefinition();
return new ReadwriteSplittingRuleSegment(getIdentifierValue(ctx.ruleName()),
- getIdentifierValue(staticRuleDefinitionCtx.writeResourceName()),
+ getIdentifierValue(staticRuleDefinitionCtx.writeResourceName()),
staticRuleDefinitionCtx.readResourceNames().resourceName().stream().map(each -> getIdentifierValue(each)).collect(Collectors.toList()),
algorithmName, props);
}
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/engine/dml/ShadowDeleteStatementRoutingEngine.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/engine/dml/ShadowDeleteStatementRoutingEngine.java
index 9f7dce66646..b536461b9b4 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/engine/dml/ShadowDeleteStatementRoutingEngine.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/engine/dml/ShadowDeleteStatementRoutingEngine.java
@@ -79,7 +79,7 @@ public final class ShadowDeleteStatementRoutingEngine extends AbstractShadowDMLS
private class ShadowColumnConditionIterator implements Iterator<Optional<ShadowColumnCondition>> {
private final Iterator<ExpressionSegment> iterator;
-
+
private final List<Object> parameters;
ShadowColumnConditionIterator(final Collection<ExpressionSegment> predicates, final List<Object> parameters) {
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/engine/dml/ShadowInsertStatementRoutingEngine.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/engine/dml/ShadowInsertStatementRoutingEngine.java
index bbda543903b..f602360ec46 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/engine/dml/ShadowInsertStatementRoutingEngine.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/engine/dml/ShadowInsertStatementRoutingEngine.java
@@ -90,7 +90,7 @@ public final class ShadowInsertStatementRoutingEngine extends AbstractShadowDMLS
index++;
return columnValues.map(values -> new ShadowColumnCondition(getSingleTableName(), columnName, values));
}
-
+
private Optional<Collection<Comparable<?>>> getColumnValues(final List<InsertValueContext> insertValueContexts, final int index) {
Collection<Comparable<?>> result = new LinkedList<>();
for (InsertValueContext each : insertValueContexts) {
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/engine/dml/ShadowUpdateStatementRoutingEngine.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/engine/dml/ShadowUpdateStatementRoutingEngine.java
index e2264709de2..f8c1732bbec 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/engine/dml/ShadowUpdateStatementRoutingEngine.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/engine/dml/ShadowUpdateStatementRoutingEngine.java
@@ -91,7 +91,7 @@ public final class ShadowUpdateStatementRoutingEngine extends AbstractShadowDMLS
public boolean hasNext() {
return iterator.hasNext();
}
-
+
@Override
public Optional<ShadowColumnCondition> next() {
ExpressionSegment expressionSegment = iterator.next();
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/AlterShadowAlgorithmStatementUpdater.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/AlterShadowAlgorithmStatementUpdater.java
index 70b3be7124f..e5fb7e0dd4f 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/AlterShadowAlgorithmStatementUpdater.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/AlterShadowAlgorithmStatementUpdater.java
@@ -72,7 +72,7 @@ public final class AlterShadowAlgorithmStatementUpdater implements RuleDefinitio
ShadowRuleStatementChecker.checkAlgorithmCompleteness(sqlStatement.getAlgorithms());
Collection<String> requireAlgorithmNames = sqlStatement.getAlgorithms().stream().map(ShadowAlgorithmSegment::getAlgorithmName).collect(Collectors.toList());
ShadowRuleStatementChecker.checkAnyDuplicate(requireAlgorithmNames, duplicate -> new AlgorithmInUsedException(schemaName, duplicate));
- ShadowRuleStatementChecker.checkAlgorithmExist(requireAlgorithmNames, currentRuleConfig.getShadowAlgorithms().keySet(),
+ ShadowRuleStatementChecker.checkAlgorithmExist(requireAlgorithmNames, currentRuleConfig.getShadowAlgorithms().keySet(),
different -> new RequiredAlgorithmMissedException(SHADOW, schemaName, different));
}
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/test/java/org/apache/shardingsphere/shadow/distsql/update/CreateShadowAlgorithmStatementUpdaterTest.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/test/java/org/apache/shardingsphere/shadow/distsql/update/CreateShadowAlgorithmStatementUpdaterTest.java
index 201ed379594..91fa420c45e 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/test/java/org/apache/shardingsphere/shadow/distsql/update/CreateShadowAlgorithmStatementUpdaterTest.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/test/java/org/apache/shardingsphere/shadow/distsql/update/CreateShadowAlgorithmStatementUpdaterTest.java
@@ -43,8 +43,8 @@ import static org.mockito.Mockito.when;
public final class CreateShadowAlgorithmStatementUpdaterTest {
static {
- ShardingSphereServiceLoader.register(ShadowAlgorithm.class);
- }
+ ShardingSphereServiceLoader.register(ShadowAlgorithm.class);
+ }
@Mock
private ShardingSphereMetaData shardingSphereMetaData;
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/AlterShadowAlgorithmStatement.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/AlterShadowAlgorithmStatement.java
index 342cfc048d9..f1f4e15836b 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/AlterShadowAlgorithmStatement.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/AlterShadowAlgorithmStatement.java
@@ -31,6 +31,6 @@ import java.util.Collection;
@RequiredArgsConstructor
@Getter
public final class AlterShadowAlgorithmStatement extends AlterRuleStatement implements ShadowSubjectSupplier {
-
+
private final Collection<ShadowAlgorithmSegment> algorithms;
}
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/AlterShadowRuleStatement.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/AlterShadowRuleStatement.java
index 7c63f50ce12..3ed95dc109f 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/AlterShadowRuleStatement.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/AlterShadowRuleStatement.java
@@ -31,6 +31,6 @@ import java.util.Collection;
@RequiredArgsConstructor
@Getter
public final class AlterShadowRuleStatement extends AlterRuleStatement implements ShadowSubjectSupplier {
-
+
private final Collection<ShadowRuleSegment> rules;
}
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/CreateDefaultShadowAlgorithmStatement.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/CreateDefaultShadowAlgorithmStatement.java
index b4f12148ae2..f075895d46e 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/CreateDefaultShadowAlgorithmStatement.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/CreateDefaultShadowAlgorithmStatement.java
@@ -28,6 +28,6 @@ import org.apache.shardingsphere.distsql.parser.statement.rdl.create.CreateRuleS
@RequiredArgsConstructor
@Getter
public final class CreateDefaultShadowAlgorithmStatement extends CreateRuleStatement implements ShadowSubjectSupplier {
-
+
private final String algorithmName;
}
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/CreateShadowRuleStatement.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/CreateShadowRuleStatement.java
index 28404afb26a..1c5531f3aa9 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/CreateShadowRuleStatement.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/CreateShadowRuleStatement.java
@@ -31,6 +31,6 @@ import java.util.Collection;
@RequiredArgsConstructor
@Getter
public final class CreateShadowRuleStatement extends CreateRuleStatement implements ShadowSubjectSupplier {
-
+
private final Collection<ShadowRuleSegment> rules;
}
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/DropShadowRuleStatement.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/DropShadowRuleStatement.java
index 44f5e0ef03f..7ef90805539 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/DropShadowRuleStatement.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-statement/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/statement/DropShadowRuleStatement.java
@@ -30,7 +30,7 @@ import java.util.Collection;
@RequiredArgsConstructor
@Getter
public final class DropShadowRuleStatement extends DropRuleStatement implements ShadowSubjectSupplier {
-
+
private final Collection<String> ruleNames;
public DropShadowRuleStatement(final boolean containsExistClause, final Collection<String> ruleNames) {
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/main/java/org/apache/shardingsphere/sharding/api/config/ShardingRuleConfiguration.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/main/java/org/apache/shardingsphere/sharding/api/config/ShardingRuleConfiguration.java
index 8781bf352a1..df685bda8f5 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/main/java/org/apache/shardingsphere/sharding/api/config/ShardingRuleConfiguration.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/main/java/org/apache/shardingsphere/sharding/api/config/ShardingRuleConfiguration.java
@@ -59,7 +59,7 @@ public final class ShardingRuleConfiguration implements SchemaRuleConfiguration,
private ShardingStrategyConfiguration defaultTableShardingStrategy;
private KeyGenerateStrategyConfiguration defaultKeyGenerateStrategy;
-
+
private String defaultShardingColumn;
private Map<String, ShardingSphereAlgorithmConfiguration> shardingAlgorithms = new LinkedHashMap<>();
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/config/AlgorithmProvidedShardingRuleConfiguration.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/config/AlgorithmProvidedShardingRuleConfiguration.java
index 529090d84bf..125ee568e17 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/config/AlgorithmProvidedShardingRuleConfiguration.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/config/AlgorithmProvidedShardingRuleConfiguration.java
@@ -53,7 +53,7 @@ public final class AlgorithmProvidedShardingRuleConfiguration implements SchemaR
private ShardingStrategyConfiguration defaultTableShardingStrategy;
private KeyGenerateStrategyConfiguration defaultKeyGenerateStrategy;
-
+
private String defaultShardingColumn;
private Map<String, ShardingAlgorithm> shardingAlgorithms = new LinkedHashMap<>();
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/keygen/SnowflakeKeyGenerateAlgorithm.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/keygen/SnowflakeKeyGenerateAlgorithm.java
index f8b0991c1ca..e1e489e871a 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/keygen/SnowflakeKeyGenerateAlgorithm.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/keygen/SnowflakeKeyGenerateAlgorithm.java
@@ -134,7 +134,7 @@ public final class SnowflakeKeyGenerateAlgorithm implements KeyGenerateAlgorithm
return false;
}
long timeDifferenceMilliseconds = lastMilliseconds - currentMilliseconds;
- Preconditions.checkState(timeDifferenceMilliseconds < maxTolerateTimeDifferenceMilliseconds,
+ Preconditions.checkState(timeDifferenceMilliseconds < maxTolerateTimeDifferenceMilliseconds,
"Clock is moving backwards, last time is %d milliseconds, current time is %d milliseconds", lastMilliseconds, currentMilliseconds);
Thread.sleep(timeDifferenceMilliseconds);
return true;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithm.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithm.java
index e3774814aae..c47d928aa0f 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithm.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithm.java
@@ -35,27 +35,27 @@ import java.util.Properties;
* Class based sharding algorithm.
*/
public final class ClassBasedShardingAlgorithm implements StandardShardingAlgorithm<Comparable<?>>, ComplexKeysShardingAlgorithm<Comparable<?>>, HintShardingAlgorithm<Comparable<?>> {
-
+
private static final String STRATEGY_KEY = "strategy";
-
+
private static final String ALGORITHM_CLASS_NAME_KEY = "algorithmClassName";
-
+
private StandardShardingAlgorithm standardShardingAlgorithm;
-
+
private ComplexKeysShardingAlgorithm complexKeysShardingAlgorithm;
-
+
private HintShardingAlgorithm hintShardingAlgorithm;
-
+
@Getter
private ClassBasedShardingAlgorithmStrategyType strategy;
-
+
@Getter
private String algorithmClassName;
-
+
@Getter
@Setter
private Properties props = new Properties();
-
+
@Override
public void init() {
String strategyKey = props.getProperty(STRATEGY_KEY);
@@ -65,7 +65,7 @@ public final class ClassBasedShardingAlgorithm implements StandardShardingAlgori
Preconditions.checkNotNull(algorithmClassName, "The props `%s` cannot be null when uses class based sharding strategy.", ALGORITHM_CLASS_NAME_KEY);
createAlgorithmInstance();
}
-
+
private void createAlgorithmInstance() {
switch (strategy) {
case STANDARD:
@@ -81,27 +81,27 @@ public final class ClassBasedShardingAlgorithm implements StandardShardingAlgori
break;
}
}
-
+
@Override
public String doSharding(final Collection<String> availableTargetNames, final PreciseShardingValue<Comparable<?>> shardingValue) {
return standardShardingAlgorithm.doSharding(availableTargetNames, shardingValue);
}
-
+
@Override
public Collection<String> doSharding(final Collection<String> availableTargetNames, final RangeShardingValue<Comparable<?>> shardingValue) {
return standardShardingAlgorithm.doSharding(availableTargetNames, shardingValue);
}
-
+
@Override
public Collection<String> doSharding(final Collection<String> availableTargetNames, final ComplexKeysShardingValue<Comparable<?>> shardingValue) {
return complexKeysShardingAlgorithm.doSharding(availableTargetNames, shardingValue);
}
-
+
@Override
public Collection<String> doSharding(final Collection<String> availableTargetNames, final HintShardingValue<Comparable<?>> shardingValue) {
return hintShardingAlgorithm.doSharding(availableTargetNames, shardingValue);
}
-
+
@Override
public String getType() {
return "CLASS_BASED";
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmStrategyType.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmStrategyType.java
index d6531f8d3a4..83ff40986f0 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmStrategyType.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmStrategyType.java
@@ -21,17 +21,17 @@ package org.apache.shardingsphere.sharding.algorithm.sharding.classbased;
* Class based sharding strategy.
*/
public enum ClassBasedShardingAlgorithmStrategyType {
-
+
/**
* The sharding strategy is standard.
*/
STANDARD,
-
+
/**
* The sharding strategy is complex.
*/
COMPLEX,
-
+
/**
* The sharding strategy is hint.
*/
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/metadata/ShardingTableMetaDataBuilder.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/metadata/ShardingTableMetaDataBuilder.java
index 30fbce71325..2f1e633a130 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/metadata/ShardingTableMetaDataBuilder.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/metadata/ShardingTableMetaDataBuilder.java
@@ -76,10 +76,10 @@ public final class ShardingTableMetaDataBuilder implements RuleBasedTableMetaDat
result.put(entry.getKey(), decorate(entry.getKey(), entry.getValue(), rule));
}
return result;
- }
-
+ }
+
private TableMetaData decorate(final String tableName, final TableMetaData tableMetaData, final ShardingRule shardingRule) {
- return shardingRule.findTableRule(tableName).map(tableRule -> new TableMetaData(tableName, getColumnMetaDataList(tableMetaData, tableRule),
+ return shardingRule.findTableRule(tableName).map(tableRule -> new TableMetaData(tableName, getColumnMetaDataList(tableMetaData, tableRule),
getIndexMetaDataList(tableMetaData, tableRule), getConstraintMetaDataList(tableMetaData, shardingRule, tableRule))).orElse(tableMetaData);
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rewrite/context/ShardingSQLRewriteContextDecorator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rewrite/context/ShardingSQLRewriteContextDecorator.java
index 006a6022f9b..f79769ccfb7 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rewrite/context/ShardingSQLRewriteContextDecorator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rewrite/context/ShardingSQLRewriteContextDecorator.java
@@ -43,7 +43,7 @@ public final class ShardingSQLRewriteContextDecorator implements SQLRewriteConte
return;
}
if (!sqlRewriteContext.getParameters().isEmpty()) {
- Collection<ParameterRewriter> parameterRewriters = new ShardingParameterRewriterBuilder(shardingRule,
+ Collection<ParameterRewriter> parameterRewriters = new ShardingParameterRewriterBuilder(shardingRule,
routeContext, sqlRewriteContext.getSchema(), sqlRewriteContext.getSqlStatementContext()).getParameterRewriters();
rewriteParameters(sqlRewriteContext, parameterRewriters);
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rewrite/parameter/impl/ShardingPaginationParameterRewriter.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rewrite/parameter/impl/ShardingPaginationParameterRewriter.java
index 64ef36dada1..5c6e419be15 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rewrite/parameter/impl/ShardingPaginationParameterRewriter.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rewrite/parameter/impl/ShardingPaginationParameterRewriter.java
@@ -55,7 +55,7 @@ public final class ShardingPaginationParameterRewriter implements ParameterRewri
parameterBuilder.addReplacedParameters(offsetParameterIndex, pagination.getRevisedOffset());
}
- private void rewriteRowCount(final PaginationContext pagination,
+ private void rewriteRowCount(final PaginationContext pagination,
final int rowCountParameterIndex, final StandardParameterBuilder parameterBuilder, final SQLStatementContext sqlStatementContext) {
parameterBuilder.addReplacedParameters(rowCountParameterIndex, pagination.getRevisedRowCount((SelectStatementContext) sqlStatementContext));
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/generator/impl/ProjectionsTokenGenerator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/generator/impl/ProjectionsTokenGenerator.java
index c9736a42c6d..32c1b8f9a71 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/generator/impl/ProjectionsTokenGenerator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/generator/impl/ProjectionsTokenGenerator.java
@@ -115,7 +115,7 @@ public final class ProjectionsTokenGenerator implements OptionalSQLTokenGenerato
}
return Optional.empty();
}
-
+
private ColumnOrderByItemSegment generateNewColumnOrderByItem(final ColumnOrderByItemSegment old, final RouteUnit routeUnit, final TableExtractor tableExtractor) {
Optional<OwnerSegment> ownerSegment = old.getColumn().getOwner();
if (!ownerSegment.isPresent()) {
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/Column.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/Column.java
index 5d2afe5a1fa..425a3c9fa03 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/Column.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/Column.java
@@ -53,5 +53,5 @@ public final class Column {
@Override
public int hashCode() {
return hashCode;
- }
+ }
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/ExpressionConditionUtils.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/ExpressionConditionUtils.java
index 34a1245d994..d349a0381ad 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/ExpressionConditionUtils.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/ExpressionConditionUtils.java
@@ -28,7 +28,7 @@ import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.complex.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class ExpressionConditionUtils {
-
+
/**
* Judge now() expression.
* @param segment ExpressionSegment
@@ -37,7 +37,7 @@ public final class ExpressionConditionUtils {
public static boolean isNowExpression(final ExpressionSegment segment) {
return segment instanceof ComplexExpressionSegment && "now()".equalsIgnoreCase(((ComplexExpressionSegment) segment).getText());
}
-
+
/**
* Judge null expression.
* @param segment ExpressionSegment
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngine.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngine.java
index 84bc3ad3095..1d09eb939b2 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngine.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngine.java
@@ -41,7 +41,7 @@ public final class ShardingComplexRoutingEngine implements ShardingRouteEngine {
private final ShardingConditions shardingConditions;
private final ConfigurationProperties props;
-
+
private final Collection<String> logicTables;
@Override
@@ -68,7 +68,7 @@ public final class ShardingComplexRoutingEngine implements ShardingRouteEngine {
} else {
RouteContext routeContext = new ShardingCartesianRoutingEngine(routeContexts).route(shardingRule);
result.getOriginalDataNodes().addAll(routeContext.getOriginalDataNodes());
- result.getRouteUnits().addAll(routeContext.getRouteUnits());
+ result.getRouteUnits().addAll(routeContext.getRouteUnits());
}
return result;
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/unicast/ShardingUnicastRoutingEngine.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/unicast/ShardingUnicastRoutingEngine.java
index 7df32c08f45..dc14fac3e46 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/unicast/ShardingUnicastRoutingEngine.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/unicast/ShardingUnicastRoutingEngine.java
@@ -72,7 +72,7 @@ public final class ShardingUnicastRoutingEngine implements ShardingRouteEngine {
}
return result;
}
-
+
private void routeWithMultipleTables(final RouteContext routeContext, final ShardingRule shardingRule) throws ShardingSphereConfigurationException {
List<RouteMapper> tableMappers = new ArrayList<>(logicTables.size());
Set<String> availableDatasourceNames = Collections.emptySet();
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDDLStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDDLStatementValidator.java
index c04fd3a0f21..68022643d53 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDDLStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDDLStatementValidator.java
@@ -89,7 +89,7 @@ public abstract class ShardingDDLStatementValidator<T extends DDLStatement> impl
* @return whether route unit and data node are different size or not
*/
protected boolean isRouteUnitDataNodeDifferentSize(final ShardingRule shardingRule, final RouteContext routeContext, final String tableName) {
- return (shardingRule.isShardingTable(tableName) || shardingRule.isBroadcastTable(tableName))
+ return (shardingRule.isShardingTable(tableName) || shardingRule.isBroadcastTable(tableName))
&& shardingRule.getTableRule(tableName).getActualDataNodes().size() != routeContext.getRouteUnits().size();
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingInsertStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingInsertStatementValidator.java
index 9506eec0c06..06d1e4553b2 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingInsertStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingInsertStatementValidator.java
@@ -63,7 +63,7 @@ public final class ShardingInsertStatementValidator extends ShardingDMLStatement
throw new ShardingSphereException("INSERT INTO ... SELECT can not support applying keyGenerator to absent generateKeyColumn.");
}
TablesContext tablesContext = sqlStatementContext.getTablesContext();
- if (insertSelectSegment.isPresent() && shardingRule.tableRuleExists(tablesContext.getTableNames())
+ if (insertSelectSegment.isPresent() && shardingRule.tableRuleExists(tablesContext.getTableNames())
&& !isAllSameTables(tablesContext.getTableNames()) && !shardingRule.isAllBindingTables(tablesContext.getTableNames())) {
throw new ShardingSphereException("The table inserted and the table selected must be the same or bind tables.");
}
@@ -82,7 +82,7 @@ public final class ShardingInsertStatementValidator extends ShardingDMLStatement
}
@Override
- public void postValidate(final ShardingRule shardingRule, final SQLStatementContext<InsertStatement> sqlStatementContext, final List<Object> parameters,
+ public void postValidate(final ShardingRule shardingRule, final SQLStatementContext<InsertStatement> sqlStatementContext, final List<Object> parameters,
final ShardingSphereSchema schema, final ConfigurationProperties props, final RouteContext routeContext) {
Optional<SubquerySegment> insertSelect = sqlStatementContext.getSqlStatement().getInsertSelect();
if (insertSelect.isPresent() && shardingConditions.isNeedMerge()) {
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingUpdateStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingUpdateStatementValidator.java
index d72187b9661..2bf868a6600 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingUpdateStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingUpdateStatementValidator.java
@@ -38,16 +38,16 @@ import java.util.Optional;
public final class ShardingUpdateStatementValidator extends ShardingDMLStatementValidator<UpdateStatement> {
@Override
- public void preValidate(final ShardingRule shardingRule, final SQLStatementContext<UpdateStatement> sqlStatementContext,
+ public void preValidate(final ShardingRule shardingRule, final SQLStatementContext<UpdateStatement> sqlStatementContext,
final List<Object> parameters, final ShardingSphereSchema schema) {
validateMultipleTable(shardingRule, sqlStatementContext);
}
@Override
- public void postValidate(final ShardingRule shardingRule, final SQLStatementContext<UpdateStatement> sqlStatementContext, final List<Object> parameters,
+ public void postValidate(final ShardingRule shardingRule, final SQLStatementContext<UpdateStatement> sqlStatementContext, final List<Object> parameters,
final ShardingSphereSchema schema, final ConfigurationProperties props, final RouteContext routeContext) {
String tableName = sqlStatementContext.getTablesContext().getTableNames().iterator().next();
- Optional<ShardingConditions> shardingConditions = createShardingConditions(sqlStatementContext, shardingRule,
+ Optional<ShardingConditions> shardingConditions = createShardingConditions(sqlStatementContext, shardingRule,
sqlStatementContext.getSqlStatement().getSetAssignment().getAssignments(), parameters);
Optional<RouteContext> setAssignmentRouteContext = shardingConditions.map(optional -> new ShardingStandardRoutingEngine(tableName, optional, props).route(shardingRule));
if (setAssignmentRouteContext.isPresent() && !isSameRouteContext(routeContext, setAssignmentRouteContext.get())) {
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/strategy/type/standard/StandardShardingStrategy.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/strategy/type/standard/StandardShardingStrategy.java
index 57202f5ab12..91441a4a911 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/strategy/type/standard/StandardShardingStrategy.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/strategy/type/standard/StandardShardingStrategy.java
@@ -60,7 +60,7 @@ public final class StandardShardingStrategy implements ShardingStrategy {
final DataNodeInfo dataNodeInfo, final ConfigurationProperties props) {
ShardingConditionValue shardingConditionValue = shardingConditionValues.iterator().next();
Collection<String> shardingResult = shardingConditionValue instanceof ListShardingConditionValue
- ? doSharding(availableTargetNames, (ListShardingConditionValue) shardingConditionValue, dataNodeInfo)
+ ? doSharding(availableTargetNames, (ListShardingConditionValue) shardingConditionValue, dataNodeInfo)
: doSharding(availableTargetNames, (RangeShardingConditionValue) shardingConditionValue, dataNodeInfo);
Collection<String> result = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
result.addAll(shardingResult);
@@ -71,7 +71,7 @@ public final class StandardShardingStrategy implements ShardingStrategy {
private Collection<String> doSharding(final Collection<String> availableTargetNames, final ListShardingConditionValue<?> shardingValue, final DataNodeInfo dataNodeInfo) {
Collection<String> result = new LinkedList<>();
for (Comparable<?> each : shardingValue.getValues()) {
- String target = shardingAlgorithm.doSharding(availableTargetNames,
+ String target = shardingAlgorithm.doSharding(availableTargetNames,
new PreciseShardingValue(shardingValue.getTableName(), shardingValue.getColumnName(), dataNodeInfo, each));
if (null != target && availableTargetNames.contains(target)) {
result.add(target);
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/yaml/config/YamlShardingRuleConfiguration.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/yaml/config/YamlShardingRuleConfiguration.java
index 91ced234cc6..7a831569475 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/yaml/config/YamlShardingRuleConfiguration.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/yaml/config/YamlShardingRuleConfiguration.java
@@ -57,7 +57,7 @@ public final class YamlShardingRuleConfiguration implements YamlRuleConfiguratio
private Map<String, YamlShardingSphereAlgorithmConfiguration> shardingAlgorithms = new LinkedHashMap<>();
private Map<String, YamlShardingSphereAlgorithmConfiguration> keyGenerators = new LinkedHashMap<>();
-
+
private String defaultShardingColumn;
private String scalingName;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmTest.java
index d7a21b0e7ed..033e7221b10 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmTest.java
@@ -89,7 +89,7 @@ public final class ClassBasedShardingAlgorithmTest {
public void assertPreciseDoSharding() {
ClassBasedShardingAlgorithm shardingAlgorithm = getStandardShardingAlgorithm();
List<String> availableTargetNames = Arrays.asList("t_order_0", "t_order_1", "t_order_2", "t_order_3");
- assertThat(shardingAlgorithm.doSharding(availableTargetNames,
+ assertThat(shardingAlgorithm.doSharding(availableTargetNames,
new PreciseShardingValue<>("t_order", "order_id", DATA_NODE_INFO, 0)), is("t_order_0"));
}
@@ -97,7 +97,7 @@ public final class ClassBasedShardingAlgorithmTest {
public void assertRangeDoSharding() {
ClassBasedShardingAlgorithm shardingAlgorithm = getStandardShardingAlgorithm();
List<String> availableTargetNames = Arrays.asList("t_order_0", "t_order_1", "t_order_2", "t_order_3");
- Collection<String> actual = shardingAlgorithm.doSharding(availableTargetNames,
+ Collection<String> actual = shardingAlgorithm.doSharding(availableTargetNames,
new RangeShardingValue<>("t_order", "order_id", DATA_NODE_INFO, Range.closed(2, 15)));
assertThat(actual.size(), is(4));
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/cosid/CosIdSnowflakeIntervalShardingAlgorithmTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/cosid/CosIdSnowflakeIntervalShardingAlgorithmTest.java
index 5869cf0baee..51bcd13d2e4 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/cosid/CosIdSnowflakeIntervalShardingAlgorithmTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/cosid/CosIdSnowflakeIntervalShardingAlgorithmTest.java
@@ -95,7 +95,7 @@ public final class CosIdSnowflakeIntervalShardingAlgorithmTest {
@Test
public void assertDoSharding() {
- PreciseShardingValue shardingValue = new PreciseShardingValue<>(CosIdIntervalShardingAlgorithmTest.LOGIC_NAME,
+ PreciseShardingValue shardingValue = new PreciseShardingValue<>(CosIdIntervalShardingAlgorithmTest.LOGIC_NAME,
CosIdIntervalShardingAlgorithmTest.COLUMN_NAME, new DataNodeInfo(CosIdIntervalShardingAlgorithmTest.LOGIC_NAME_PREFIX, 6, '0'), snowflakeId);
String actual = shardingAlgorithm.doSharding(CosIdIntervalShardingAlgorithmTest.ALL_NODES, shardingValue);
assertThat(actual, is(expected));
@@ -128,7 +128,7 @@ public final class CosIdSnowflakeIntervalShardingAlgorithmTest {
@Test
public void assertDoSharding() {
- RangeShardingValue shardingValue = new RangeShardingValue<>(CosIdIntervalShardingAlgorithmTest.LOGIC_NAME,
+ RangeShardingValue shardingValue = new RangeShardingValue<>(CosIdIntervalShardingAlgorithmTest.LOGIC_NAME,
CosIdIntervalShardingAlgorithmTest.COLUMN_NAME, new DataNodeInfo(CosIdIntervalShardingAlgorithmTest.LOGIC_NAME_PREFIX, 6, '0'), rangeValue);
Collection<String> actual = shardingAlgorithm.doSharding(CosIdIntervalShardingAlgorithmTest.ALL_NODES, shardingValue);
assertThat(actual, is(expected));
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/AutoIntervalShardingAlgorithmTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/AutoIntervalShardingAlgorithmTest.java
index 68d2c45f371..2e0ed3bdc2f 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/AutoIntervalShardingAlgorithmTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/AutoIntervalShardingAlgorithmTest.java
@@ -51,21 +51,21 @@ public final class AutoIntervalShardingAlgorithmTest {
@Test
public void assertPreciseDoSharding() {
List<String> availableTargetNames = Arrays.asList("t_order_0", "t_order_1", "t_order_2", "t_order_3");
- assertThat(shardingAlgorithm.doSharding(availableTargetNames,
+ assertThat(shardingAlgorithm.doSharding(availableTargetNames,
new PreciseShardingValue<>("t_order", "create_time", DATA_NODE_INFO, "2020-01-01 00:00:01")), is("t_order_1"));
}
@Test
public void assertPreciseDoShardingBeyondTheLastOne() {
List<String> availableTargetNames = Arrays.asList("t_order_0", "t_order_1", "t_order_2", "t_order_3", "t_order_4", "t_order_5");
- assertThat(shardingAlgorithm.doSharding(availableTargetNames,
+ assertThat(shardingAlgorithm.doSharding(availableTargetNames,
new PreciseShardingValue<>("t_order", "create_time", DATA_NODE_INFO, "2021-01-01 00:00:02")), is("t_order_5"));
}
@Test
public void assertRangeDoShardingWithAllRange() {
List<String> availableTargetNames = Arrays.asList("t_order_0", "t_order_1", "t_order_2", "t_order_3", "t_order_4");
- Collection<String> actual = shardingAlgorithm.doSharding(availableTargetNames,
+ Collection<String> actual = shardingAlgorithm.doSharding(availableTargetNames,
new RangeShardingValue<>("t_order", "create_time", DATA_NODE_INFO, Range.closed("2019-01-01 00:00:00", "2020-01-01 00:00:15")));
assertThat(actual.size(), is(5));
}
@@ -73,7 +73,7 @@ public final class AutoIntervalShardingAlgorithmTest {
@Test
public void assertRangeDoShardingWithPartRange() {
List<String> availableTargetNames = Arrays.asList("t_order_0", "t_order_1", "t_order_2", "t_order_3", "t_order_4");
- Collection<String> actual = shardingAlgorithm.doSharding(availableTargetNames,
+ Collection<String> actual = shardingAlgorithm.doSharding(availableTargetNames,
new RangeShardingValue<>("t_order", "create_time", DATA_NODE_INFO, Range.closed("2020-01-01 00:00:04", "2020-01-01 00:00:10")));
assertThat(actual.size(), is(3));
assertTrue(actual.contains("t_order_1"));
@@ -84,7 +84,7 @@ public final class AutoIntervalShardingAlgorithmTest {
@Test
public void assertRangeDoShardingWithoutLowerBound() {
List<String> availableTargetNames = Arrays.asList("t_order_0", "t_order_1", "t_order_2", "t_order_3");
- Collection<String> actual = shardingAlgorithm.doSharding(availableTargetNames,
+ Collection<String> actual = shardingAlgorithm.doSharding(availableTargetNames,
new RangeShardingValue<>("t_order", "create_time", DATA_NODE_INFO, Range.lessThan("2020-01-01 00:00:11")));
assertThat(actual.size(), is(4));
assertTrue(actual.contains("t_order_0"));
@@ -96,7 +96,7 @@ public final class AutoIntervalShardingAlgorithmTest {
@Test
public void assertRangeDoShardingWithoutUpperBound() {
List<String> availableTargetNames = Arrays.asList("t_order_0", "t_order_1", "t_order_2", "t_order_3", "t_order_4", "t_order_5");
- Collection<String> actual = shardingAlgorithm.doSharding(availableTargetNames,
+ Collection<String> actual = shardingAlgorithm.doSharding(availableTargetNames,
new RangeShardingValue<>("t_order", "create_time", DATA_NODE_INFO, Range.greaterThan("2020-01-01 00:00:09")));
assertThat(actual.size(), is(3));
assertTrue(actual.contains("t_order_3"));
@@ -125,11 +125,11 @@ public final class AutoIntervalShardingAlgorithmTest {
for (int i = 0; i < 32; i++) {
availableTargetNames.add("t_order_" + i);
}
- Collection<String> actual = shardingAlgorithm.doSharding(availableTargetNames,
+ Collection<String> actual = shardingAlgorithm.doSharding(availableTargetNames,
new RangeShardingValue<>("t_order", "create_time", DATA_NODE_INFO, Range.closed("2020-01-01 00:00:00", "2020-01-01 00:00:10")));
assertThat(actual.size(), is(11));
}
-
+
@Test
public void assertRangeDoShardingInValueWithMilliseconds() {
AutoIntervalShardingAlgorithm shardingAlgorithm = new AutoIntervalShardingAlgorithm();
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithmTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithmTest.java
index b26c54f2031..a4fd29b1807 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithmTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithmTest.java
@@ -64,16 +64,16 @@ public final class InlineShardingAlgorithmTest {
@Test(expected = ShardingSphereException.class)
public void assertDoSharding() {
List<String> availableTargetNames = Arrays.asList("t_order_0", "t_order_1", "t_order_2", "t_order_3");
- assertThat(inlineShardingAlgorithm.doSharding(availableTargetNames,
+ assertThat(inlineShardingAlgorithm.doSharding(availableTargetNames,
new PreciseShardingValue<>("t_order", "order_id", DATA_NODE_INFO, 0)), is("t_order_0"));
- inlineShardingAlgorithm.doSharding(availableTargetNames,
+ inlineShardingAlgorithm.doSharding(availableTargetNames,
new PreciseShardingValue<>("t_order", "non_existent_column1", DATA_NODE_INFO, 0));
}
@Test
public void assertDoShardingWithRangeShardingConditionValue() {
List<String> availableTargetNames = Arrays.asList("t_order_0", "t_order_1", "t_order_2", "t_order_3");
- Collection<String> actual = inlineShardingAlgorithm.doSharding(availableTargetNames,
+ Collection<String> actual = inlineShardingAlgorithm.doSharding(availableTargetNames,
new RangeShardingValue<>("t_order", "order_id", DATA_NODE_INFO, mock(Range.class)));
assertTrue(actual.containsAll(availableTargetNames));
}
@@ -81,9 +81,9 @@ public final class InlineShardingAlgorithmTest {
@Test
public void assertDoShardingWithNonExistNodes() {
List<String> availableTargetNames = Arrays.asList("t_order_0", "t_order_1");
- assertThat(inlineShardingAlgorithm.doSharding(availableTargetNames,
+ assertThat(inlineShardingAlgorithm.doSharding(availableTargetNames,
new PreciseShardingValue<>("t_order", "order_id", DATA_NODE_INFO, 0)), is("t_order_0"));
- assertThat(inlineShardingAlgorithmWithSimplified.doSharding(availableTargetNames,
+ assertThat(inlineShardingAlgorithmWithSimplified.doSharding(availableTargetNames,
new PreciseShardingValue<>("t_order", "order_id", DATA_NODE_INFO, 0)), is("t_order_0"));
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/mod/HashModShardingAlgorithmTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/mod/HashModShardingAlgorithmTest.java
index 96e918bb833..2408a419f2f 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/mod/HashModShardingAlgorithmTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/mod/HashModShardingAlgorithmTest.java
@@ -47,14 +47,14 @@ public final class HashModShardingAlgorithmTest {
@Test
public void assertPreciseDoSharding() {
List<String> availableTargetNames = Arrays.asList("t_order_0", "t_order_1", "t_order_2", "t_order_3");
- assertThat(shardingAlgorithm.doSharding(availableTargetNames,
+ assertThat(shardingAlgorithm.doSharding(availableTargetNames,
new PreciseShardingValue<>("t_order", "order_type", DATA_NODE_INFO, "a")), is("t_order_1"));
}
@Test
public void assertRangeDoSharding() {
List<String> availableTargetNames = Arrays.asList("t_order_0", "t_order_1", "t_order_2", "t_order_3");
- Collection<String> actual = shardingAlgorithm.doSharding(availableTargetNames,
+ Collection<String> actual = shardingAlgorithm.doSharding(availableTargetNames,
new RangeShardingValue<>("t_order", "create_time", DATA_NODE_INFO, Range.closed("a", "f")));
assertThat(actual.size(), is(4));
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/mod/ModShardingAlgorithmTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/mod/ModShardingAlgorithmTest.java
index 3f3ca22a316..ae40941baad 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/mod/ModShardingAlgorithmTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/mod/ModShardingAlgorithmTest.java
@@ -46,25 +46,25 @@ public final class ModShardingAlgorithmTest {
@Test
public void assertPreciseDoSharding() {
- assertThat(shardingAlgorithm.doSharding(createAvailableTargetNames(),
+ assertThat(shardingAlgorithm.doSharding(createAvailableTargetNames(),
new PreciseShardingValue<>("t_order", "order_id", DATA_NODE_INFO, 17)), is("t_order_1"));
}
@Test
public void assertRangeDoShardingWithAllTargets() {
- Collection<String> actual = shardingAlgorithm.doSharding(createAvailableTargetNames(),
+ Collection<String> actual = shardingAlgorithm.doSharding(createAvailableTargetNames(),
new RangeShardingValue<>("t_order", "order_id", DATA_NODE_INFO, Range.closed(1L, 16L)));
assertThat(actual.size(), is(16));
}
private Collection<String> createAvailableTargetNames() {
- return Arrays.asList("t_order_8", "t_order_9", "t_order_10", "t_order_11", "t_order_12", "t_order_13", "t_order_14", "t_order_15",
+ return Arrays.asList("t_order_8", "t_order_9", "t_order_10", "t_order_11", "t_order_12", "t_order_13", "t_order_14", "t_order_15",
"t_order_0", "t_order_1", "t_order_2", "t_order_3", "t_order_4", "t_order_5", "t_order_6", "t_order_7");
}
@Test
public void assertRangeDoShardingWithPartTargets() {
- Collection<String> actual = shardingAlgorithm.doSharding(createAvailableTargetNames(),
+ Collection<String> actual = shardingAlgorithm.doSharding(createAvailableTargetNames(),
new RangeShardingValue<>("t_order", "order_id", DATA_NODE_INFO, Range.closed(1L, 2L)));
assertThat(actual.size(), is(2));
assertTrue(actual.contains("t_order_1"));
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/iterator/IteratorStreamMergedResultTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/iterator/IteratorStreamMergedResultTest.java
index 1bc84a20277..00b71900e7d 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/iterator/IteratorStreamMergedResultTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/iterator/IteratorStreamMergedResultTest.java
@@ -106,7 +106,7 @@ public final class IteratorStreamMergedResultTest {
@Test
public void assertNextForMix() throws SQLException {
- List<QueryResult> queryResults = Arrays.asList(mock(QueryResult.class, RETURNS_DEEP_STUBS), mock(QueryResult.class, RETURNS_DEEP_STUBS), mock(QueryResult.class, RETURNS_DEEP_STUBS),
+ List<QueryResult> queryResults = Arrays.asList(mock(QueryResult.class, RETURNS_DEEP_STUBS), mock(QueryResult.class, RETURNS_DEEP_STUBS), mock(QueryResult.class, RETURNS_DEEP_STUBS),
mock(QueryResult.class, RETURNS_DEEP_STUBS), mock(QueryResult.class, RETURNS_DEEP_STUBS), mock(QueryResult.class, RETURNS_DEEP_STUBS));
when(queryResults.get(1).next()).thenReturn(true, false);
when(queryResults.get(3).next()).thenReturn(true, false);
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/orderby/OrderByValueTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/orderby/OrderByValueTest.java
index 55e309e1bc5..403fcde36a3 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/orderby/OrderByValueTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/orderby/OrderByValueTest.java
@@ -89,16 +89,16 @@ public final class OrderByValueTest {
ShardingSphereSchema schema = mock(ShardingSphereSchema.class);
QueryResult queryResult1 = createQueryResult("1", "2");
OrderByValue orderByValue1 = new OrderByValue(queryResult1, Arrays.asList(
- createOrderByItem(new IndexOrderByItemSegment(0, 0, 1, OrderDirection.ASC, OrderDirection.ASC)),
- createOrderByItem(new IndexOrderByItemSegment(0, 0, 2, OrderDirection.ASC, OrderDirection.ASC))),
- selectStatementContext, schema);
+ createOrderByItem(new IndexOrderByItemSegment(0, 0, 1, OrderDirection.ASC, OrderDirection.ASC)),
+ createOrderByItem(new IndexOrderByItemSegment(0, 0, 2, OrderDirection.ASC, OrderDirection.ASC))),
+ selectStatementContext, schema);
FieldSetter.setField(orderByValue1, OrderByValue.class.getDeclaredField("orderValuesCaseSensitive"), Arrays.asList(false, false));
assertTrue(orderByValue1.next());
QueryResult queryResult2 = createQueryResult("3", "4");
OrderByValue orderByValue2 = new OrderByValue(queryResult2, Arrays.asList(
- createOrderByItem(new IndexOrderByItemSegment(0, 0, 1, OrderDirection.ASC, OrderDirection.ASC)),
- createOrderByItem(new IndexOrderByItemSegment(0, 0, 2, OrderDirection.ASC, OrderDirection.ASC))),
- selectStatementContext, schema);
+ createOrderByItem(new IndexOrderByItemSegment(0, 0, 1, OrderDirection.ASC, OrderDirection.ASC)),
+ createOrderByItem(new IndexOrderByItemSegment(0, 0, 2, OrderDirection.ASC, OrderDirection.ASC))),
+ selectStatementContext, schema);
FieldSetter.setField(orderByValue2, OrderByValue.class.getDeclaredField("orderValuesCaseSensitive"), Arrays.asList(false, false));
assertTrue(orderByValue2.next());
assertTrue(orderByValue1.compareTo(orderByValue2) < 0);
@@ -142,16 +142,16 @@ public final class OrderByValueTest {
when(schema.get("table")).thenReturn(new TableMetaData());
QueryResult queryResult1 = createQueryResult("1", "2");
OrderByValue orderByValue1 = new OrderByValue(queryResult1, Arrays.asList(
- createOrderByItem(new IndexOrderByItemSegment(0, 0, 1, OrderDirection.DESC, OrderDirection.ASC)),
- createOrderByItem(new IndexOrderByItemSegment(0, 0, 2, OrderDirection.DESC, OrderDirection.ASC))),
- selectStatementContext, schema);
+ createOrderByItem(new IndexOrderByItemSegment(0, 0, 1, OrderDirection.DESC, OrderDirection.ASC)),
+ createOrderByItem(new IndexOrderByItemSegment(0, 0, 2, OrderDirection.DESC, OrderDirection.ASC))),
+ selectStatementContext, schema);
FieldSetter.setField(orderByValue1, OrderByValue.class.getDeclaredField("orderValuesCaseSensitive"), Arrays.asList(false, false));
assertTrue(orderByValue1.next());
QueryResult queryResult2 = createQueryResult("3", "4");
OrderByValue orderByValue2 = new OrderByValue(queryResult2, Arrays.asList(
- createOrderByItem(new IndexOrderByItemSegment(0, 0, 1, OrderDirection.DESC, OrderDirection.ASC)),
- createOrderByItem(new IndexOrderByItemSegment(0, 0, 2, OrderDirection.DESC, OrderDirection.ASC))),
- selectStatementContext, schema);
+ createOrderByItem(new IndexOrderByItemSegment(0, 0, 1, OrderDirection.DESC, OrderDirection.ASC)),
+ createOrderByItem(new IndexOrderByItemSegment(0, 0, 2, OrderDirection.DESC, OrderDirection.ASC))),
+ selectStatementContext, schema);
FieldSetter.setField(orderByValue2, OrderByValue.class.getDeclaredField("orderValuesCaseSensitive"), Arrays.asList(false, false));
assertTrue(orderByValue2.next());
assertTrue(orderByValue1.compareTo(orderByValue2) > 0);
@@ -194,16 +194,16 @@ public final class OrderByValueTest {
ShardingSphereSchema schema = mock(ShardingSphereSchema.class);
QueryResult queryResult1 = createQueryResult("1", "2");
OrderByValue orderByValue1 = new OrderByValue(queryResult1, Arrays.asList(
- createOrderByItem(new IndexOrderByItemSegment(0, 0, 1, OrderDirection.ASC, OrderDirection.ASC)),
- createOrderByItem(new IndexOrderByItemSegment(0, 0, 2, OrderDirection.DESC, OrderDirection.ASC))),
- selectStatementContext, schema);
+ createOrderByItem(new IndexOrderByItemSegment(0, 0, 1, OrderDirection.ASC, OrderDirection.ASC)),
+ createOrderByItem(new IndexOrderByItemSegment(0, 0, 2, OrderDirection.DESC, OrderDirection.ASC))),
+ selectStatementContext, schema);
FieldSetter.setField(orderByValue1, OrderByValue.class.getDeclaredField("orderValuesCaseSensitive"), Arrays.asList(false, false));
assertTrue(orderByValue1.next());
QueryResult queryResult2 = createQueryResult("1", "2");
OrderByValue orderByValue2 = new OrderByValue(queryResult2, Arrays.asList(
- createOrderByItem(new IndexOrderByItemSegment(0, 0, 1, OrderDirection.ASC, OrderDirection.ASC)),
- createOrderByItem(new IndexOrderByItemSegment(0, 0, 2, OrderDirection.DESC, OrderDirection.ASC))),
- selectStatementContext, schema);
+ createOrderByItem(new IndexOrderByItemSegment(0, 0, 1, OrderDirection.ASC, OrderDirection.ASC)),
+ createOrderByItem(new IndexOrderByItemSegment(0, 0, 2, OrderDirection.DESC, OrderDirection.ASC))),
+ selectStatementContext, schema);
FieldSetter.setField(orderByValue2, OrderByValue.class.getDeclaredField("orderValuesCaseSensitive"), Arrays.asList(false, false));
assertTrue(orderByValue2.next());
assertThat(orderByValue1.compareTo(orderByValue2), is(0));
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/metadata/ShardingTableMetaDataBuilderTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/metadata/ShardingTableMetaDataBuilderTest.java
index d3788486e52..742a7a9e021 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/metadata/ShardingTableMetaDataBuilderTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/metadata/ShardingTableMetaDataBuilderTest.java
@@ -278,7 +278,7 @@ public class ShardingTableMetaDataBuilderTest {
when(props.getValue(ConfigurationPropertyKey.CHECK_TABLE_METADATA_ENABLED)).thenReturn(false);
DatabaseType databaseType = mock(OracleDatabaseType.class);
when(databaseType.getName()).thenReturn("Oracle");
- Map<String, TableMetaData> actual = loader.load(Collections.singletonList(TABLE_NAME), shardingRule,
+ Map<String, TableMetaData> actual = loader.load(Collections.singletonList(TABLE_NAME), shardingRule,
new SchemaBuilderMaterials(databaseType, Collections.singletonMap("ds", dataSource), rules, props));
assertThat(actual.keySet().iterator().next(), is("t_order"));
TableMetaData tableMetaData = actual.values().iterator().next();
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngineTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngineTest.java
index 436d4235a98..527e5945402 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngineTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngineTest.java
@@ -39,7 +39,7 @@ public final class ShardingComplexRoutingEngineTest extends AbstractRoutingEngin
@Test
public void assertRoutingForBindingTables() {
- ShardingComplexRoutingEngine complexRoutingEngine = new ShardingComplexRoutingEngine(createShardingConditions("t_order"),
+ ShardingComplexRoutingEngine complexRoutingEngine = new ShardingComplexRoutingEngine(createShardingConditions("t_order"),
new ConfigurationProperties(new Properties()), Arrays.asList("t_order", "t_order_item"));
RouteContext routeContext = complexRoutingEngine.route(createBindingShardingRule());
List<RouteUnit> routeUnits = new ArrayList<>(routeContext.getRouteUnits());
@@ -52,7 +52,7 @@ public final class ShardingComplexRoutingEngineTest extends AbstractRoutingEngin
@Test
public void assertRoutingForShardingTableJoinBroadcastTable() {
- ShardingComplexRoutingEngine complexRoutingEngine = new ShardingComplexRoutingEngine(createShardingConditions("t_order"),
+ ShardingComplexRoutingEngine complexRoutingEngine = new ShardingComplexRoutingEngine(createShardingConditions("t_order"),
new ConfigurationProperties(new Properties()), Arrays.asList("t_order", "t_config"));
RouteContext routeContext = complexRoutingEngine.route(createBroadcastShardingRule());
List<RouteUnit> routeUnits = new ArrayList<>(routeContext.getRouteUnits());
@@ -65,7 +65,7 @@ public final class ShardingComplexRoutingEngineTest extends AbstractRoutingEngin
@Test(expected = ShardingSphereException.class)
public void assertRoutingForNonLogicTable() {
- ShardingComplexRoutingEngine complexRoutingEngine = new ShardingComplexRoutingEngine(createShardingConditions("t_order"),
+ ShardingComplexRoutingEngine complexRoutingEngine = new ShardingComplexRoutingEngine(createShardingConditions("t_order"),
new ConfigurationProperties(new Properties()), Collections.emptyList());
RouteContext routeContext = complexRoutingEngine.route(mock(ShardingRule.class));
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/AbstractSQLRouteTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/AbstractSQLRouteTest.java
index 62f2aa47d1f..a3b5217a1d1 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/AbstractSQLRouteTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/AbstractSQLRouteTest.java
@@ -60,7 +60,7 @@ public abstract class AbstractSQLRouteTest extends AbstractRoutingEngineTest {
SingleTableRule singleTableRule = createAllSingleTableRule(Collections.singletonList(shardingRule));
Map<String, ShardingSphereSchema> schemas = buildSchemas();
ConfigurationProperties props = new ConfigurationProperties(new Properties());
- SQLStatementParserEngine sqlStatementParserEngine = new SQLStatementParserEngine("MySQL",
+ SQLStatementParserEngine sqlStatementParserEngine = new SQLStatementParserEngine("MySQL",
new CacheOption(2000, 65535L, 4), new CacheOption(128, 1024L, 4), false);
ShardingSphereRuleMetaData ruleMetaData = new ShardingSphereRuleMetaData(Collections.emptyList(), Arrays.asList(shardingRule, singleTableRule));
ShardingSphereResource resource = mock(ShardingSphereResource.class, RETURNS_DEEP_STUBS);
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngineTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngineTest.java
index d38f54538bd..ee8746f88d1 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngineTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngineTest.java
@@ -47,7 +47,7 @@ public final class ShardingStandardRoutingEngineTest extends AbstractRoutingEngi
@Test
public void assertRouteByNonConditions() {
- ShardingStandardRoutingEngine standardRoutingEngine = createShardingStandardRoutingEngine("t_order",
+ ShardingStandardRoutingEngine standardRoutingEngine = createShardingStandardRoutingEngine("t_order",
new ShardingConditions(Collections.emptyList(), mock(SQLStatementContext.class), mock(ShardingRule.class)));
RouteContext routeContext = standardRoutingEngine.route(createBasedShardingRule());
List<RouteUnit> routeUnits = new ArrayList<>(routeContext.getRouteUnits());
@@ -90,7 +90,7 @@ public final class ShardingStandardRoutingEngineTest extends AbstractRoutingEngi
@Test
public void assertRouteByHint() {
- ShardingStandardRoutingEngine standardRoutingEngine = createShardingStandardRoutingEngine("t_hint_test",
+ ShardingStandardRoutingEngine standardRoutingEngine = createShardingStandardRoutingEngine("t_hint_test",
new ShardingConditions(Collections.emptyList(), mock(SQLStatementContext.class), mock(ShardingRule.class)));
HintManager hintManager = HintManager.getInstance();
hintManager.addDatabaseShardingValue("t_hint_test", 1);
@@ -120,7 +120,7 @@ public final class ShardingStandardRoutingEngineTest extends AbstractRoutingEngi
@Test
public void assertRouteByMixedWithHintDatasourceOnly() {
- ShardingStandardRoutingEngine standardRoutingEngine = createShardingStandardRoutingEngine("t_hint_ds_test",
+ ShardingStandardRoutingEngine standardRoutingEngine = createShardingStandardRoutingEngine("t_hint_ds_test",
new ShardingConditions(Collections.emptyList(), mock(SQLStatementContext.class), mock(ShardingRule.class)));
HintManager hintManager = HintManager.getInstance();
hintManager.addDatabaseShardingValue("t_hint_ds_test", 1);
@@ -153,7 +153,7 @@ public final class ShardingStandardRoutingEngineTest extends AbstractRoutingEngi
@Test
public void assertRouteByMixedWithHintTableOnly() {
- ShardingStandardRoutingEngine standardRoutingEngine = createShardingStandardRoutingEngine("t_hint_table_test",
+ ShardingStandardRoutingEngine standardRoutingEngine = createShardingStandardRoutingEngine("t_hint_table_test",
new ShardingConditions(Collections.emptyList(), mock(SQLStatementContext.class), mock(ShardingRule.class)));
HintManager hintManager = HintManager.getInstance();
hintManager.addTableShardingValue("t_hint_table_test", 1);
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterTableStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterTableStatementValidatorTest.java
index 92763f3feac..4e423daa51d 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterTableStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterTableStatementValidatorTest.java
@@ -89,7 +89,7 @@ public final class ShardingAlterTableStatementValidatorTest {
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_order", "t_order_0"))));
routeUnits.add(new RouteUnit(new RouteMapper("ds_1", "ds_1"), Collections.singletonList(new RouteMapper("t_order", "t_order_0"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingAlterTableStatementValidator().postValidate(shardingRule, new AlterTableStatementContext(sqlStatement),
+ new ShardingAlterTableStatementValidator().postValidate(shardingRule, new AlterTableStatementContext(sqlStatement),
Collections.emptyList(), schema, mock(ConfigurationProperties.class), routeContext);
}
@@ -102,7 +102,7 @@ public final class ShardingAlterTableStatementValidatorTest {
Collection<RouteUnit> routeUnits = new LinkedList<>();
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_order", "t_order_0"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingAlterTableStatementValidator().postValidate(shardingRule, new AlterTableStatementContext(sqlStatement),
+ new ShardingAlterTableStatementValidator().postValidate(shardingRule, new AlterTableStatementContext(sqlStatement),
Collections.emptyList(), schema, mock(ConfigurationProperties.class), routeContext);
}
@@ -116,7 +116,7 @@ public final class ShardingAlterTableStatementValidatorTest {
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_config", "t_config"))));
routeUnits.add(new RouteUnit(new RouteMapper("ds_1", "ds_1"), Collections.singletonList(new RouteMapper("t_config", "t_config"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingAlterTableStatementValidator().postValidate(shardingRule, new AlterTableStatementContext(sqlStatement),
+ new ShardingAlterTableStatementValidator().postValidate(shardingRule, new AlterTableStatementContext(sqlStatement),
Collections.emptyList(), schema, mock(ConfigurationProperties.class), routeContext);
}
@@ -129,7 +129,7 @@ public final class ShardingAlterTableStatementValidatorTest {
Collection<RouteUnit> routeUnits = new LinkedList<>();
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_config", "t_config"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingAlterTableStatementValidator().postValidate(shardingRule, new AlterTableStatementContext(sqlStatement),
+ new ShardingAlterTableStatementValidator().postValidate(shardingRule, new AlterTableStatementContext(sqlStatement),
Collections.emptyList(), schema, mock(ConfigurationProperties.class), routeContext);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateTableStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateTableStatementValidatorTest.java
index efa68a370b9..db55c4657cb 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateTableStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateTableStatementValidatorTest.java
@@ -139,7 +139,7 @@ public final class ShardingCreateTableStatementValidatorTest {
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_order", "t_order_0"))));
routeUnits.add(new RouteUnit(new RouteMapper("ds_1", "ds_1"), Collections.singletonList(new RouteMapper("t_order", "t_order_0"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingCreateTableStatementValidator().postValidate(shardingRule, new CreateTableStatementContext(sqlStatement), Collections.emptyList(),
+ new ShardingCreateTableStatementValidator().postValidate(shardingRule, new CreateTableStatementContext(sqlStatement), Collections.emptyList(),
schema, mock(ConfigurationProperties.class), routeContext);
}
@@ -152,7 +152,7 @@ public final class ShardingCreateTableStatementValidatorTest {
Collection<RouteUnit> routeUnits = new LinkedList<>();
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_order", "t_order_0"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingCreateTableStatementValidator().postValidate(shardingRule, new CreateTableStatementContext(sqlStatement), Collections.emptyList(),
+ new ShardingCreateTableStatementValidator().postValidate(shardingRule, new CreateTableStatementContext(sqlStatement), Collections.emptyList(),
schema, mock(ConfigurationProperties.class), routeContext);
}
@@ -166,7 +166,7 @@ public final class ShardingCreateTableStatementValidatorTest {
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_config", "t_config"))));
routeUnits.add(new RouteUnit(new RouteMapper("ds_1", "ds_1"), Collections.singletonList(new RouteMapper("t_config", "t_config"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingCreateTableStatementValidator().postValidate(shardingRule, new CreateTableStatementContext(sqlStatement), Collections.emptyList(),
+ new ShardingCreateTableStatementValidator().postValidate(shardingRule, new CreateTableStatementContext(sqlStatement), Collections.emptyList(),
schema, mock(ConfigurationProperties.class), routeContext);
}
@@ -179,7 +179,7 @@ public final class ShardingCreateTableStatementValidatorTest {
Collection<RouteUnit> routeUnits = new LinkedList<>();
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_config", "t_config"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingCreateTableStatementValidator().postValidate(shardingRule, new CreateTableStatementContext(sqlStatement), Collections.emptyList(),
+ new ShardingCreateTableStatementValidator().postValidate(shardingRule, new CreateTableStatementContext(sqlStatement), Collections.emptyList(),
schema, mock(ConfigurationProperties.class), routeContext);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropIndexStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropIndexStatementValidatorTest.java
index 99df1c8b225..8327a602fba 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropIndexStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropIndexStatementValidatorTest.java
@@ -105,7 +105,7 @@ public final class ShardingDropIndexStatementValidatorTest {
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_order", "t_order_0"))));
routeUnits.add(new RouteUnit(new RouteMapper("ds_1", "ds_1"), Collections.singletonList(new RouteMapper("t_order", "t_order_0"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingDropIndexStatementValidator().postValidate(shardingRule, new DropIndexStatementContext(sqlStatement),
+ new ShardingDropIndexStatementValidator().postValidate(shardingRule, new DropIndexStatementContext(sqlStatement),
Collections.emptyList(), schema, mock(ConfigurationProperties.class), routeContext);
}
@@ -125,7 +125,7 @@ public final class ShardingDropIndexStatementValidatorTest {
Collection<RouteUnit> routeUnits = new LinkedList<>();
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_order", "t_order_0"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingDropIndexStatementValidator().postValidate(shardingRule, new DropIndexStatementContext(sqlStatement),
+ new ShardingDropIndexStatementValidator().postValidate(shardingRule, new DropIndexStatementContext(sqlStatement),
Collections.emptyList(), schema, mock(ConfigurationProperties.class), routeContext);
}
@@ -146,7 +146,7 @@ public final class ShardingDropIndexStatementValidatorTest {
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_config", "t_config"))));
routeUnits.add(new RouteUnit(new RouteMapper("ds_1", "ds_1"), Collections.singletonList(new RouteMapper("t_config", "t_config"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingDropIndexStatementValidator().postValidate(shardingRule, new DropIndexStatementContext(sqlStatement),
+ new ShardingDropIndexStatementValidator().postValidate(shardingRule, new DropIndexStatementContext(sqlStatement),
Collections.emptyList(), schema, mock(ConfigurationProperties.class), routeContext);
}
@@ -166,7 +166,7 @@ public final class ShardingDropIndexStatementValidatorTest {
Collection<RouteUnit> routeUnits = new LinkedList<>();
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_config", "t_config"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingDropIndexStatementValidator().postValidate(shardingRule, new DropIndexStatementContext(sqlStatement),
+ new ShardingDropIndexStatementValidator().postValidate(shardingRule, new DropIndexStatementContext(sqlStatement),
Collections.emptyList(), schema, mock(ConfigurationProperties.class), routeContext);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropTableStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropTableStatementValidatorTest.java
index 371a90f312e..9e60fc49230 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropTableStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropTableStatementValidatorTest.java
@@ -120,7 +120,7 @@ public final class ShardingDropTableStatementValidatorTest {
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_order", "t_order_0"))));
routeUnits.add(new RouteUnit(new RouteMapper("ds_1", "ds_1"), Collections.singletonList(new RouteMapper("t_order", "t_order_0"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingDropTableStatementValidator().postValidate(shardingRule, new DropTableStatementContext(sqlStatement),
+ new ShardingDropTableStatementValidator().postValidate(shardingRule, new DropTableStatementContext(sqlStatement),
Collections.emptyList(), mock(ShardingSphereSchema.class), mock(ConfigurationProperties.class), routeContext);
}
@@ -133,7 +133,7 @@ public final class ShardingDropTableStatementValidatorTest {
Collection<RouteUnit> routeUnits = new LinkedList<>();
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_order", "t_order_0"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingDropTableStatementValidator().postValidate(shardingRule, new DropTableStatementContext(sqlStatement),
+ new ShardingDropTableStatementValidator().postValidate(shardingRule, new DropTableStatementContext(sqlStatement),
Collections.emptyList(), mock(ShardingSphereSchema.class), mock(ConfigurationProperties.class), routeContext);
}
@@ -147,7 +147,7 @@ public final class ShardingDropTableStatementValidatorTest {
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_config", "t_config"))));
routeUnits.add(new RouteUnit(new RouteMapper("ds_1", "ds_1"), Collections.singletonList(new RouteMapper("t_config", "t_config"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingDropTableStatementValidator().postValidate(shardingRule, new DropTableStatementContext(sqlStatement),
+ new ShardingDropTableStatementValidator().postValidate(shardingRule, new DropTableStatementContext(sqlStatement),
Collections.emptyList(), mock(ShardingSphereSchema.class), mock(ConfigurationProperties.class), routeContext);
}
@@ -160,7 +160,7 @@ public final class ShardingDropTableStatementValidatorTest {
Collection<RouteUnit> routeUnits = new LinkedList<>();
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"), Collections.singletonList(new RouteMapper("t_config", "t_config"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingDropTableStatementValidator().postValidate(shardingRule, new DropTableStatementContext(sqlStatement),
+ new ShardingDropTableStatementValidator().postValidate(shardingRule, new DropTableStatementContext(sqlStatement),
Collections.emptyList(), mock(ShardingSphereSchema.class), mock(ConfigurationProperties.class), routeContext);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingPrepareStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingPrepareStatementValidatorTest.java
index 563cbf458b6..4289d502c07 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingPrepareStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingPrepareStatementValidatorTest.java
@@ -57,7 +57,7 @@ public final class ShardingPrepareStatementValidatorTest {
public void assertPostValidatePrepareWithEmptyRouteResultForPostgreSQL() {
PrepareStatement sqlStatement = new PostgreSQLPrepareStatement();
when(routeContext.getRouteUnits()).thenReturn(Collections.emptyList());
- new ShardingPrepareStatementValidator().postValidate(shardingRule, new PrepareStatementContext(sqlStatement),
+ new ShardingPrepareStatementValidator().postValidate(shardingRule, new PrepareStatementContext(sqlStatement),
Collections.emptyList(), schema, mock(ConfigurationProperties.class), routeContext);
}
@@ -68,7 +68,7 @@ public final class ShardingPrepareStatementValidatorTest {
routeUnits.add(new RouteUnit(new RouteMapper("ds_0", "ds_0"),
Arrays.asList(new RouteMapper("t_order", "t_order_0"), new RouteMapper("t_order_item", "t_order_item_0"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
- new ShardingPrepareStatementValidator().postValidate(shardingRule, new PrepareStatementContext(sqlStatement),
+ new ShardingPrepareStatementValidator().postValidate(shardingRule, new PrepareStatementContext(sqlStatement),
Collections.emptyList(), schema, mock(ConfigurationProperties.class), routeContext);
}
@@ -81,7 +81,7 @@ public final class ShardingPrepareStatementValidatorTest {
Arrays.asList(new RouteMapper("t_order", "t_order_0"), new RouteMapper("t_order_item", "t_order_item_1"))));
when(routeContext.getRouteUnits()).thenReturn(routeUnits);
PrepareStatement sqlStatement = new PostgreSQLPrepareStatement();
- new ShardingPrepareStatementValidator().postValidate(shardingRule, new PrepareStatementContext(sqlStatement),
+ new ShardingPrepareStatementValidator().postValidate(shardingRule, new PrepareStatementContext(sqlStatement),
Collections.emptyList(), schema, mock(ConfigurationProperties.class), routeContext);
}
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingInsertStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingInsertStatementValidatorTest.java
index 2479e709b9d..c60e8314f16 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingInsertStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingInsertStatementValidatorTest.java
@@ -141,7 +141,7 @@ public final class ShardingInsertStatementValidatorTest {
public void assertPostValidateWhenInsertWithSingleRouting() {
SQLStatementContext<InsertStatement> sqlStatementContext = createInsertStatementContext(Collections.singletonList(1), createInsertStatement());
when(routeContext.isSingleRouting()).thenReturn(true);
- new ShardingInsertStatementValidator(shardingConditions).postValidate(shardingRule, sqlStatementContext,
+ new ShardingInsertStatementValidator(shardingConditions).postValidate(shardingRule, sqlStatementContext,
Collections.emptyList(), mock(ShardingSphereSchema.class), mock(ConfigurationProperties.class), routeContext);
}
@@ -150,7 +150,7 @@ public final class ShardingInsertStatementValidatorTest {
SQLStatementContext<InsertStatement> sqlStatementContext = createInsertStatementContext(Collections.singletonList(1), createInsertStatement());
when(routeContext.isSingleRouting()).thenReturn(false);
when(shardingRule.isBroadcastTable(sqlStatementContext.getSqlStatement().getTable().getTableName().getIdentifier().getValue())).thenReturn(true);
- new ShardingInsertStatementValidator(shardingConditions).postValidate(shardingRule, sqlStatementContext,
+ new ShardingInsertStatementValidator(shardingConditions).postValidate(shardingRule, sqlStatementContext,
Collections.emptyList(), mock(ShardingSphereSchema.class), mock(ConfigurationProperties.class), routeContext);
}
@@ -160,7 +160,7 @@ public final class ShardingInsertStatementValidatorTest {
when(routeContext.isSingleRouting()).thenReturn(false);
when(shardingRule.isBroadcastTable(sqlStatementContext.getSqlStatement().getTable().getTableName().getIdentifier().getValue())).thenReturn(false);
when(routeContext.getOriginalDataNodes()).thenReturn(getSingleRouteDataNodes());
- new ShardingInsertStatementValidator(shardingConditions).postValidate(shardingRule, sqlStatementContext,
+ new ShardingInsertStatementValidator(shardingConditions).postValidate(shardingRule, sqlStatementContext,
Collections.emptyList(), mock(ShardingSphereSchema.class), mock(ConfigurationProperties.class), routeContext);
}
@@ -170,7 +170,7 @@ public final class ShardingInsertStatementValidatorTest {
when(routeContext.isSingleRouting()).thenReturn(false);
when(shardingRule.isBroadcastTable(sqlStatementContext.getSqlStatement().getTable().getTableName().getIdentifier().getValue())).thenReturn(false);
when(routeContext.getOriginalDataNodes()).thenReturn(getMultipleRouteDataNodes());
- new ShardingInsertStatementValidator(shardingConditions).postValidate(shardingRule, sqlStatementContext,
+ new ShardingInsertStatementValidator(shardingConditions).postValidate(shardingRule, sqlStatementContext,
Collections.emptyList(), mock(ShardingSphereSchema.class), mock(ConfigurationProperties.class), routeContext);
}
@@ -180,7 +180,7 @@ public final class ShardingInsertStatementValidatorTest {
RouteContext routeContext = mock(RouteContext.class);
when(routeContext.isSingleRouting()).thenReturn(true);
InsertStatementContext insertStatementContext = createInsertStatementContext(parameters, createInsertStatement());
- new ShardingInsertStatementValidator(mock(ShardingConditions.class)).postValidate(shardingRule,
+ new ShardingInsertStatementValidator(mock(ShardingConditions.class)).postValidate(shardingRule,
insertStatementContext, parameters, mock(ShardingSphereSchema.class), mock(ConfigurationProperties.class), routeContext);
}
@@ -189,7 +189,7 @@ public final class ShardingInsertStatementValidatorTest {
mockShardingRuleForUpdateShardingColumn();
List<Object> parameters = Collections.singletonList(1);
InsertStatementContext insertStatementContext = createInsertStatementContext(parameters, createInsertStatement());
- new ShardingInsertStatementValidator(mock(ShardingConditions.class)).postValidate(shardingRule,
+ new ShardingInsertStatementValidator(mock(ShardingConditions.class)).postValidate(shardingRule,
insertStatementContext, parameters, mock(ShardingSphereSchema.class), mock(ConfigurationProperties.class), createSingleRouteContext());
}
@@ -198,7 +198,7 @@ public final class ShardingInsertStatementValidatorTest {
mockShardingRuleForUpdateShardingColumn();
List<Object> parameters = Collections.singletonList(1);
InsertStatementContext insertStatementContext = createInsertStatementContext(parameters, createInsertStatement());
- new ShardingInsertStatementValidator(mock(ShardingConditions.class)).postValidate(shardingRule,
+ new ShardingInsertStatementValidator(mock(ShardingConditions.class)).postValidate(shardingRule,
insertStatementContext, parameters, mock(ShardingSphereSchema.class), mock(ConfigurationProperties.class), createFullRouteContext());
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingUpdateStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingUpdateStatementValidatorTest.java
index ff167fc8963..502cca1e124 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingUpdateStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingUpdateStatementValidatorTest.java
@@ -94,7 +94,7 @@ public final class ShardingUpdateStatementValidatorTest {
@Test
public void assertPostValidateWhenNotUpdateShardingColumn() {
UpdateStatementContext sqlStatementContext = new UpdateStatementContext(createUpdateStatement());
- new ShardingUpdateStatementValidator().postValidate(shardingRule, sqlStatementContext, Collections.emptyList(),
+ new ShardingUpdateStatementValidator().postValidate(shardingRule, sqlStatementContext, Collections.emptyList(),
mock(ShardingSphereSchema.class), mock(ConfigurationProperties.class), mock(RouteContext.class));
}
@@ -108,7 +108,7 @@ public final class ShardingUpdateStatementValidatorTest {
@Test(expected = ShardingSphereException.class)
public void assertPostValidateWhenUpdateShardingColumnWithDifferentRouteContext() {
mockShardingRuleForUpdateShardingColumn();
- new ShardingUpdateStatementValidator().postValidate(shardingRule, new UpdateStatementContext(createUpdateStatement()),
+ new ShardingUpdateStatementValidator().postValidate(shardingRule, new UpdateStatementContext(createUpdateStatement()),
Collections.emptyList(), mock(ShardingSphereSchema.class), mock(ConfigurationProperties.class), createFullRouteContext());
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/builder/AlgorithmProvidedShardingRuleBuilderTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/builder/AlgorithmProvidedShardingRuleBuilderTest.java
index 48040ec69da..9018cdceac5 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/builder/AlgorithmProvidedShardingRuleBuilderTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/builder/AlgorithmProvidedShardingRuleBuilderTest.java
@@ -55,7 +55,7 @@ public final class AlgorithmProvidedShardingRuleBuilderTest {
@SuppressWarnings("unchecked")
@Test
public void assertBuild() {
- assertThat(builder.build(ruleConfig, "test_schema",
+ assertThat(builder.build(ruleConfig, "test_schema",
Collections.singletonMap("name", mock(DataSource.class, RETURNS_DEEP_STUBS)), Collections.emptyList(), new ConfigurationProperties(new Properties())), instanceOf(ShardingRule.class));
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/builder/ShardingRuleBuilderTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/builder/ShardingRuleBuilderTest.java
index 62581cd44a3..31b474b3440 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/builder/ShardingRuleBuilderTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/builder/ShardingRuleBuilderTest.java
@@ -55,7 +55,7 @@ public final class ShardingRuleBuilderTest {
@SuppressWarnings("unchecked")
@Test
public void assertBuild() {
- assertThat(builder.build(ruleConfig, "test_schema",
+ assertThat(builder.build(ruleConfig, "test_schema",
Collections.singletonMap("name", mock(DataSource.class, RETURNS_DEEP_STUBS)), Collections.emptyList(), new ConfigurationProperties(new Properties())), instanceOf(ShardingRule.class));
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/query/ShardingTableRulesUsedAlgorithmQueryResultSet.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/query/ShardingTableRulesUsedAlgorithmQueryResultSet.java
index ae1eaa0d77c..8a18de31aea 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/query/ShardingTableRulesUsedAlgorithmQueryResultSet.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/query/ShardingTableRulesUsedAlgorithmQueryResultSet.java
@@ -34,9 +34,9 @@ import java.util.List;
* Result set for show sharding table rules used algorithm.
*/
public final class ShardingTableRulesUsedAlgorithmQueryResultSet implements DistSQLResultSet {
-
+
private Iterator<Collection<Object>> data = Collections.emptyIterator();
-
+
@Override
public void init(final ShardingSphereMetaData metaData, final SQLStatement sqlStatement) {
ShowShardingTableRulesUsedAlgorithmStatement statement = (ShowShardingTableRulesUsedAlgorithmStatement) sqlStatement;
@@ -45,7 +45,7 @@ public final class ShardingTableRulesUsedAlgorithmQueryResultSet implements Dist
shardingTableRules.forEach(each -> requireResult(statement, metaData.getName(), result, each));
data = result.iterator();
}
-
+
private void requireResult(final ShowShardingTableRulesUsedAlgorithmStatement statement, final String schemaName, final List<Collection<Object>> result,
final ShardingRuleConfiguration shardingRuleConfiguration) {
if (!statement.getAlgorithmName().isPresent()) {
@@ -63,22 +63,22 @@ public final class ShardingTableRulesUsedAlgorithmQueryResultSet implements Dist
}
});
}
-
+
@Override
public Collection<String> getColumnNames() {
return Arrays.asList("schema", "type", "name");
}
-
+
@Override
public boolean next() {
return data.hasNext();
}
-
+
@Override
public Collection<Object> getRowData() {
return data.next();
}
-
+
@Override
public String getType() {
return ShowShardingTableRulesUsedAlgorithmStatement.class.getName();
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingAlgorithmStatementUpdater.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingAlgorithmStatementUpdater.java
index 6488c2358d5..78e57aa7d9d 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingAlgorithmStatementUpdater.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingAlgorithmStatementUpdater.java
@@ -52,7 +52,7 @@ public final class AlterShardingAlgorithmStatementUpdater implements RuleDefinit
checkExist(requireNames, currentRuleConfig);
checkAlgorithmType(sqlStatement);
}
-
+
private void checkDuplicate(final String schemaName, final Collection<String> requireNames) throws DistSQLException {
Collection<String> duplicateRequire = requireNames.stream().collect(Collectors.groupingBy(each -> each, Collectors.counting())).entrySet().stream()
.filter(each -> each.getValue() > 1).map(Map.Entry::getKey).collect(Collectors.toSet());
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingKeyGeneratorStatementUpdater.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingKeyGeneratorStatementUpdater.java
index f0e9ada7fe9..448c3dc4440 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingKeyGeneratorStatementUpdater.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingKeyGeneratorStatementUpdater.java
@@ -52,7 +52,7 @@ public final class AlterShardingKeyGeneratorStatementUpdater implements RuleDefi
checkExist(requireNames, currentRuleConfig);
checkAlgorithmType(sqlStatement);
}
-
+
private void checkDuplicate(final String schemaName, final Collection<String> requireNames) throws DistSQLException {
Collection<String> duplicateRequire = requireNames.stream().collect(Collectors.groupingBy(each -> each, Collectors.counting())).entrySet().stream()
.filter(each -> each.getValue() > 1).map(Map.Entry::getKey).collect(Collectors.toSet());
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/segment/InputOrOutputSegment.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/segment/InputOrOutputSegment.java
index 67c3d4bfe25..931afa58516 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/segment/InputOrOutputSegment.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/segment/InputOrOutputSegment.java
@@ -28,9 +28,9 @@ import org.apache.shardingsphere.sql.parser.api.visitor.ASTNode;
@RequiredArgsConstructor
@Getter
public final class InputOrOutputSegment implements ASTNode {
-
+
private final Integer workerThread;
-
+
private final Integer batchSize;
private final AlgorithmSegment rateLimiter;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/segment/ShardingScalingRuleConfigurationSegment.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/segment/ShardingScalingRuleConfigurationSegment.java
index 6175b3a4320..f78d26c26a7 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/segment/ShardingScalingRuleConfigurationSegment.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/segment/ShardingScalingRuleConfigurationSegment.java
@@ -28,14 +28,14 @@ import org.apache.shardingsphere.sql.parser.api.visitor.ASTNode;
@Getter
@Setter
public final class ShardingScalingRuleConfigurationSegment implements ASTNode {
-
+
private InputOrOutputSegment inputSegment;
-
+
private InputOrOutputSegment outputSegment;
-
+
private AlgorithmSegment streamChannel;
-
+
private AlgorithmSegment completionDetector;
-
+
private AlgorithmSegment dataConsistencyChecker;
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/segment/ShardingStrategySegment.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/segment/ShardingStrategySegment.java
index 18e19c43cc8..911a128d474 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/segment/ShardingStrategySegment.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/segment/ShardingStrategySegment.java
@@ -34,6 +34,6 @@ public final class ShardingStrategySegment implements ASTNode {
private final String shardingColumn;
private final String shardingAlgorithmName;
-
+
private final AlgorithmSegment algorithmSegment;
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/statement/DropShardingKeyGeneratorStatement.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/statement/DropShardingKeyGeneratorStatement.java
index 53d9524f8b3..d5831fac230 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/statement/DropShardingKeyGeneratorStatement.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/statement/DropShardingKeyGeneratorStatement.java
@@ -30,6 +30,6 @@ import java.util.Collection;
@RequiredArgsConstructor
@Getter
public final class DropShardingKeyGeneratorStatement extends DropRuleStatement implements ShardingSubjectSupplier {
-
+
private final Collection<String> keyGeneratorNames;
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/statement/ShowShardingTableRulesUsedAlgorithmStatement.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/statement/ShowShardingTableRulesUsedAlgorithmS [...]
index 265e1162ae4..8a0745b58cb 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/statement/ShowShardingTableRulesUsedAlgorithmStatement.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/statement/ShowShardingTableRulesUsedAlgorithmStatement.java
@@ -27,14 +27,14 @@ import java.util.Optional;
* Show sharding table rules used algorithm statement.
*/
public final class ShowShardingTableRulesUsedAlgorithmStatement extends ShowRulesStatement implements ShardingSubjectSupplier {
-
+
private final String algorithmName;
-
+
public ShowShardingTableRulesUsedAlgorithmStatement(final String algorithmName, final SchemaSegment schema) {
super(schema);
this.algorithmName = algorithmName;
}
-
+
/**
* Get algorithm name.
*
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/main/java/org/apache/shardingsphere/sharding/spring/namespace/factorybean/ShardingAlgorithmFactoryBean.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/main/java/org/apache/shardingsphere/sharding/spring/namespace/factorybean/ShardingAlgorithmFactoryBean.java
index 4060cb97d74..a106ae18c55 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/main/java/org/apache/shardingsphere/sharding/spring/namespace/factorybean/ShardingAlgorithmFactoryBean.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/main/java/org/apache/shardingsphere/sharding/spring/namespace/factorybean/ShardingAlgorithmFactoryBean.java
@@ -27,7 +27,7 @@ import java.util.Properties;
* Sharding algorithm factory bean.
*/
public final class ShardingAlgorithmFactoryBean extends ShardingSphereAlgorithmFactoryBean<ShardingAlgorithm> {
-
+
static {
ShardingSphereServiceLoader.register(ShardingAlgorithm.class);
}
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/insert/values/InsertValueContext.java b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/insert/values/InsertValueContext.java
index 256857582c6..aa1c009b8d2 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/insert/values/InsertValueContext.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/insert/values/InsertValueContext.java
@@ -41,7 +41,7 @@ public final class InsertValueContext {
private final int parameterCount;
private final List<ExpressionSegment> valueExpressions;
-
+
private final List<ParameterMarkerExpressionSegment> parameterMarkerExpressions;
private final List<Object> parameters;
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/insert/values/OnDuplicateUpdateContext.java b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/insert/values/OnDuplicateUpdateContext.java
index 05b40c42e3e..e0aa7d35261 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/insert/values/OnDuplicateUpdateContext.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/insert/values/OnDuplicateUpdateContext.java
@@ -41,7 +41,7 @@ public final class OnDuplicateUpdateContext {
private final int parameterCount;
private final List<ExpressionSegment> valueExpressions;
-
+
private final List<ParameterMarkerExpressionSegment> parameterMarkerExpressions;
private final List<Object> parameters;
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/PaginationContext.java b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/PaginationContext.java
index 0ee471e6ea6..e806cd57c21 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/PaginationContext.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/PaginationContext.java
@@ -48,7 +48,7 @@ public final class PaginationContext {
this.offsetSegment = offsetSegment;
this.rowCountSegment = rowCountSegment;
actualOffset = null == offsetSegment ? 0L : getValue(offsetSegment, parameters);
- actualRowCount = null == rowCountSegment ? null : getValue(rowCountSegment, parameters);
+ actualRowCount = null == rowCountSegment ? null : getValue(rowCountSegment, parameters);
}
private long getValue(final PaginationValueSegment paginationValueSegment, final List<Object> parameters) {
@@ -118,7 +118,8 @@ public final class PaginationContext {
*/
public Optional<Integer> getRowCountParameterIndex() {
return rowCountSegment instanceof ParameterMarkerPaginationValueSegment
- ? Optional.of(((ParameterMarkerPaginationValueSegment) rowCountSegment).getParameterIndex()) : Optional.empty();
+ ? Optional.of(((ParameterMarkerPaginationValueSegment) rowCountSegment).getParameterIndex())
+ : Optional.empty();
}
/**
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/engine/TopPaginationContextEngine.java b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/engine/TopPaginationContextEngine.java
index a4fd084825d..1d55bc253b6 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/engine/TopPaginationContextEngine.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/engine/TopPaginationContextEngine.java
@@ -43,7 +43,7 @@ public final class TopPaginationContextEngine {
/**
* Create pagination context.
- *
+ *
* @param topProjectionSegment top projection segment
* @param expressions expressions
* @param parameters SQL parameters
@@ -63,7 +63,6 @@ public final class TopPaginationContextEngine {
if (isRowNumberColumn(expression, rowNumberAlias) && isCompareCondition(expression)) {
return Optional.of(expression);
}
-
}
}
return Optional.empty();
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/DerivedColumn.java b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/DerivedColumn.java
index 86398c925b1..35e6d1ce245 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/DerivedColumn.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/DerivedColumn.java
@@ -30,16 +30,16 @@ import java.util.Collection;
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
public enum DerivedColumn {
- AVG_COUNT_ALIAS("AVG_DERIVED_COUNT_"),
- AVG_SUM_ALIAS("AVG_DERIVED_SUM_"),
- ORDER_BY_ALIAS("ORDER_BY_DERIVED_"),
+ AVG_COUNT_ALIAS("AVG_DERIVED_COUNT_"),
+ AVG_SUM_ALIAS("AVG_DERIVED_SUM_"),
+ ORDER_BY_ALIAS("ORDER_BY_DERIVED_"),
GROUP_BY_ALIAS("GROUP_BY_DERIVED_"),
AGGREGATION_DISTINCT_DERIVED("AGGREGATION_DISTINCT_DERIVED_");
private static final DerivedColumn[] VALUES = values();
-
+
private static final Collection<DerivedColumn> VALUES_WITHOUT_AGGREGATION_DISTINCT_DERIVED = getValues();
-
+
private final String pattern;
/**
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/engine/ProjectionEngine.java b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/engine/ProjectionEngine.java
index a751f62ea2f..536056e1636 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/engine/ProjectionEngine.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/engine/ProjectionEngine.java
@@ -68,7 +68,7 @@ public final class ProjectionEngine {
/**
* Create projection.
- *
+ *
* @param table table segment
* @param projectionSegment projection segment
* @return projection
@@ -98,7 +98,7 @@ public final class ProjectionEngine {
// TODO subquery
return Optional.empty();
}
-
+
private ParameterMarkerProjection createProjection(final ParameterMarkerExpressionSegment projectionSegment) {
return new ParameterMarkerProjection(projectionSegment.getParameterMarkerIndex(), projectionSegment.getParameterMarkerType(), projectionSegment.getAlias().orElse(null));
}
@@ -166,7 +166,7 @@ public final class ProjectionEngine {
return Collections.emptyList();
}
SelectStatement subSelectStatement = ((SubqueryTableSegment) table).getSubquery().getSelect();
- Collection<Projection> projections = subSelectStatement.getProjections().getProjections().stream().map(each
+ Collection<Projection> projections = subSelectStatement.getProjections().getProjections().stream().map(each
-> createProjection(subSelectStatement.getFrom(), each).orElse(null)).filter(Objects::nonNull).collect(Collectors.toList());
return getColumnProjections(projections);
}
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/impl/ParameterMarkerProjection.java b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/impl/ParameterMarkerProjection.java
index d69a57652f7..32a1f5aa289 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/impl/ParameterMarkerProjection.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/impl/ParameterMarkerProjection.java
@@ -34,28 +34,28 @@ import java.util.Optional;
@EqualsAndHashCode
@ToString
public final class ParameterMarkerProjection implements Projection {
-
+
private final int parameterMarkerIndex;
private final ParameterMarkerType parameterMarkerType;
-
+
private final String alias;
-
+
@Override
public String getExpression() {
return String.valueOf(parameterMarkerIndex);
}
-
+
@Override
public String getColumnLabel() {
return getAlias().orElse(String.valueOf(parameterMarkerIndex));
}
-
+
@Override
public Optional<String> getAlias() {
return Optional.ofNullable(alias);
}
-
+
/**
* Get expression with alias.
*
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/table/TablesContext.java b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/table/TablesContext.java
index 1d012f0c420..584bb13a785 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/table/TablesContext.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/table/TablesContext.java
@@ -89,7 +89,7 @@ public final class TablesContext {
}
private Optional<String> findDatabaseName(final SimpleTableSegment tableSegment, final DatabaseType databaseType) {
- Optional<OwnerSegment> owner = databaseType instanceof PostgreSQLDatabaseType
+ Optional<OwnerSegment> owner = databaseType instanceof PostgreSQLDatabaseType
|| databaseType instanceof OpenGaussDatabaseType ? tableSegment.getOwner().flatMap(OwnerSegment::getOwner) : tableSegment.getOwner();
return owner.map(optional -> optional.getIdentifier().getValue());
}
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/ddl/CreateTableStatementContext.java b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/ddl/CreateTableStatementContext.java
index b328b4e25dd..b3a2f93a4bb 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/ddl/CreateTableStatementContext.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/ddl/CreateTableStatementContext.java
@@ -69,7 +69,7 @@ public final class CreateTableStatementContext extends CommonSQLStatementContext
}
return result;
}
-
+
@Override
public Collection<ConstraintSegment> getConstraints() {
Collection<ConstraintSegment> result = new LinkedList<>();
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/insert/keygen/engine/GeneratedKeyContextEngineTest.java b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/insert/keygen/engine/GeneratedKeyContextEngineTest.java
index e74bfde11ae..820645e303f 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/insert/keygen/engine/GeneratedKeyContextEngineTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/insert/keygen/engine/GeneratedKeyContextEngineTest.java
@@ -97,7 +97,7 @@ public final class GeneratedKeyContextEngineTest {
private void assertCreateGenerateKeyContextWithoutGenerateKeyColumnConfiguration(final InsertStatement insertStatement) {
insertStatement.setTable(new SimpleTableSegment(new TableNameSegment(0, 0, new IdentifierValue("tbl1"))));
insertStatement.setInsertColumns(new InsertColumnsSegment(0, 0, Collections.singletonList(new ColumnSegment(0, 0, new IdentifierValue("id")))));
- assertFalse(new GeneratedKeyContextEngine(insertStatement, schema).createGenerateKeyContext(Collections.emptyList(),
+ assertFalse(new GeneratedKeyContextEngine(insertStatement, schema).createGenerateKeyContext(Collections.emptyList(),
Collections.emptyList(), Collections.singletonList(1)).isPresent());
}
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/insert/values/InsertValueContextTest.java b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/insert/values/InsertValueContextTest.java
index 35f85584e77..5726cac2e35 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/insert/values/InsertValueContextTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/insert/values/InsertValueContextTest.java
@@ -47,11 +47,11 @@ public final class InsertValueContextTest {
InsertValueContext insertValueContext = new InsertValueContext(assignments, parameters, parametersOffset);
Method getValueExpressionsMethod = InsertValueContext.class.getDeclaredMethod("getValueExpressions", Collection.class);
getValueExpressionsMethod.setAccessible(true);
- List<ExpressionSegment> getValueExpressionsResult = (List<ExpressionSegment>) getValueExpressionsMethod.invoke(insertValueContext, new Object[] {assignments});
+ List<ExpressionSegment> getValueExpressionsResult = (List<ExpressionSegment>) getValueExpressionsMethod.invoke(insertValueContext, new Object[]{assignments});
assertThat(insertValueContext.getValueExpressions(), is(getValueExpressionsResult));
Method getParametersMethod = InsertValueContext.class.getDeclaredMethod("getParameters", List.class, int.class);
getParametersMethod.setAccessible(true);
- List<Object> getParametersResult = (List<Object>) getParametersMethod.invoke(insertValueContext, new Object[] {parameters, parametersOffset});
+ List<Object> getParametersResult = (List<Object>) getParametersMethod.invoke(insertValueContext, new Object[]{parameters, parametersOffset});
assertThat(insertValueContext.getParameters(), is(getParametersResult));
}
@@ -90,8 +90,7 @@ public final class InsertValueContextTest {
new LiteralExpressionSegment(0, 10, null),
new ExpressionProjectionSegment(0, 10, ""),
new ParameterMarkerExpressionSegment(0, 10, 5),
- new BinaryOperationExpression(0, 0, new ColumnSegment(0, 0, new IdentifierValue("")), new ParameterMarkerExpressionSegment(0, 10, 5), "=", "")
- );
+ new BinaryOperationExpression(0, 0, new ColumnSegment(0, 0, new IdentifierValue("")), new ParameterMarkerExpressionSegment(0, 10, 5), "=", ""));
List<Object> parameters = Arrays.asList("", "");
InsertValueContext insertValueContext = new InsertValueContext(expressions, parameters, 0);
assertThat(insertValueContext.getParameterCount(), is(2));
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/PaginationContextTest.java b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/PaginationContextTest.java
index c4d935090a1..e70e784cc56 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/PaginationContextTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/select/pagination/PaginationContextTest.java
@@ -74,7 +74,7 @@ public final class PaginationContextTest {
@Test
public void assertGetActualOffsetWithNumberLiteralPaginationValueSegment() {
- assertThat(new PaginationContext(getOffsetSegmentWithNumberLiteralPaginationValueSegment(),
+ assertThat(new PaginationContext(getOffsetSegmentWithNumberLiteralPaginationValueSegment(),
getRowCountSegmentWithNumberLiteralPaginationValueSegment(), getParameters()).getActualOffset(), is(30L));
}
@@ -91,7 +91,7 @@ public final class PaginationContextTest {
@Test
public void assertGetActualRowCountWithNumberLiteralPaginationValueSegment() {
assertThat(new PaginationContext(getOffsetSegmentWithNumberLiteralPaginationValueSegment(),
- getRowCountSegmentWithNumberLiteralPaginationValueSegment(), getParameters()).getActualRowCount().orElse(null), is(20L));
+ getRowCountSegmentWithNumberLiteralPaginationValueSegment(), getParameters()).getActualRowCount().orElse(null), is(20L));
}
@Test
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/table/TablesContextTest.java b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/table/TablesContextTest.java
index a71472198c6..bd3cce12cdd 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/table/TablesContextTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/table/TablesContextTest.java
@@ -48,7 +48,7 @@ public final class TablesContextTest {
@Test
public void assertGetTableNames() {
- TablesContext tablesContext = new TablesContext(Arrays.asList(createTableSegment("table_1", "tbl_1"),
+ TablesContext tablesContext = new TablesContext(Arrays.asList(createTableSegment("table_1", "tbl_1"),
createTableSegment("table_2", "tbl_2")), DatabaseTypeRegistry.getDefaultDatabaseType());
assertThat(tablesContext.getTableNames(), is(Sets.newHashSet("table_1", "table_2")));
}
@@ -99,7 +99,7 @@ public final class TablesContextTest {
ShardingSphereSchema schema = mock(ShardingSphereSchema.class);
when(schema.getAllColumnNames("table_1")).thenReturn(Collections.singletonList("col"));
ColumnSegment columnSegment = createColumnSegment(null, "col");
- Map<String, String> actual = new TablesContext(Arrays.asList(tableSegment1, tableSegment2),
+ Map<String, String> actual = new TablesContext(Arrays.asList(tableSegment1, tableSegment2),
DatabaseTypeRegistry.getDefaultDatabaseType()).findTableNamesByColumnSegment(Collections.singletonList(columnSegment), schema);
assertFalse(actual.isEmpty());
assertThat(actual.get("col"), is("table_1"));
@@ -109,11 +109,11 @@ public final class TablesContextTest {
public void assertFindTableNameWhenColumnSegmentOwnerAbsentAndSchemaMetaDataContainsColumnInUpperCase() {
SimpleTableSegment tableSegment1 = createTableSegment("TABLE_1", "TBL_1");
SimpleTableSegment tableSegment2 = createTableSegment("TABLE_2", "TBL_2");
- TableMetaData tableMetaData = new TableMetaData("TABLE_1",
+ TableMetaData tableMetaData = new TableMetaData("TABLE_1",
Collections.singletonList(new ColumnMetaData("COL", 0, false, false, true)), Collections.emptyList(), Collections.emptyList());
ShardingSphereSchema schema = new ShardingSphereSchema(Stream.of(tableMetaData).collect(Collectors.toMap(TableMetaData::getName, value -> value)));
ColumnSegment columnSegment = createColumnSegment(null, "COL");
- Map<String, String> actual = new TablesContext(Arrays.asList(tableSegment1, tableSegment2),
+ Map<String, String> actual = new TablesContext(Arrays.asList(tableSegment1, tableSegment2),
DatabaseTypeRegistry.getDefaultDatabaseType()).findTableNamesByColumnSegment(Collections.singletonList(columnSegment), schema);
assertFalse(actual.isEmpty());
assertThat(actual.get("col"), is("TABLE_1"));
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/statement/impl/InsertStatementContextTest.java b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/statement/impl/InsertStatementContextTest.java
index 44abd918867..d5e7542e08b 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/statement/impl/InsertStatementContextTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/statement/impl/InsertStatementContextTest.java
@@ -168,7 +168,7 @@ public final class InsertStatementContextTest {
private void setUpOnDuplicateValues(final MySQLInsertStatement insertStatement) {
List<ColumnSegment> parameterMarkerExpressionAssignmentColumns = new LinkedList<>();
parameterMarkerExpressionAssignmentColumns.add(new ColumnSegment(0, 0, new IdentifierValue("on_duplicate_key_update_column_1")));
- AssignmentSegment parameterMarkerExpressionAssignment = new ColumnAssignmentSegment(0, 0, parameterMarkerExpressionAssignmentColumns,
+ AssignmentSegment parameterMarkerExpressionAssignment = new ColumnAssignmentSegment(0, 0, parameterMarkerExpressionAssignmentColumns,
new ParameterMarkerExpressionSegment(0, 0, 4));
List<ColumnSegment> literalExpressionAssignmentColumns = new LinkedList<>();
literalExpressionAssignmentColumns.add(new ColumnSegment(0, 0, new IdentifierValue("on_duplicate_key_update_column_2")));
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/database/impl/DataSourceGeneratedDatabaseConfiguration.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/database/impl/DataSourceGeneratedDatabaseConfiguration.java
index a709786c10f..e8b5badcd14 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/database/impl/DataSourceGeneratedDatabaseConfiguration.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/database/impl/DataSourceGeneratedDatabaseConfiguration.java
@@ -41,7 +41,7 @@ public final class DataSourceGeneratedDatabaseConfiguration implements DatabaseC
private final Map<String, DataSource> dataSources;
private final Collection<RuleConfiguration> ruleConfigurations;
-
+
private final Map<String, DataSourceProperties> dataSourceProperties;
public DataSourceGeneratedDatabaseConfiguration(final Map<String, DataSourceConfiguration> dataSources, final Collection<RuleConfiguration> ruleConfigurations) {
@@ -54,5 +54,4 @@ public final class DataSourceGeneratedDatabaseConfiguration implements DatabaseC
return dataSources.entrySet().stream().collect(Collectors.toMap(Entry::getKey,
entry -> DataSourcePropertiesCreator.create("com.zaxxer.hikari.HikariDataSource", entry.getValue()), (oldValue, currentValue) -> oldValue, LinkedHashMap::new));
}
-
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertyKey.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertyKey.java
index be0f716148a..0162bad6bdc 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertyKey.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertyKey.java
@@ -66,7 +66,7 @@ public enum ConfigurationPropertyKey implements TypedPropertyKey {
* Flush threshold for every records from databases for ShardingSphere-Proxy.
*/
PROXY_FRONTEND_FLUSH_THRESHOLD("proxy-frontend-flush-threshold", String.valueOf(128), int.class),
-
+
/**
* Whether enable hint for ShardingSphere-Proxy.
*/
@@ -118,7 +118,7 @@ public enum ConfigurationPropertyKey implements TypedPropertyKey {
* Proxy backend driver type. Default driver is JDBC.
*/
PROXY_BACKEND_DRIVER_TYPE("proxy-backend-driver-type", "JDBC", String.class),
-
+
/**
* Whether enable data source aggregation, default false.
*/
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/H2DataSourceMetaData.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/H2DataSourceMetaData.java
index ed92738edb7..9c3bce9773a 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/H2DataSourceMetaData.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/H2DataSourceMetaData.java
@@ -35,9 +35,9 @@ public final class H2DataSourceMetaData implements DataSourceMetaData {
private static final int DEFAULT_PORT = -1;
private static final String DEFAULT_HOST_NAME = "";
-
+
private static final String DEFAULT_H2_MODEL = "";
-
+
private static final String MODEL_MEM = "mem";
private static final String MODEL_PWD = "~";
@@ -49,9 +49,9 @@ public final class H2DataSourceMetaData implements DataSourceMetaData {
+ "(?<modelFile>file:)[/~\\w\\-]+/(?<fileName>[\\-\\w]*));?\\S*", Pattern.CASE_INSENSITIVE);
private final String hostname;
-
+
private final String model;
-
+
private final int port;
private final String catalog;
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datanode/DataNode.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datanode/DataNode.java
index e63562517c5..76e5733a1dc 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datanode/DataNode.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datanode/DataNode.java
@@ -69,7 +69,7 @@ public final class DataNode {
}
DataNode dataNode = (DataNode) object;
return Objects.equal(dataSourceName.toUpperCase(), dataNode.dataSourceName.toUpperCase())
- && Objects.equal(tableName.toUpperCase(), dataNode.tableName.toUpperCase());
+ && Objects.equal(tableName.toUpperCase(), dataNode.tableName.toUpperCase());
}
@Override
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/pool/creator/DataSourcePoolCreator.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/pool/creator/DataSourcePoolCreator.java
index 3fae4695b34..ae4e944a224 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/pool/creator/DataSourcePoolCreator.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/pool/creator/DataSourcePoolCreator.java
@@ -125,7 +125,7 @@ public final class DataSourcePoolCreator {
}
}
}
-
+
private static boolean isCanBeDataSourceAggregation(final DataSourceProperties dataSourceProps) {
if (!dataSourceProps.getConnectionPropertySynonyms().getLocalProperties().containsKey("jdbcUrl")) {
return false;
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/props/DataSourceProperties.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/props/DataSourceProperties.java
index 2372c44a580..681dd1312f9 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/props/DataSourceProperties.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/props/DataSourceProperties.java
@@ -122,7 +122,7 @@ public final class DataSourceProperties {
}
return Objects.hashCode(dataSourceClassName, stringBuilder.toString());
}
-
+
/**
* Can data source be aggregate.
*
@@ -150,7 +150,7 @@ public final class DataSourceProperties {
}
}
}
-
+
/**
* Is data source in same instance.
*
@@ -167,12 +167,12 @@ public final class DataSourceProperties {
return sourceJdbcUrl.getHostname().equals(targetJdbcUrl.getHostname()) && sourceJdbcUrl.getPort() == targetJdbcUrl.getPort()
&& sourceJdbcUrl.getQueryProperties().equals(targetJdbcUrl.getQueryProperties());
}
-
+
private JdbcUrl parseStandardJdbcUrlParserByJdbcUrl(final String jdbcUrl) {
StandardJdbcUrlParser jdbcUrlParser = new StandardJdbcUrlParser();
return jdbcUrlParser.parse(jdbcUrl);
}
-
+
private String parseJdbcUrl() {
for (Entry<String, Object> entry : getAllLocalProperties().entrySet()) {
if (entry.getKey().equals("jdbcUrl")) {
@@ -181,7 +181,7 @@ public final class DataSourceProperties {
}
return "";
}
-
+
/**
* Get instance from data source.
*
@@ -191,7 +191,7 @@ public final class DataSourceProperties {
JdbcUrl jdbcUrl = parseStandardJdbcUrlParserByJdbcUrl(parseJdbcUrl());
return new Instance(jdbcUrl.getHostname(), jdbcUrl.getPort());
}
-
+
/**
* Get database from data source.
*
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/registry/GlobalDataSourceRegistry.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/registry/GlobalDataSourceRegistry.java
index db1ec02e23a..a60d1c957dd 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/registry/GlobalDataSourceRegistry.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/registry/GlobalDataSourceRegistry.java
@@ -33,15 +33,15 @@ import java.util.Map;
@Getter
@Setter
public final class GlobalDataSourceRegistry {
-
+
private static final GlobalDataSourceRegistry INSTANCE = new GlobalDataSourceRegistry();
-
+
private volatile Map<Instance, DataSource> cachedDataSources = new LinkedHashMap<>();
-
+
private volatile Map<String, String> dataSourceSchema = new LinkedHashMap<>();
-
+
private volatile boolean dataSourceAggregationEnabled;
-
+
/**
* Get global data source.
*
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/registry/Instance.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/registry/Instance.java
index f55e9de0cb8..12539ad34f0 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/registry/Instance.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/registry/Instance.java
@@ -28,9 +28,8 @@ import lombok.RequiredArgsConstructor;
@Getter
@EqualsAndHashCode
public final class Instance {
-
+
private final String ip;
-
+
private final Integer port;
}
-
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/exception/rule/RequiredAlgorithmMissedException.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/exception/rule/RequiredAlgorithmMissedException.java
index 2d82b943c6b..2e14ef6f981 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/exception/rule/RequiredAlgorithmMissedException.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/exception/rule/RequiredAlgorithmMissedException.java
@@ -25,7 +25,7 @@ import java.util.Collection;
public final class RequiredAlgorithmMissedException extends RuleDefinitionViolationException {
private static final long serialVersionUID = -1952698375135777585L;
-
+
public RequiredAlgorithmMissedException() {
super(1115, "No sharding algorithm definition in current statement");
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/builder/SystemSchemaBuilderRule.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/builder/SystemSchemaBuilderRule.java
index 28447114604..372a1ba0d11 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/builder/SystemSchemaBuilderRule.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/builder/SystemSchemaBuilderRule.java
@@ -32,7 +32,7 @@ import java.util.Map;
@Getter
public enum SystemSchemaBuilderRule {
- MYSQL_INFORMATION_SCHEMA("MySQL", "information_schema", Sets.newHashSet("columns", "engines",
+ MYSQL_INFORMATION_SCHEMA("MySQL", "information_schema", Sets.newHashSet("columns", "engines",
"parameters", "routines", "schemata", "tables", "views")),
MYSQL_MYSQL("MySQL", "mysql", Sets.newHashSet("db")),
@@ -58,7 +58,7 @@ public enum SystemSchemaBuilderRule {
SCHEMA_PATH_SYSTEM_SCHEMA_BUILDER_RULE_MAP.put(each.getDatabaseType() + "." + each.getSchema(), each);
}
}
-
+
/**
* Value of builder rule.
*
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/H2TableMetaDataLoader.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/H2TableMetaDataLoader.java
index 2e00ba9bf9f..4196b8aefc1 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/H2TableMetaDataLoader.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/H2TableMetaDataLoader.java
@@ -41,28 +41,28 @@ import java.util.stream.Collectors;
* Table meta data loader for H2.
*/
public final class H2TableMetaDataLoader implements DialectTableMetaDataLoader {
-
+
private static final String TABLE_META_DATA_NO_ORDER = "SELECT TABLE_CATALOG, TABLE_NAME, COLUMN_NAME, DATA_TYPE, TYPE_NAME, ORDINAL_POSITION FROM INFORMATION_SCHEMA.COLUMNS "
+ "WHERE TABLE_CATALOG=? AND TABLE_SCHEMA=?";
private static final String ORDER_BY_ORDINAL_POSITION = " ORDER BY ORDINAL_POSITION";
private static final String TABLE_META_DATA_SQL = TABLE_META_DATA_NO_ORDER + ORDER_BY_ORDINAL_POSITION;
-
+
private static final String TABLE_META_DATA_SQL_IN_TABLES = TABLE_META_DATA_NO_ORDER + " AND TABLE_NAME IN (%s)" + ORDER_BY_ORDINAL_POSITION;
-
+
private static final String INDEX_META_DATA_SQL = "SELECT TABLE_CATALOG, TABLE_NAME, INDEX_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.INDEXES"
+ " WHERE TABLE_CATALOG=? AND TABLE_SCHEMA=? AND TABLE_NAME IN (%s)";
-
+
private static final String PRIMARY_KEY_META_DATA_SQL = "SELECT TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.INDEXES WHERE TABLE_CATALOG=? AND TABLE_SCHEMA=? AND PRIMARY_KEY = TRUE";
private static final String PRIMARY_KEY_META_DATA_SQL_IN_TABLES = PRIMARY_KEY_META_DATA_SQL + " AND TABLE_NAME IN (%s)";
-
+
private static final String GENERATED_INFO_SQL = "SELECT C.TABLE_NAME TABLE_NAME, C.COLUMN_NAME COLUMN_NAME, COALESCE(S.IS_GENERATED, FALSE) IS_GENERATED FROM INFORMATION_SCHEMA.COLUMNS C"
+ " RIGHT JOIN INFORMATION_SCHEMA.SEQUENCES S ON C.SEQUENCE_NAME=S.SEQUENCE_NAME WHERE C.TABLE_CATALOG=? AND C.TABLE_SCHEMA=?";
private static final String GENERATED_INFO_SQL_IN_TABLES = GENERATED_INFO_SQL + " AND TABLE_NAME IN (%s)";
-
+
@Override
public Map<String, TableMetaData> load(final DataSource dataSource, final Collection<String> tables) throws SQLException {
Map<String, TableMetaData> result = new LinkedHashMap<>();
@@ -75,7 +75,7 @@ public final class H2TableMetaDataLoader implements DialectTableMetaDataLoader {
}
return result;
}
-
+
private Map<String, Collection<ColumnMetaData>> loadColumnMetaDataMap(final Connection connection, final Collection<String> tables) throws SQLException {
Map<String, Collection<ColumnMetaData>> result = new HashMap<>();
try (PreparedStatement preparedStatement = connection.prepareStatement(getTableMetaDataSQL(tables))) {
@@ -98,7 +98,7 @@ public final class H2TableMetaDataLoader implements DialectTableMetaDataLoader {
}
return result;
}
-
+
private ColumnMetaData loadColumnMetaData(final Map<String, Integer> dataTypeMap, final ResultSet resultSet, final Collection<String> primaryKeys,
final Map<String, Boolean> tableGenerated) throws SQLException {
String columnName = resultSet.getString("COLUMN_NAME");
@@ -108,12 +108,12 @@ public final class H2TableMetaDataLoader implements DialectTableMetaDataLoader {
// H2 database case sensitive is always true
return new ColumnMetaData(columnName, dataTypeMap.get(typeName), primaryKey, generated, true);
}
-
+
private String getTableMetaDataSQL(final Collection<String> tables) {
return tables.isEmpty() ? TABLE_META_DATA_SQL
: String.format(TABLE_META_DATA_SQL_IN_TABLES, tables.stream().map(each -> String.format("'%s'", each)).collect(Collectors.joining(",")));
}
-
+
private Map<String, Collection<IndexMetaData>> loadIndexMetaData(final Connection connection, final Collection<String> tableNames) throws SQLException {
Map<String, Collection<IndexMetaData>> result = new HashMap<>();
try (PreparedStatement preparedStatement = connection.prepareStatement(getIndexMetaDataSQL(tableNames))) {
@@ -132,11 +132,11 @@ public final class H2TableMetaDataLoader implements DialectTableMetaDataLoader {
}
return result;
}
-
+
private String getIndexMetaDataSQL(final Collection<String> tableNames) {
return String.format(INDEX_META_DATA_SQL, tableNames.stream().map(each -> String.format("'%s'", each)).collect(Collectors.joining(",")));
}
-
+
private String getPrimaryKeyMetaDataSQL(final Collection<String> tables) {
return tables.isEmpty() ? PRIMARY_KEY_META_DATA_SQL
: String.format(PRIMARY_KEY_META_DATA_SQL_IN_TABLES, tables.stream().map(each -> String.format("'%s'", each)).collect(Collectors.joining(",")));
@@ -157,7 +157,7 @@ public final class H2TableMetaDataLoader implements DialectTableMetaDataLoader {
}
return result;
}
-
+
private String getGeneratedInfoSQL(final Collection<String> tables) {
return tables.isEmpty() ? GENERATED_INFO_SQL
: String.format(GENERATED_INFO_SQL_IN_TABLES, tables.stream().map(each -> String.format("'%s'", each)).collect(Collectors.joining(",")));
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/MySQLTableMetaDataLoader.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/MySQLTableMetaDataLoader.java
index 14633dac6f3..5beeaaf38f9 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/MySQLTableMetaDataLoader.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/MySQLTableMetaDataLoader.java
@@ -55,7 +55,7 @@ public final class MySQLTableMetaDataLoader implements DialectTableMetaDataLoade
private static final String INDEX_META_DATA_SQL = "SELECT TABLE_NAME, INDEX_NAME FROM information_schema.statistics WHERE TABLE_SCHEMA=? and TABLE_NAME IN (%s)";
- private static final String CONSTRAINT_META_DATA_SQL = "SELECT CONSTRAINT_NAME, TABLE_NAME, REFERENCED_TABLE_NAME FROM information_schema.KEY_COLUMN_USAGE "
+ private static final String CONSTRAINT_META_DATA_SQL = "SELECT CONSTRAINT_NAME, TABLE_NAME, REFERENCED_TABLE_NAME FROM information_schema.KEY_COLUMN_USAGE "
+ "WHERE TABLE_NAME IN (%s) AND REFERENCED_TABLE_SCHEMA IS NOT NULL";
@Override
@@ -74,7 +74,7 @@ public final class MySQLTableMetaDataLoader implements DialectTableMetaDataLoade
private Map<String, Collection<ConstraintMetaData>> loadConstraintMetaDataMap(final DataSource dataSource, final Collection<String> tables) throws SQLException {
Map<String, Collection<ConstraintMetaData>> result = new LinkedHashMap<>();
- try (Connection connection = dataSource.getConnection();
+ try (Connection connection = dataSource.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement(getConstraintMetaDataSQL(tables))) {
try (ResultSet resultSet = preparedStatement.executeQuery()) {
while (resultSet.next()) {
@@ -132,7 +132,7 @@ public final class MySQLTableMetaDataLoader implements DialectTableMetaDataLoade
boolean caseSensitive = null != collationName && !collationName.endsWith("_ci");
return new ColumnMetaData(columnName, dataTypeMap.get(dataType), primaryKey, generated, caseSensitive);
}
-
+
private String getTableMetaDataSQL(final Collection<String> tables) {
return tables.isEmpty() ? TABLE_META_DATA_SQL : String.format(TABLE_META_DATA_SQL_IN_TABLES, tables.stream().map(each -> String.format("'%s'", each)).collect(Collectors.joining(",")));
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/PostgreSQLTableMetaDataLoader.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/PostgreSQLTableMetaDataLoader.java
index 632160c398f..8e50af1d8b8 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/PostgreSQLTableMetaDataLoader.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/PostgreSQLTableMetaDataLoader.java
@@ -59,7 +59,7 @@ public final class PostgreSQLTableMetaDataLoader implements DialectTableMetaData
private static final String BASIC_INDEX_META_DATA_SQL = "SELECT tablename, indexname FROM pg_indexes WHERE schemaname = ?";
private static final String LOAD_ALL_ROLE_TABLE_GRANTS_SQL = "SELECT table_name FROM information_schema.role_table_grants";
-
+
private static final String LOAD_FILTED_ROLE_TABLE_GRANTS_SQL = LOAD_ALL_ROLE_TABLE_GRANTS_SQL + " WHERE table_name IN (%s)";
@Override
@@ -121,7 +121,7 @@ public final class PostgreSQLTableMetaDataLoader implements DialectTableMetaData
boolean isPrimaryKey = primaryKeys.contains(tableName + "," + columnName);
String columnDefault = resultSet.getString("column_default");
boolean generated = null != columnDefault && columnDefault.startsWith("nextval(");
- //TODO user defined collation which deterministic is false
+ // TODO user defined collation which deterministic is false
boolean caseSensitive = true;
return new ColumnMetaData(columnName, dataTypeMap.get(dataType), isPrimaryKey, generated, caseSensitive);
}
@@ -161,7 +161,7 @@ public final class PostgreSQLTableMetaDataLoader implements DialectTableMetaData
}
private String getLoadRoleTableGrantsSQL(final Collection<String> tables) {
- return tables.isEmpty() ? LOAD_ALL_ROLE_TABLE_GRANTS_SQL : String.format(LOAD_FILTED_ROLE_TABLE_GRANTS_SQL,
+ return tables.isEmpty() ? LOAD_ALL_ROLE_TABLE_GRANTS_SQL : String.format(LOAD_FILTED_ROLE_TABLE_GRANTS_SQL,
tables.stream().map(each -> String.format("'%s'", each)).collect(Collectors.joining(",")));
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/user/yaml/swapper/UserYamlSwapper.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/user/yaml/swapper/UserYamlSwapper.java
index 0c1cf74a8b2..5dd1baa3682 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/user/yaml/swapper/UserYamlSwapper.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/user/yaml/swapper/UserYamlSwapper.java
@@ -27,7 +27,7 @@ import java.util.Objects;
* User YAML swapper.
*/
public final class UserYamlSwapper implements YamlConfigurationSwapper<YamlUserConfiguration, ShardingSphereUser> {
-
+
@Override
public YamlUserConfiguration swapToYamlConfiguration(final ShardingSphereUser data) {
if (Objects.isNull(data)) {
@@ -39,7 +39,7 @@ public final class UserYamlSwapper implements YamlConfigurationSwapper<YamlUserC
result.setPassword(data.getPassword());
return result;
}
-
+
@Override
public ShardingSphereUser swapToObject(final YamlUserConfiguration yamlConfig) {
if (Objects.isNull(yamlConfig)) {
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/schedule/CronJob.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/schedule/CronJob.java
index 6798c938fa1..04c0089687f 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/schedule/CronJob.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/schedule/CronJob.java
@@ -27,7 +27,7 @@ import java.util.function.Consumer;
public final class CronJob {
private final String jobName;
-
+
@SuppressWarnings("rawtypes")
private final Consumer job;
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/storage/StorageNodeDataSource.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/storage/StorageNodeDataSource.java
index c187d8f7380..1c3340d8528 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/storage/StorageNodeDataSource.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/storage/StorageNodeDataSource.java
@@ -28,7 +28,7 @@ import lombok.Setter;
@Getter
@Setter
public final class StorageNodeDataSource {
-
+
private String role;
private String status;
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/config/pojo/rulealtered/YamlOnRuleAlteredActionConfiguration.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/config/pojo/rulealtered/YamlOnRuleAlteredActionConfiguration.java
index 80148ee5c8b..73a191b2e7a 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/config/pojo/rulealtered/YamlOnRuleAlteredActionConfiguration.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/config/pojo/rulealtered/YamlOnRuleAlteredActionConfiguration.java
@@ -50,7 +50,7 @@ public final class YamlOnRuleAlteredActionConfiguration implements YamlConfigura
private Integer batchSize;
private YamlShardingSphereAlgorithmConfiguration rateLimiter;
-
+
/**
* Build with default value.
*
@@ -72,7 +72,7 @@ public final class YamlOnRuleAlteredActionConfiguration implements YamlConfigura
private Integer batchSize;
private YamlShardingSphereAlgorithmConfiguration rateLimiter;
-
+
/**
* Build with default value.
*
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/PostgreSQLTableMetaDataLoaderTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/PostgreSQLTableMetaDataLoaderTest.java
index a293471c851..995aae1109e 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/PostgreSQLTableMetaDataLoaderTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/schema/loader/dialect/PostgreSQLTableMetaDataLoaderTest.java
@@ -51,9 +51,9 @@ public final class PostgreSQLTableMetaDataLoaderTest {
private static final String TABLE_META_DATA_SQL_WITH_TABLES = BASIC_TABLE_META_DATA_SQL + " AND table_name IN ('tbl')";
private static final String PRIMARY_KEY_META_DATA_SQL = "SELECT tc.table_name, kc.column_name FROM information_schema.table_constraints tc"
- + " JOIN information_schema.key_column_usage kc"
- + " ON kc.table_schema = tc.table_schema AND kc.table_name = tc.table_name AND kc.constraint_name = tc.constraint_name"
- + " WHERE tc.constraint_type = 'PRIMARY KEY' AND kc.ordinal_position IS NOT NULL AND kc.table_schema = ?";
+ + " JOIN information_schema.key_column_usage kc"
+ + " ON kc.table_schema = tc.table_schema AND kc.table_name = tc.table_name AND kc.constraint_name = tc.constraint_name"
+ + " WHERE tc.constraint_type = 'PRIMARY KEY' AND kc.ordinal_position IS NOT NULL AND kc.table_schema = ?";
private static final String BASIC_INDEX_META_DATA_SQL = "SELECT tablename, indexname FROM pg_indexes WHERE schemaname = ?";
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/schema/util/TableMetaDataUtilTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/schema/util/TableMetaDataUtilTest.java
index e697d068c0a..155f4bcd409 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/schema/util/TableMetaDataUtilTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/schema/util/TableMetaDataUtilTest.java
@@ -36,7 +36,7 @@ public final class TableMetaDataUtilTest {
@Test
public void assertGetTableMetaDataLoadMaterial() {
- SchemaBuilderMaterials materials = new SchemaBuilderMaterials(mock(DatabaseType.class),
+ SchemaBuilderMaterials materials = new SchemaBuilderMaterials(mock(DatabaseType.class),
Collections.singletonMap("foo_ds", new MockedDataSource()), Arrays.asList(mock(DataNodeContainedRule.class), mock(DataSourceContainedRule.class)), mock(ConfigurationProperties.class));
assertThat(TableMetaDataUtil.getTableMetaDataLoadMaterial(Collections.singleton("t_user"), materials, false).size(), is(1));
}
diff --git a/shardingsphere-infra/shardingsphere-infra-context/src/test/java/org/apache/shardingsphere/infra/context/kernel/KernelProcessorTest.java b/shardingsphere-infra/shardingsphere-infra-context/src/test/java/org/apache/shardingsphere/infra/context/kernel/KernelProcessorTest.java
index ae50a316539..b3f37df0090 100644
--- a/shardingsphere-infra/shardingsphere-infra-context/src/test/java/org/apache/shardingsphere/infra/context/kernel/KernelProcessorTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-context/src/test/java/org/apache/shardingsphere/infra/context/kernel/KernelProcessorTest.java
@@ -47,7 +47,7 @@ public final class KernelProcessorTest {
SQLStatementContext<SQLStatement> sqlStatementContext = mock(CommonSQLStatementContext.class);
when(sqlStatementContext.getSqlStatement()).thenReturn(mock(SelectStatement.class));
LogicSQL logicSQL = new LogicSQL(sqlStatementContext, "SELECT * FROM tbl", Collections.emptyList());
- ShardingSphereMetaData metaData = new ShardingSphereMetaData("logic_schema",
+ ShardingSphereMetaData metaData = new ShardingSphereMetaData("logic_schema",
mock(ShardingSphereResource.class, RETURNS_DEEP_STUBS), new ShardingSphereRuleMetaData(Collections.emptyList(), Collections.emptyList()), Collections.emptyMap());
ConfigurationProperties props = new ConfigurationProperties(createProperties());
ExecutionContext actual = new KernelProcessor().generateExecutionContext(logicSQL, metaData, props);
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/check/SQLCheckEngine.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/check/SQLCheckEngine.java
index 4281c4848ab..6db8622c3a5 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/check/SQLCheckEngine.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/check/SQLCheckEngine.java
@@ -63,7 +63,7 @@ public final class SQLCheckEngine {
/**
* Check SQL.
- *
+ *
* @param sqlStatement SQL statement
* @param parameters SQL parameters
* @param rules rules
@@ -72,7 +72,7 @@ public final class SQLCheckEngine {
* @param grantee grantee
*/
@SuppressWarnings({"rawtypes", "unchecked"})
- public static void check(final SQLStatement sqlStatement, final List<Object> parameters, final Collection<ShardingSphereRule> rules,
+ public static void check(final SQLStatement sqlStatement, final List<Object> parameters, final Collection<ShardingSphereRule> rules,
final String currentSchema, final Map<String, ShardingSphereMetaData> metaDataMap, final Grantee grantee) {
for (Entry<ShardingSphereRule, SQLChecker> entry : OrderedSPIRegistry.getRegisteredServices(SQLChecker.class, rules).entrySet()) {
SQLCheckResult checkResult = entry.getValue().check(sqlStatement, parameters, grantee, currentSchema, metaDataMap, entry.getKey());
@@ -81,7 +81,7 @@ public final class SQLCheckEngine {
}
}
}
-
+
/**
* Check user exists.
* @param user user
@@ -101,7 +101,7 @@ public final class SQLCheckEngine {
}
return true;
}
-
+
/**
* Check authentication.
* @param user user
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-executor/src/main/java/org/apache/shardingsphere/infra/federation/executor/original/FederationTableStatistic.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-executor/src/main/java/org/apache/shardingsphere/infra/federation/executor/original/FederationTableStatistic.java
index 47c475b64a8..651165b6c01 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-executor/src/main/java/org/apache/shardingsphere/infra/federation/executor/original/FederationTableStatistic.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-executor/src/main/java/org/apache/shardingsphere/infra/federation/executor/original/FederationTableStatistic.java
@@ -35,27 +35,27 @@ public final class FederationTableStatistic implements Statistic {
public Double getRowCount() {
return Statistic.super.getRowCount();
}
-
+
@Override
public boolean isKey(final ImmutableBitSet columns) {
return Statistic.super.isKey(columns);
}
-
+
@Override
public List<ImmutableBitSet> getKeys() {
return Statistic.super.getKeys();
}
-
+
@Override
public List<RelReferentialConstraint> getReferentialConstraints() {
return new ArrayList<>();
}
-
+
@Override
public List<RelCollation> getCollations() {
return new ArrayList<>();
}
-
+
@Override
public RelDistribution getDistribution() {
return RelDistributionTraitDef.INSTANCE.getDefault();
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/SQLNodeConverterEngine.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/SQLNodeConverterEngine.java
index 7497e1a854c..c96f1c531a6 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/SQLNodeConverterEngine.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/SQLNodeConverterEngine.java
@@ -88,7 +88,7 @@ public final class SQLNodeConverterEngine {
SqlNode rightSqlNode = ((SqlBasicCall) sqlNode).getOperandList().get(1);
SelectStatement leftSelectStatement = (SelectStatement) convertToSQLStatement(leftSqlNode);
SelectStatement rightSelectStatement = (SelectStatement) convertToSQLStatement(rightSqlNode);
- leftSelectStatement.getUnionSegments().add(new UnionSegment(UnionType.UNION_DISTINCT, rightSelectStatement, rightSqlNode.getParserPosition().getColumnNum() - 7,
+ leftSelectStatement.getUnionSegments().add(new UnionSegment(UnionType.UNION_DISTINCT, rightSelectStatement, rightSqlNode.getParserPosition().getColumnNum() - 7,
rightSqlNode.getParserPosition().getEndColumnNum() - 1));
return leftSelectStatement;
}
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/ExpressionConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/ExpressionConverter.java
index 395c7c130c3..d67955234a5 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/ExpressionConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/ExpressionConverter.java
@@ -72,7 +72,7 @@ public final class ExpressionConverter implements SQLSegmentConverter<Expression
if (segment instanceof LiteralExpressionSegment) {
return new LiteralExpressionConverter().convertToSQLNode((LiteralExpressionSegment) segment);
} else if (segment instanceof CommonExpressionSegment) {
- // TODO
+ // TODO
throw new UnsupportedOperationException("unsupported CommonExpressionSegment");
} else if (segment instanceof ListExpression) {
return new ListExpressionConverter().convertToSQLNode((ListExpression) segment).map(optional -> optional);
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/BetweenExpressionConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/BetweenExpressionConverter.java
index e35a8cce635..707edbd84cf 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/BetweenExpressionConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/BetweenExpressionConverter.java
@@ -38,7 +38,7 @@ import java.util.Optional;
public final class BetweenExpressionConverter implements SQLSegmentConverter<BetweenExpression, SqlBasicCall> {
private final boolean not;
-
+
public BetweenExpressionConverter() {
not = false;
}
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/BinaryOperationExpressionConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/BinaryOperationExpressionConverter.java
index 3d823a9581a..9f6d096040c 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/BinaryOperationExpressionConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/BinaryOperationExpressionConverter.java
@@ -75,7 +75,7 @@ public final class BinaryOperationExpressionConverter implements SQLSegmentConve
SqlOperator operator = convertOperator(segment.getOperator());
SqlNode left = new ExpressionConverter().convertToSQLNode(segment.getLeft()).orElseThrow(IllegalStateException::new);
SqlNode right = new ExpressionConverter().convertToSQLNode(segment.getRight()).orElseThrow(IllegalStateException::new);
- return Optional.of(new SqlBasicCall(operator, new SqlNode[] {left, right}, SqlParserPos.ZERO));
+ return Optional.of(new SqlBasicCall(operator, new SqlNode[]{left, right}, SqlParserPos.ZERO));
}
@Override
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/FunctionConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/FunctionConverter.java
index abbda47c843..c43174bf8fb 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/FunctionConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/FunctionConverter.java
@@ -58,7 +58,7 @@ public final class FunctionConverter implements SQLSegmentConverter<FunctionSegm
return Optional.of(new SqlBasicCall(new SqlCastFunction(), getSqlNodes(segment.getParameters()), SqlParserPos.ZERO));
}
if ("CONCAT".equalsIgnoreCase(segment.getFunctionName())) {
- return Optional.of(new SqlBasicCall(new SqlUnresolvedFunction(new SqlIdentifier("CONCAT", SqlParserPos.ZERO),
+ return Optional.of(new SqlBasicCall(new SqlUnresolvedFunction(new SqlIdentifier("CONCAT", SqlParserPos.ZERO),
null, null, null, null, SqlFunctionCategory.USER_DEFINED_FUNCTION), getSqlNodes(segment.getParameters()), SqlParserPos.ZERO));
}
return Optional.empty();
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/InExpressionConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/InExpressionConverter.java
index 7b57ef09c73..cf7a0de4fe9 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/InExpressionConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/InExpressionConverter.java
@@ -74,7 +74,7 @@ public final class InExpressionConverter implements SQLSegmentConverter<InExpres
ExpressionConverter expressionConverter = new ExpressionConverter();
ExpressionSegment left = expressionConverter.convertToSQLSegment(sqlBasicCall.getOperandList().get(0)).orElseThrow(IllegalStateException::new);
ExpressionSegment right = expressionConverter.convertToSQLSegment(sqlBasicCall.getOperandList().get(1)).orElseThrow(IllegalStateException::new);
- return Optional.of(new InExpression(getStartIndex(sqlBasicCall),
+ return Optional.of(new InExpression(getStartIndex(sqlBasicCall),
sqlBasicCall.getOperandList().get(1) instanceof SqlSelect ? getStopIndex(sqlBasicCall) + 1 : getStopIndex(sqlBasicCall), left, right, not));
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/ListExpressionConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/ListExpressionConverter.java
index ab9968c9460..530756a1694 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/ListExpressionConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/expression/impl/ListExpressionConverter.java
@@ -47,7 +47,7 @@ public final class ListExpressionConverter implements SQLSegmentConverter<ListEx
left = optional.get();
continue;
}
- left = new SqlBasicCall(SqlStdOperatorTable.OR, new SqlNode[] {left, optional.get()}, SqlParserPos.ZERO);
+ left = new SqlBasicCall(SqlStdOperatorTable.OR, new SqlNode[]{left, optional.get()}, SqlParserPos.ZERO);
}
return Optional.ofNullable(left);
}
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/from/impl/SimpleTableConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/from/impl/SimpleTableConverter.java
index c342e49b051..5b61cd76c8f 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/from/impl/SimpleTableConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/from/impl/SimpleTableConverter.java
@@ -49,7 +49,7 @@ public final class SimpleTableConverter implements SQLSegmentConverter<SimpleTab
SqlNode tableNameSQLNode = new SqlIdentifier(names, SqlParserPos.ZERO);
if (segment.getAlias().isPresent()) {
SqlNode aliasSQLNode = new SqlIdentifier(segment.getAlias().get(), SqlParserPos.ZERO);
- return Optional.of(new SqlBasicCall(SqlStdOperatorTable.AS, new SqlNode[] {tableNameSQLNode, aliasSQLNode}, SqlParserPos.ZERO));
+ return Optional.of(new SqlBasicCall(SqlStdOperatorTable.AS, new SqlNode[]{tableNameSQLNode, aliasSQLNode}, SqlParserPos.ZERO));
}
return Optional.of(tableNameSQLNode);
}
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/from/impl/SubqueryTableConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/from/impl/SubqueryTableConverter.java
index 957c670140a..61443564486 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/from/impl/SubqueryTableConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/from/impl/SubqueryTableConverter.java
@@ -57,7 +57,7 @@ public final class SubqueryTableConverter implements SQLSegmentConverter<Subquer
SubqueryTableSegment result = new SubqueryTableSegment(new SubquerySegment(getStartIndex(sqlBasicCall), getStopIndex(sqlBasicCall), selectStatement));
if (sqlBasicCall.getOperator().equals(SqlStdOperatorTable.AS)) {
SqlNode alias = sqlBasicCall.getOperandList().get(1);
- result.setAlias(new AliasSegment(getStartIndex(alias), getStopIndex(alias), new IdentifierValue(alias.toString())));
+ result.setAlias(new AliasSegment(getStartIndex(alias), getStopIndex(alias), new IdentifierValue(alias.toString())));
}
return Optional.of(result);
}
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/orderby/OrderByConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/orderby/OrderByConverter.java
index 56f02f4aa5e..356848d6bcb 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/orderby/OrderByConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/orderby/OrderByConverter.java
@@ -40,7 +40,7 @@ public final class OrderByConverter implements SQLSegmentConverter<OrderBySegmen
@Override
public Optional<OrderBySegment> convertToSQLSegment(final SqlNodeList sqlNodeList) {
if (null == sqlNodeList || 0 == sqlNodeList.size()) {
- return Optional.empty();
+ return Optional.empty();
}
Collection<OrderByItemSegment> orderByItems = OrderByItemConverterUtil.convertToSQLSegment(sqlNodeList);
return Optional.of(new OrderBySegment(getStartIndex(sqlNodeList), getStopIndex(sqlNodeList), orderByItems));
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/orderby/item/ColumnOrderByItemConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/orderby/item/ColumnOrderByItemConverter.java
index 4850f9ad84f..48c370e001a 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/orderby/item/ColumnOrderByItemConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/orderby/item/ColumnOrderByItemConverter.java
@@ -42,7 +42,7 @@ public final class ColumnOrderByItemConverter implements SQLSegmentConverter<Col
public Optional<SqlNode> convertToSQLNode(final ColumnOrderByItemSegment segment) {
Optional<SqlNode> result = new ColumnConverter().convertToSQLNode(segment.getColumn()).map(optional -> optional);
if (result.isPresent() && Objects.equals(OrderDirection.DESC, segment.getOrderDirection())) {
- result = Optional.of(new SqlBasicCall(SqlStdOperatorTable.DESC, new SqlNode[] {result.get()}, SqlParserPos.ZERO));
+ result = Optional.of(new SqlBasicCall(SqlStdOperatorTable.DESC, new SqlNode[]{result.get()}, SqlParserPos.ZERO));
}
return result;
}
@@ -50,7 +50,7 @@ public final class ColumnOrderByItemConverter implements SQLSegmentConverter<Col
@Override
public Optional<ColumnOrderByItemSegment> convertToSQLSegment(final SqlNode sqlNode) {
if (!(sqlNode instanceof SqlIdentifier)) {
- return Optional.empty();
+ return Optional.empty();
}
SqlIdentifier sqlIdentifier = (SqlIdentifier) sqlNode;
if (sqlIdentifier.names.size() > 1) {
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/orderby/item/ExpressionOrderByItemConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/orderby/item/ExpressionOrderByItemConverter.java
index 8236c4669b0..869cc9c7c17 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/orderby/item/ExpressionOrderByItemConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/orderby/item/ExpressionOrderByItemConverter.java
@@ -30,7 +30,7 @@ public final class ExpressionOrderByItemConverter implements SQLSegmentConverter
@Override
public Optional<SqlNode> convertToSQLNode(final ExpressionOrderByItemSegment segment) {
- // TODO
+ // TODO
return Optional.empty();
}
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/projection/ProjectionsConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/projection/ProjectionsConverter.java
index 94a13fc53fb..e1571636322 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/projection/ProjectionsConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/projection/ProjectionsConverter.java
@@ -102,7 +102,7 @@ public final class ProjectionsConverter implements SQLSegmentConverter<Projectio
if (sqlNode instanceof SqlIdentifier) {
SqlIdentifier sqlIdentifier = (SqlIdentifier) sqlNode;
if (SqlIdentifier.STAR.names.equals(sqlIdentifier.names) || isOwnerShorthandProjection(sqlIdentifier)) {
- return new ShorthandProjectionConverter().convertToSQLSegment(sqlIdentifier).map(optional -> optional);
+ return new ShorthandProjectionConverter().convertToSQLSegment(sqlIdentifier).map(optional -> optional);
}
return new ColumnProjectionConverter().convertToSQLSegment(sqlIdentifier).map(optional -> optional);
} else if (sqlNode instanceof SqlBasicCall) {
@@ -122,7 +122,7 @@ public final class ProjectionsConverter implements SQLSegmentConverter<Projectio
}
private boolean isOwnerShorthandProjection(final SqlIdentifier sqlIdentifier) {
- return 2 == sqlIdentifier.names.size()
+ return 2 == sqlIdentifier.names.size()
&& SqlIdentifier.STAR.names.equals(ImmutableList.of(sqlIdentifier.names.get(1)));
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/projection/impl/AggregationProjectionConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/projection/impl/AggregationProjectionConverter.java
index e9a0bf80a18..e3e72abf9a1 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/projection/impl/AggregationProjectionConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/projection/impl/AggregationProjectionConverter.java
@@ -76,7 +76,7 @@ public final class AggregationProjectionConverter implements SQLSegmentConverter
functionQuantifier = SqlLiteral.createSymbol(SqlSelectKeyword.DISTINCT, SqlParserPos.ZERO);
}
if (segment.getAlias().isPresent()) {
- return Optional.of(new SqlBasicCall(SqlStdOperatorTable.AS, new SqlNode[]{new SqlBasicCall(convertOperator(segment.getType().name()),
+ return Optional.of(new SqlBasicCall(SqlStdOperatorTable.AS, new SqlNode[]{new SqlBasicCall(convertOperator(segment.getType().name()),
new SqlNode[]{createParametersSqlNode(parameters)}, SqlParserPos.ZERO, false, functionQuantifier),
SqlIdentifier.star(Collections.singletonList(segment.getAlias().get()), SqlParserPos.ZERO, Collections.singletonList(SqlParserPos.ZERO))}, SqlParserPos.ZERO));
}
@@ -93,7 +93,7 @@ public final class AggregationProjectionConverter implements SQLSegmentConverter
SqlBasicCall subSqlBasicCall = (SqlBasicCall) sqlBasicCall.getOperandList().get(0);
AggregationType aggregationType = AggregationType.valueOf(subSqlBasicCall.getOperator().getName().toUpperCase());
String innerExpression = getInnerExpression(subSqlBasicCall);
- AliasSegment aliasSegment = new AliasSegment(getStartIndex(sqlBasicCall.getOperandList().get(1)), getStopIndex(sqlBasicCall.getOperandList().get(1)),
+ AliasSegment aliasSegment = new AliasSegment(getStartIndex(sqlBasicCall.getOperandList().get(1)), getStopIndex(sqlBasicCall.getOperandList().get(1)),
new IdentifierValue(((SqlIdentifier) sqlBasicCall.getOperandList().get(1)).names.get(0)));
if (null != subSqlBasicCall.getFunctionQuantifier() && SqlSelectKeyword.DISTINCT == subSqlBasicCall.getFunctionQuantifier().getValue()) {
return Optional.of(getAggregationDistinctProjectionSegment(subSqlBasicCall, aggregationType, aliasSegment));
@@ -114,7 +114,7 @@ public final class AggregationProjectionConverter implements SQLSegmentConverter
private AggregationDistinctProjectionSegment getAggregationDistinctProjectionSegment(final SqlBasicCall sqlBasicCall, final AggregationType aggregationType, final AliasSegment aliasSegment) {
String innerExpression = getInnerExpression(sqlBasicCall, SqlSelectKeyword.DISTINCT);
String distinctParams = sqlBasicCall.getOperandList().stream().map(SqlNode::toString).collect(Collectors.joining(", "));
- AggregationDistinctProjectionSegment aggregationDistinctProjectionSegment = new AggregationDistinctProjectionSegment(getStartIndex(sqlBasicCall), getStopIndex(sqlBasicCall),
+ AggregationDistinctProjectionSegment aggregationDistinctProjectionSegment = new AggregationDistinctProjectionSegment(getStartIndex(sqlBasicCall), getStopIndex(sqlBasicCall),
aggregationType, innerExpression, distinctParams);
aggregationDistinctProjectionSegment.setAlias(aliasSegment);
return aggregationDistinctProjectionSegment;
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/projection/impl/ShorthandProjectionConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/projection/impl/ShorthandProjectionConverter.java
index 422af65b0e6..21500e16a31 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/projection/impl/ShorthandProjectionConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/segment/projection/impl/ShorthandProjectionConverter.java
@@ -38,7 +38,7 @@ public final class ShorthandProjectionConverter implements SQLSegmentConverter<S
if (null == segment) {
return Optional.empty();
}
- return segment.getOwner().map(ownerSegment -> Optional.of(SqlIdentifier.star(Arrays.asList(ownerSegment.getIdentifier().getValue(), ""),
+ return segment.getOwner().map(ownerSegment -> Optional.of(SqlIdentifier.star(Arrays.asList(ownerSegment.getIdentifier().getValue(), ""),
SqlParserPos.ZERO, ImmutableList.of(SqlParserPos.ZERO)))).orElseGet(() -> Optional.of(SqlIdentifier.star(SqlParserPos.ZERO)));
}
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/statement/SelectStatementConverter.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/statement/SelectStatementConverter.java
index 42ea72e1328..226a9c4db54 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/statement/SelectStatementConverter.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/statement/SelectStatementConverter.java
@@ -82,7 +82,7 @@ public final class SelectStatementConverter implements SQLStatementConverter<Sel
ConverterContextHolder.set(context);
ProjectionsSegment projections = new ProjectionsConverter().convertToSQLSegment(sqlSelect.getSelectList()).orElseThrow(IllegalStateException::new);
projections.setDistinctRow(sqlSelect.isDistinct());
- // TODO create select statement for different dialect
+ // TODO create select statement for different dialect
result.setProjections(projections);
new TableConverter().convertToSQLSegment(sqlSelect.getFrom()).ifPresent(result::setFrom);
new WhereConverter().convertToSQLSegment(sqlSelect.getWhere()).ifPresent(result::setWhere);
diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/metadata/FederationTableMetaData.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/metadata/FederationTableMetaData.java
index 91a2be11fb1..97e853a439a 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/metadata/FederationTableMetaData.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/metadata/FederationTableMetaData.java
@@ -38,7 +38,7 @@ import java.util.stream.Collectors;
@Getter
public final class FederationTableMetaData {
- private static final RelDataTypeFactory REL_DATA_TYPE_FACTORY = new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT);
+ private static final RelDataTypeFactory REL_DATA_TYPE_FACTORY = new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT);
private final String name;
diff --git a/shardingsphere-infra/shardingsphere-infra-parser/src/main/java/org/apache/shardingsphere/infra/parser/cache/SQLStatementCacheBuilder.java b/shardingsphere-infra/shardingsphere-infra-parser/src/main/java/org/apache/shardingsphere/infra/parser/cache/SQLStatementCacheBuilder.java
index d37801bf7de..3d61dc74c57 100644
--- a/shardingsphere-infra/shardingsphere-infra-parser/src/main/java/org/apache/shardingsphere/infra/parser/cache/SQLStatementCacheBuilder.java
+++ b/shardingsphere-infra/shardingsphere-infra-parser/src/main/java/org/apache/shardingsphere/infra/parser/cache/SQLStatementCacheBuilder.java
@@ -29,7 +29,7 @@ import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class SQLStatementCacheBuilder {
-
+
/**
* Build SQL statement cache.
*
@@ -39,7 +39,7 @@ public final class SQLStatementCacheBuilder {
* @param databaseType database type
* @return built SQL statement cache
*/
- public static LoadingCache<String, SQLStatement> build(final String databaseType,
+ public static LoadingCache<String, SQLStatement> build(final String databaseType,
final CacheOption sqlStatementCacheOption, final CacheOption parseTreeCacheOption, final boolean isParseComment) {
return CacheBuilder.newBuilder().softValues().initialCapacity(sqlStatementCacheOption.getInitialCapacity()).maximumSize(sqlStatementCacheOption.getMaximumSize())
.concurrencyLevel(sqlStatementCacheOption.getConcurrencyLevel()).build(new SQLStatementCacheLoader(databaseType, parseTreeCacheOption, isParseComment));
diff --git a/shardingsphere-infra/shardingsphere-infra-parser/src/main/java/org/apache/shardingsphere/infra/parser/sql/SQLStatementParserEngine.java b/shardingsphere-infra/shardingsphere-infra-parser/src/main/java/org/apache/shardingsphere/infra/parser/sql/SQLStatementParserEngine.java
index 20221eb78fd..fbba2b8219a 100644
--- a/shardingsphere-infra/shardingsphere-infra-parser/src/main/java/org/apache/shardingsphere/infra/parser/sql/SQLStatementParserEngine.java
+++ b/shardingsphere-infra/shardingsphere-infra-parser/src/main/java/org/apache/shardingsphere/infra/parser/sql/SQLStatementParserEngine.java
@@ -30,7 +30,7 @@ public final class SQLStatementParserEngine {
private final SQLStatementParserExecutor sqlStatementParserExecutor;
private final LoadingCache<String, SQLStatement> sqlStatementCache;
-
+
public SQLStatementParserEngine(final String databaseType, final CacheOption sqlStatementCacheOption, final CacheOption parseTreeCacheOption, final boolean isParseComment) {
sqlStatementParserExecutor = new SQLStatementParserExecutor(databaseType, parseTreeCacheOption, isParseComment);
sqlStatementCache = SQLStatementCacheBuilder.build(databaseType, sqlStatementCacheOption, parseTreeCacheOption, isParseComment);
diff --git a/shardingsphere-infra/shardingsphere-infra-rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/parameter/builder/impl/StandardParameterBuilder.java b/shardingsphere-infra/shardingsphere-infra-rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/parameter/builder/impl/StandardParameterBuilder.java
index fcbb954a7dc..0d148c5dd05 100644
--- a/shardingsphere-infra/shardingsphere-infra-rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/parameter/builder/impl/StandardParameterBuilder.java
+++ b/shardingsphere-infra/shardingsphere-infra-rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/parameter/builder/impl/StandardParameterBuilder.java
@@ -42,7 +42,7 @@ public final class StandardParameterBuilder implements ParameterBuilder {
private final Map<Integer, Collection<Object>> addedIndexAndParameters = new TreeMap<>();
private final Map<Integer, Object> replacedIndexAndParameters = new LinkedHashMap<>();
-
+
private final List<Integer> removeIndexAndParameters = new ArrayList<>();
/**
@@ -64,7 +64,7 @@ public final class StandardParameterBuilder implements ParameterBuilder {
public void addReplacedParameters(final int index, final Object parameter) {
replacedIndexAndParameters.put(index, parameter);
}
-
+
/**
* Add removed parameter.
*
diff --git a/shardingsphere-infra/shardingsphere-infra-rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/impl/AbstractSQLBuilder.java b/shardingsphere-infra/shardingsphere-infra-rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/impl/AbstractSQLBuilder.java
index 01966917fff..74b0206d02e 100644
--- a/shardingsphere-infra/shardingsphere-infra-rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/impl/AbstractSQLBuilder.java
+++ b/shardingsphere-infra/shardingsphere-infra-rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/impl/AbstractSQLBuilder.java
@@ -50,7 +50,7 @@ public abstract class AbstractSQLBuilder implements SQLBuilder {
}
protected abstract String getSQLTokenText(SQLToken sqlToken);
-
+
private String getComposableSQLTokenText(final ComposableSQLToken composableSQLToken) {
StringBuilder result = new StringBuilder();
for (SQLToken each : composableSQLToken.getSqlTokens()) {
@@ -59,7 +59,7 @@ public abstract class AbstractSQLBuilder implements SQLBuilder {
}
return result.toString();
}
-
+
private String getConjunctionText(final SQLToken sqlToken) {
return context.getSql().substring(getStartIndex(sqlToken), getStopIndex(sqlToken));
}
diff --git a/shardingsphere-infra/shardingsphere-infra-rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/token/generator/generic/RemoveTokenGenerator.java b/shardingsphere-infra/shardingsphere-infra-rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/token/generator/generic/RemoveTokenGenerator.java
index 10d1d36f200..1a121c845f6 100644
--- a/shardingsphere-infra/shardingsphere-infra-rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/token/generator/generic/RemoveTokenGenerator.java
+++ b/shardingsphere-infra/shardingsphere-infra-rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/token/generator/generic/RemoveTokenGenerator.java
@@ -56,7 +56,7 @@ public final class RemoveTokenGenerator implements CollectionSQLTokenGenerator<S
if (sqlStatementContext instanceof RemoveAvailable && !((RemoveAvailable) sqlStatementContext).getRemoveSegments().isEmpty()) {
result.addAll(generateRemoveAvailableSQLTokens(((RemoveAvailable) sqlStatementContext).getRemoveSegments()));
}
- if (sqlStatementContext instanceof TableAvailable && (((TableAvailable) sqlStatementContext).getTablesContext().getDatabaseName().isPresent()
+ if (sqlStatementContext instanceof TableAvailable && (((TableAvailable) sqlStatementContext).getTablesContext().getDatabaseName().isPresent()
|| !((TableAvailable) sqlStatementContext).getTablesContext().getSchemaNames().isEmpty())) {
result.addAll(generateTableAvailableSQLTokens((TableAvailable) sqlStatementContext));
}
diff --git a/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/context/SQLRewriteContextTest.java b/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/context/SQLRewriteContextTest.java
index 25a7a320831..f740319f3b0 100644
--- a/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/context/SQLRewriteContextTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/context/SQLRewriteContextTest.java
@@ -72,7 +72,7 @@ public final class SQLRewriteContextTest {
InsertStatementContext statementContext = mock(InsertStatementContext.class, RETURNS_DEEP_STUBS);
when(((TableAvailable) statementContext).getTablesContext().getDatabaseName().isPresent()).thenReturn(false);
when(statementContext.getInsertSelectContext()).thenReturn(null);
- SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
+ SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
mock(ShardingSphereSchema.class), statementContext, "INSERT INTO tbl VALUES (?)", Collections.singletonList(1));
assertThat(sqlRewriteContext.getParameterBuilder(), instanceOf(GroupedParameterBuilder.class));
}
@@ -81,14 +81,14 @@ public final class SQLRewriteContextTest {
public void assertNotInsertStatementContext() {
SelectStatementContext statementContext = mock(SelectStatementContext.class, RETURNS_DEEP_STUBS);
when(((TableAvailable) statementContext).getTablesContext().getDatabaseName().isPresent()).thenReturn(false);
- SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
+ SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
mock(ShardingSphereSchema.class), statementContext, "SELECT * FROM tbl WHERE id = ?", Collections.singletonList(1));
assertThat(sqlRewriteContext.getParameterBuilder(), instanceOf(StandardParameterBuilder.class));
}
@Test
public void assertGenerateOptionalSQLToken() {
- SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
+ SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
schema, sqlStatementContext, "INSERT INTO tbl VALUES (?)", Collections.singletonList(1));
sqlRewriteContext.addSQLTokenGenerators(Collections.singleton(optionalSQLTokenGenerator));
sqlRewriteContext.generateSQLTokens();
@@ -98,7 +98,7 @@ public final class SQLRewriteContextTest {
@Test
public void assertGenerateCollectionSQLToken() {
- SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
+ SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
schema, sqlStatementContext, "INSERT INTO tbl VALUES (?)", Collections.singletonList(1));
sqlRewriteContext.addSQLTokenGenerators(Collections.singleton(collectionSQLTokenGenerator));
sqlRewriteContext.generateSQLTokens();
diff --git a/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/engine/GenericSQLRewriteEngineTest.java b/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/engine/GenericSQLRewriteEngineTest.java
index d8d7934adcb..0f97f5f636d 100644
--- a/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/engine/GenericSQLRewriteEngineTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/engine/GenericSQLRewriteEngineTest.java
@@ -35,7 +35,7 @@ public final class GenericSQLRewriteEngineTest {
@Test
public void assertRewrite() {
GenericSQLRewriteResult actual = new GenericSQLRewriteEngine().rewrite(
- new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
+ new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
mock(ShardingSphereSchema.class), mock(SQLStatementContext.class), "SELECT 1", Collections.emptyList()));
assertThat(actual.getSqlRewriteUnit().getSql(), is("SELECT 1"));
assertThat(actual.getSqlRewriteUnit().getParameters(), is(Collections.emptyList()));
diff --git a/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/engine/RouteSQLRewriteEngineTest.java b/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/engine/RouteSQLRewriteEngineTest.java
index a031b7b853b..731527d5c3b 100644
--- a/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/engine/RouteSQLRewriteEngineTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/engine/RouteSQLRewriteEngineTest.java
@@ -45,7 +45,7 @@ public final class RouteSQLRewriteEngineTest {
@Test
public void assertRewriteWithStandardParameterBuilder() {
- SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
+ SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
mock(ShardingSphereSchema.class), mock(SQLStatementContext.class), "SELECT ?", Collections.singletonList(1));
RouteUnit routeUnit = new RouteUnit(new RouteMapper("ds", "ds_0"), Collections.singletonList(new RouteMapper("tbl", "tbl_0")));
RouteContext routeContext = new RouteContext();
@@ -61,7 +61,7 @@ public final class RouteSQLRewriteEngineTest {
SelectStatementContext statementContext = mock(SelectStatementContext.class, RETURNS_DEEP_STUBS);
when(statementContext.getOrderByContext().getItems()).thenReturn(Collections.emptyList());
when(statementContext.getPaginationContext().isHasPagination()).thenReturn(false);
- SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
+ SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
mock(ShardingSphereSchema.class), statementContext, "SELECT ?", Collections.singletonList(1));
RouteContext routeContext = new RouteContext();
RouteUnit firstRouteUnit = new RouteUnit(new RouteMapper("ds", "ds_0"), Collections.singletonList(new RouteMapper("tbl", "tbl_0")));
@@ -79,7 +79,7 @@ public final class RouteSQLRewriteEngineTest {
InsertStatementContext statementContext = mock(InsertStatementContext.class, RETURNS_DEEP_STUBS);
when(((TableAvailable) statementContext).getTablesContext().getDatabaseName().isPresent()).thenReturn(false);
when(statementContext.getGroupedParameters()).thenReturn(Collections.singletonList(Collections.singletonList(1)));
- SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
+ SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
mock(ShardingSphereSchema.class), statementContext, "INSERT INTO tbl VALUES (?)", Collections.singletonList(1));
RouteUnit routeUnit = new RouteUnit(new RouteMapper("ds", "ds_0"), Collections.singletonList(new RouteMapper("tbl", "tbl_0")));
RouteContext routeContext = new RouteContext();
@@ -95,7 +95,7 @@ public final class RouteSQLRewriteEngineTest {
InsertStatementContext statementContext = mock(InsertStatementContext.class, RETURNS_DEEP_STUBS);
when(((TableAvailable) statementContext).getTablesContext().getDatabaseName().isPresent()).thenReturn(false);
when(statementContext.getGroupedParameters()).thenReturn(Collections.singletonList(Collections.singletonList(1)));
- SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
+ SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
mock(ShardingSphereSchema.class), statementContext, "INSERT INTO tbl VALUES (?)", Collections.singletonList(1));
RouteUnit routeUnit = new RouteUnit(new RouteMapper("ds", "ds_0"), Collections.singletonList(new RouteMapper("tbl", "tbl_0")));
RouteContext routeContext = new RouteContext();
@@ -113,7 +113,7 @@ public final class RouteSQLRewriteEngineTest {
InsertStatementContext statementContext = mock(InsertStatementContext.class, RETURNS_DEEP_STUBS);
when(((TableAvailable) statementContext).getTablesContext().getDatabaseName().isPresent()).thenReturn(false);
when(statementContext.getGroupedParameters()).thenReturn(Collections.singletonList(Collections.singletonList(1)));
- SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
+ SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
mock(ShardingSphereSchema.class), statementContext, "INSERT INTO tbl VALUES (?)", Collections.singletonList(1));
RouteUnit routeUnit = new RouteUnit(new RouteMapper("ds", "ds_0"), Collections.singletonList(new RouteMapper("tbl", "tbl_0")));
RouteContext routeContext = new RouteContext();
@@ -132,7 +132,7 @@ public final class RouteSQLRewriteEngineTest {
when(statementContext.getInsertSelectContext()).thenReturn(null);
when(statementContext.getGroupedParameters()).thenReturn(Collections.singletonList(Collections.singletonList(1)));
when(statementContext.getOnDuplicateKeyUpdateParameters()).thenReturn(Collections.emptyList());
- SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
+ SQLRewriteContext sqlRewriteContext = new SQLRewriteContext(DefaultSchema.LOGIC_NAME,
mock(ShardingSphereSchema.class), statementContext, "INSERT INTO tbl VALUES (?)", Collections.singletonList(1));
RouteUnit routeUnit = new RouteUnit(new RouteMapper("ds", "ds_0"), Collections.singletonList(new RouteMapper("tbl", "tbl_0")));
RouteContext routeContext = new RouteContext();
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/config/datasource/ShardingSpherePipelineDataSourceCreator.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/config/datasource/ShardingSpherePipelineDataSourceCreator.java
index 0dc809ade2b..f56646af077 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/config/datasource/ShardingSpherePipelineDataSourceCreator.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/config/datasource/ShardingSpherePipelineDataSourceCreator.java
@@ -40,7 +40,7 @@ public final class ShardingSpherePipelineDataSourceCreator implements PipelineDa
YamlRootConfiguration rootConfig = (YamlRootConfiguration) pipelineDataSourceConfig;
ShardingRuleConfiguration shardingRuleConfig = ShardingRuleConfigurationConverter.findAndConvertShardingRuleConfiguration(rootConfig.getRules());
enableRangeQueryForInline(shardingRuleConfig);
- return ShardingSphereDataSourceFactory.createDataSource(rootConfig.getDatabaseName(), new YamlDataSourceConfigurationSwapper().swapToDataSources(rootConfig.getDataSources()),
+ return ShardingSphereDataSourceFactory.createDataSource(rootConfig.getDatabaseName(), new YamlDataSourceConfigurationSwapper().swapToDataSources(rootConfig.getDataSources()),
Collections.singletonList(shardingRuleConfig), null);
}
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/DriverJDBCExecutor.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/DriverJDBCExecutor.java
index 0b5b8a1d3a8..35948f0cf94 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/DriverJDBCExecutor.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/DriverJDBCExecutor.java
@@ -59,7 +59,7 @@ public final class DriverJDBCExecutor {
this.metaDataContexts = metaDataContexts;
this.jdbcExecutor = jdbcExecutor;
metadataRefreshEngine = new MetaDataRefreshEngine(metaDataContexts.getMetaData(schemaName),
- metaDataContexts.getOptimizerContext().getFederationMetaData().getDatabases().get(schemaName),
+ metaDataContexts.getOptimizerContext().getFederationMetaData().getDatabases().get(schemaName),
metaDataContexts.getOptimizerContext().getPlannerContexts(), metaDataContexts.getProps());
}
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/datasource/metadata/ShardingSphereDatabaseMetaData.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/datasource/metadata/ShardingSphereDatabaseMetaData.java
index 4c76414996f..77887d49e01 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/datasource/metadata/ShardingSphereDatabaseMetaData.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/datasource/metadata/ShardingSphereDatabaseMetaData.java
@@ -61,7 +61,7 @@ public final class ShardingSphereDatabaseMetaData extends AdaptedDatabaseMetaDat
public Connection getConnection() throws SQLException {
if (null == currentPhysicalConnection) {
currentPhysicalConnection = connection.getConnectionManager().getRandomConnection();
- }
+ }
return currentPhysicalConnection;
}
@@ -118,13 +118,13 @@ public final class ShardingSphereDatabaseMetaData extends AdaptedDatabaseMetaDat
@Override
public ResultSet getColumns(final String catalog, final String schemaPattern, final String tableNamePattern, final String columnNamePattern) throws SQLException {
return createDatabaseMetaDataResultSet(
- getDatabaseMetaData().getColumns(getActualCatalog(catalog), getActualSchema(schemaPattern), getActualTableNamePattern(tableNamePattern), columnNamePattern));
+ getDatabaseMetaData().getColumns(getActualCatalog(catalog), getActualSchema(schemaPattern), getActualTableNamePattern(tableNamePattern), columnNamePattern));
}
@Override
public ResultSet getColumnPrivileges(final String catalog, final String schema, final String table, final String columnNamePattern) throws SQLException {
return createDatabaseMetaDataResultSet(
- getDatabaseMetaData().getColumnPrivileges(getActualCatalog(catalog), getActualSchema(schema), getActualTable(catalog, table), columnNamePattern));
+ getDatabaseMetaData().getColumnPrivileges(getActualCatalog(catalog), getActualSchema(schema), getActualTable(catalog, table), columnNamePattern));
}
@Override
@@ -159,9 +159,9 @@ public final class ShardingSphereDatabaseMetaData extends AdaptedDatabaseMetaDat
@Override
public ResultSet getCrossReference(final String parentCatalog,
- final String parentSchema, final String parentTable, final String foreignCatalog, final String foreignSchema, final String foreignTable) throws SQLException {
+ final String parentSchema, final String parentTable, final String foreignCatalog, final String foreignSchema, final String foreignTable) throws SQLException {
return createDatabaseMetaDataResultSet(
- getDatabaseMetaData().getCrossReference(getActualCatalog(parentCatalog), getActualSchema(parentSchema), parentTable, foreignCatalog, foreignSchema, foreignTable));
+ getDatabaseMetaData().getCrossReference(getActualCatalog(parentCatalog), getActualSchema(parentSchema), parentTable, foreignCatalog, foreignSchema, foreignTable));
}
@Override
@@ -197,7 +197,7 @@ public final class ShardingSphereDatabaseMetaData extends AdaptedDatabaseMetaDat
@Override
public ResultSet getPseudoColumns(final String catalog, final String schemaPattern, final String tableNamePattern, final String columnNamePattern) throws SQLException {
return createDatabaseMetaDataResultSet(
- getDatabaseMetaData().getPseudoColumns(getActualCatalog(catalog), getActualSchema(schemaPattern), getActualTableNamePattern(tableNamePattern), columnNamePattern));
+ getDatabaseMetaData().getPseudoColumns(getActualCatalog(catalog), getActualSchema(schemaPattern), getActualTableNamePattern(tableNamePattern), columnNamePattern));
}
private String getActualTableNamePattern(final String tableNamePattern) {
@@ -215,7 +215,7 @@ public final class ShardingSphereDatabaseMetaData extends AdaptedDatabaseMetaDat
}
private Optional<String> findActualTable(final DataNodeContainedRule dataNodeContainedRule, final String catalog, final String table) {
- return Strings.isNullOrEmpty(catalog) ? dataNodeContainedRule.findFirstActualTable(table) : dataNodeContainedRule.findActualTableByCatalog(catalog, table);
+ return Strings.isNullOrEmpty(catalog) ? dataNodeContainedRule.findFirstActualTable(table) : dataNodeContainedRule.findActualTableByCatalog(catalog, table);
}
private Optional<DataNodeContainedRule> findDataNodeContainedRule() {
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/DatabaseMetaDataResultSet.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/DatabaseMetaDataResultSet.java
index da469f4c751..dac877c384e 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/DatabaseMetaDataResultSet.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/DatabaseMetaDataResultSet.java
@@ -182,12 +182,12 @@ public final class DatabaseMetaDataResultSet extends AbstractUnsupportedDatabase
public String getString(final String columnLabel) throws SQLException {
return getString(findColumn(columnLabel));
}
-
+
@Override
public String getNString(final int columnIndex) throws SQLException {
return getString(columnIndex);
}
-
+
@Override
public String getNString(final String columnLabel) throws SQLException {
return getString(columnLabel);
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/GeneratedKeysResultSet.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/GeneratedKeysResultSet.java
index a5779457011..425857bfdc9 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/GeneratedKeysResultSet.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/GeneratedKeysResultSet.java
@@ -93,12 +93,12 @@ public final class GeneratedKeysResultSet extends AbstractUnsupportedGeneratedKe
public String getString(final String columnLabel) {
return getString(1);
}
-
+
@Override
public String getNString(final int columnIndex) {
return getString(columnIndex);
}
-
+
@Override
public String getNString(final String columnLabel) {
return getString(columnLabel);
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ResultSetUtil.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ResultSetUtil.java
index b4e82b05dbd..c1cfc2ad2e4 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ResultSetUtil.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ResultSetUtil.java
@@ -118,7 +118,7 @@ public final class ResultSetUtil {
}
throw new ShardingSphereException("Unsupported data type: BigDecimal for value %s", value);
}
-
+
private static BigDecimal adjustBigDecimalResult(final BigDecimal value, final boolean needScale, final int scale) {
if (needScale) {
try {
@@ -244,7 +244,7 @@ public final class ResultSetUtil {
return value;
}
}
-
+
private static Object convertBooleanValue(final Object value) {
if (value instanceof Boolean) {
return value;
@@ -257,7 +257,7 @@ public final class ResultSetUtil {
return false;
}
}
-
+
private static Boolean longToBoolean(final long longVal) {
return -1 == longVal || longVal > 0;
}
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ShardingSphereResultSet.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ShardingSphereResultSet.java
index b1e325f38c7..74295b4e811 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ShardingSphereResultSet.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ShardingSphereResultSet.java
@@ -196,12 +196,12 @@ public final class ShardingSphereResultSet extends AbstractResultSetAdapter {
public String getString(final String columnLabel) throws SQLException {
return getString(getIndexFromColumnLabelAndIndexMap(columnLabel));
}
-
+
@Override
public String getNString(final int columnIndex) throws SQLException {
return getString(columnIndex);
}
-
+
@Override
public String getNString(final String columnLabel) throws SQLException {
return getString(columnLabel);
@@ -276,7 +276,7 @@ public final class ShardingSphereResultSet extends AbstractResultSetAdapter {
public Time getTime(final String columnLabel, final Calendar cal) throws SQLException {
return getTime(getIndexFromColumnLabelAndIndexMap(columnLabel), cal);
}
-
+
@Override
public Timestamp getTimestamp(final int columnIndex) throws SQLException {
return (Timestamp) ResultSetUtil.convertValue(mergeResultSet.getValue(columnIndex, Timestamp.class), Timestamp.class);
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationConnection.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationConnection.java
index 3fda4fc50db..569fe7e9ea1 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationConnection.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationConnection.java
@@ -106,7 +106,7 @@ public abstract class AbstractUnsupportedOperationConnection extends WrapperAdap
public final Struct createStruct(final String typeName, final Object[] attributes) throws SQLException {
throw new SQLFeatureNotSupportedException("createStruct");
}
-
+
@Override
public final Properties getClientInfo() throws SQLException {
throw new SQLFeatureNotSupportedException("getClientInfo");
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationStatement.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationStatement.java
index 5b136161b72..cb763d3dc9f 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationStatement.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationStatement.java
@@ -27,7 +27,7 @@ import java.sql.Statement;
* Unsupported {@code Statement} methods.
*/
public abstract class AbstractUnsupportedOperationStatement extends WrapperAdapter implements Statement {
-
+
@Override
public final void addBatch(final String sql) throws SQLException {
throw new SQLFeatureNotSupportedException("addBatch sql");
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/DriverStateContext.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/DriverStateContext.java
index 5a831058a3d..db80aa6c7a1 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/DriverStateContext.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/DriverStateContext.java
@@ -43,7 +43,7 @@ public final class DriverStateContext {
* @return connection
*/
public static Connection getConnection(final String schemaName, final ContextManager contextManager) {
- return TypedSPIRegistry.getRegisteredService(DriverState.class,
+ return TypedSPIRegistry.getRegisteredService(DriverState.class,
contextManager.getInstanceContext().getInstance().getState().getCurrentState().name()).getConnection(schemaName, contextManager);
}
}
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/connection/CircuitBreakerConnection.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/connection/CircuitBreakerConnection.java
index dce8faeb7ef..26c7b36ac6a 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/connection/CircuitBreakerConnection.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/connection/CircuitBreakerConnection.java
@@ -104,12 +104,12 @@ public final class CircuitBreakerConnection extends AbstractUnsupportedOperation
public Savepoint setSavepoint() throws SQLException {
throw new SQLFeatureNotSupportedException("setSavepoint");
}
-
+
@Override
public Savepoint setSavepoint(final String name) throws SQLException {
throw new SQLFeatureNotSupportedException("setSavepoint name");
}
-
+
@Override
public void releaseSavepoint(final Savepoint savepoint) throws SQLException {
throw new SQLFeatureNotSupportedException("releaseSavepoint");
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/resultset/CircuitBreakerResultSet.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/resultset/CircuitBreakerResultSet.java
index f45cfa4df47..baa7819fac5 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/resultset/CircuitBreakerResultSet.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/resultset/CircuitBreakerResultSet.java
@@ -64,12 +64,12 @@ public final class CircuitBreakerResultSet extends AbstractUnsupportedOperationR
public String getString(final String columnLabel) {
return "";
}
-
+
@Override
public String getNString(final int columnIndex) {
return "";
}
-
+
@Override
public String getNString(final String columnLabel) {
return "";
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/statement/CircuitBreakerStatement.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/statement/CircuitBreakerStatement.java
index 2f5359cd016..c501a4dc834 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/statement/CircuitBreakerStatement.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/statement/CircuitBreakerStatement.java
@@ -97,16 +97,16 @@ public final class CircuitBreakerStatement extends AbstractUnsupportedOperationS
public int getFetchSize() {
return 0;
}
-
+
@Override
public int getFetchDirection() {
return ResultSet.FETCH_FORWARD;
}
-
+
@Override
public void setFetchDirection(final int direction) {
}
-
+
@Override
public int getResultSetConcurrency() {
return ResultSet.CONCUR_READ_ONLY;
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/batch/BatchPreparedStatementExecutorTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/batch/BatchPreparedStatementExecutorTest.java
index c64779b59c1..34f7f461a3e 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/batch/BatchPreparedStatementExecutorTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/batch/BatchPreparedStatementExecutorTest.java
@@ -69,17 +69,17 @@ public final class BatchPreparedStatementExecutorTest extends AbstractBaseExecut
@Test
public void assertNoPreparedStatement() throws SQLException {
PreparedStatement preparedStatement = getPreparedStatement();
- when(preparedStatement.executeBatch()).thenReturn(new int[] {0, 0});
+ when(preparedStatement.executeBatch()).thenReturn(new int[]{0, 0});
setExecutionGroups(Collections.singletonList(preparedStatement));
- assertThat(actual.executeBatch(sqlStatementContext), is(new int[] {0, 0}));
+ assertThat(actual.executeBatch(sqlStatementContext), is(new int[]{0, 0}));
}
@Test
public void assertExecuteBatchForSinglePreparedStatementSuccess() throws SQLException {
PreparedStatement preparedStatement = getPreparedStatement();
- when(preparedStatement.executeBatch()).thenReturn(new int[] {10, 20});
+ when(preparedStatement.executeBatch()).thenReturn(new int[]{10, 20});
setExecutionGroups(Collections.singletonList(preparedStatement));
- assertThat(actual.executeBatch(sqlStatementContext), is(new int[] {10, 20}));
+ assertThat(actual.executeBatch(sqlStatementContext), is(new int[]{10, 20}));
verify(preparedStatement).executeBatch();
}
@@ -97,10 +97,10 @@ public final class BatchPreparedStatementExecutorTest extends AbstractBaseExecut
public void assertExecuteBatchForMultiplePreparedStatementsSuccess() throws SQLException {
PreparedStatement preparedStatement1 = getPreparedStatement();
PreparedStatement preparedStatement2 = getPreparedStatement();
- when(preparedStatement1.executeBatch()).thenReturn(new int[] {10, 20});
- when(preparedStatement2.executeBatch()).thenReturn(new int[] {20, 40});
+ when(preparedStatement1.executeBatch()).thenReturn(new int[]{10, 20});
+ when(preparedStatement2.executeBatch()).thenReturn(new int[]{20, 40});
setExecutionGroups(Arrays.asList(preparedStatement1, preparedStatement2));
- assertThat(actual.executeBatch(sqlStatementContext), is(new int[] {30, 60}));
+ assertThat(actual.executeBatch(sqlStatementContext), is(new int[]{30, 60}));
verify(preparedStatement1).executeBatch();
verify(preparedStatement2).executeBatch();
}
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/adapter/ResultSetGetterAdapterTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/adapter/ResultSetGetterAdapterTest.java
index 412df57435e..830f090ed53 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/adapter/ResultSetGetterAdapterTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/adapter/ResultSetGetterAdapterTest.java
@@ -190,15 +190,15 @@ public final class ResultSetGetterAdapterTest {
@Test
public void assertGetBytesForColumnIndex() throws SQLException {
MergedResult mergedResult = mock(MergedResult.class);
- when(mergedResult.getValue(1, byte[].class)).thenReturn(new byte[] {1});
- assertThat(mockShardingSphereResultSet(mergedResult).getBytes(1), is(new byte[] {1}));
+ when(mergedResult.getValue(1, byte[].class)).thenReturn(new byte[]{1});
+ assertThat(mockShardingSphereResultSet(mergedResult).getBytes(1), is(new byte[]{1}));
}
@Test
public void assertGetBytesForColumnLabel() throws SQLException {
MergedResult mergedResult = mock(MergedResult.class);
- when(mergedResult.getValue(1, byte[].class)).thenReturn(new byte[] {1});
- assertThat(mockShardingSphereResultSet(mergedResult).getBytes("col"), is(new byte[] {1}));
+ when(mergedResult.getValue(1, byte[].class)).thenReturn(new byte[]{1});
+ assertThat(mockShardingSphereResultSet(mergedResult).getBytes("col"), is(new byte[]{1}));
}
@Test
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ShardingSphereResultSetTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ShardingSphereResultSetTest.java
index 774498e5f02..0a22657ee11 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ShardingSphereResultSetTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ShardingSphereResultSetTest.java
@@ -253,14 +253,14 @@ public final class ShardingSphereResultSetTest {
@Test
public void assertGetBytesWithColumnIndex() throws SQLException {
- when(mergeResultSet.getValue(1, byte[].class)).thenReturn(new byte[] {(byte) 1});
- assertThat(shardingSphereResultSet.getBytes(1), is(new byte[] {(byte) 1}));
+ when(mergeResultSet.getValue(1, byte[].class)).thenReturn(new byte[]{(byte) 1});
+ assertThat(shardingSphereResultSet.getBytes(1), is(new byte[]{(byte) 1}));
}
@Test
public void assertGetBytesWithColumnLabel() throws SQLException {
- when(mergeResultSet.getValue(1, byte[].class)).thenReturn(new byte[] {(byte) 1});
- assertThat(shardingSphereResultSet.getBytes("label"), is(new byte[] {(byte) 1}));
+ when(mergeResultSet.getValue(1, byte[].class)).thenReturn(new byte[]{(byte) 1});
+ assertThat(shardingSphereResultSet.getBytes("label"), is(new byte[]{(byte) 1}));
}
@Test
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/state/DriverStateContextTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/state/DriverStateContextTest.java
index cddeec1e05d..7c7f9849a4e 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/state/DriverStateContextTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/state/DriverStateContextTest.java
@@ -54,7 +54,7 @@ public final class DriverStateContextTest {
@Before
public void setUp() {
Map<String, ShardingSphereMetaData> metaDataMap = mockMetaDataMap();
- when(contextManager.getMetaDataContexts()).thenReturn(new MetaDataContexts(mock(MetaDataPersistService.class), metaDataMap,
+ when(contextManager.getMetaDataContexts()).thenReturn(new MetaDataContexts(mock(MetaDataPersistService.class), metaDataMap,
mock(ShardingSphereRuleMetaData.class), mock(ExecutorEngine.class), mock(OptimizerContext.class), mock(ConfigurationProperties.class)));
when(contextManager.getInstanceContext().getInstance().getState()).thenReturn(new StateContext());
}
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-spring-infra/shardingsphere-jdbc-spring-boot-starter-infra/src/main/java/org/apache/shardingsphere/spring/boot/util/PropertyUtil.java b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-spring-infra/shardingsphere-jdbc-spring-boot-starter-infra/src/main/java/org/apache/shardingsphere/spring/boot/util/PropertyUtil.java
index 0c1cab90d19..70bc518c2b0 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-spring-infra/shardingsphere-jdbc-spring-boot-starter-infra/src/main/java/org/apache/shardingsphere/spring/boot/util/PropertyUtil.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-spring-infra/shardingsphere-jdbc-spring-boot-starter-infra/src/main/java/org/apache/shardingsphere/spring/boot/util/PropertyUtil.java
@@ -114,7 +114,7 @@ public final class PropertyUtil {
Method resultGetMethod = bindResultObject.getClass().getDeclaredMethod("get");
return resultGetMethod.invoke(bindResultObject);
}
-
+
/**
* Convert keys of map to camel case.
*
@@ -129,7 +129,7 @@ public final class PropertyUtil {
}
return result;
}
-
+
/**
* Return the specified Java Bean property name in dashed form.
*
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-spring-infra/shardingsphere-jdbc-spring-namespace-infra/src/test/java/org/apache/shardingsphere/spring/namespace/registry/ShardingSphereAlgorithmBeanRegistryTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-spring-infra/shardingsphere-jdbc-spring-namespace-infra/src/test/java/org/apache/shardingsphere/spring/namespace/registry/ShardingSphereAlgorithmBeanRegistryTest.java
index 8d8cf26e88f..d1b5feacbc3 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-spring-infra/shardingsphere-jdbc-spring-namespace-infra/src/test/java/org/apache/shardingsphere/spring/namespace/registry/ShardingSphereAlgorithmBeanRegistryTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-spring-infra/shardingsphere-jdbc-spring-namespace-infra/src/test/java/org/apache/shardingsphere/spring/namespace/registry/ShardingSphereAlgorithmBeanRegistryTest.java
@@ -35,7 +35,7 @@ public final class ShardingSphereAlgorithmBeanRegistryTest {
@Test
public void assertGetAlgorithmBeanReferences() {
ParserContext parserContext = mock(ParserContext.class, RETURNS_DEEP_STUBS);
- when(parserContext.getRegistry().getBeanDefinitionNames()).thenReturn(new String[] {"includeBean", "excludeBean"});
+ when(parserContext.getRegistry().getBeanDefinitionNames()).thenReturn(new String[]{"includeBean", "excludeBean"});
when(parserContext.getRegistry().getBeanDefinition("includeBean").getBeanClassName()).thenReturn(ShardingSphereAlgorithmFixtureFactoryBean.class.getName());
when(parserContext.getRegistry().getBeanDefinition("excludeBean").getBeanClassName()).thenReturn(Object.class.getName());
Map<String, RuntimeBeanReference> actual = ShardingSphereAlgorithmBeanRegistry.getAlgorithmBeanReferences(parserContext, ShardingSphereAlgorithmFixtureFactoryBean.class);
diff --git a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/simple/AllPrivilegesPermittedAuthorityProviderAlgorithm.java b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/simple/AllPrivilegesPermittedAuthorityProviderAlgorithm.java
index 1b452a865aa..419b09c7bde 100644
--- a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/simple/AllPrivilegesPermittedAuthorityProviderAlgorithm.java
+++ b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/simple/AllPrivilegesPermittedAuthorityProviderAlgorithm.java
@@ -55,21 +55,21 @@ public final class AllPrivilegesPermittedAuthorityProviderAlgorithm implements A
}
private static final class AllPrivilegesPermittedShardingSpherePrivileges implements ShardingSpherePrivileges {
-
+
@Override
public void setSuperPrivilege() {
}
-
+
@Override
public boolean hasPrivileges(final String schema) {
return true;
}
-
+
@Override
public boolean hasPrivileges(final Collection<PrivilegeType> privileges) {
return true;
}
-
+
@Override
public boolean hasPrivileges(final AccessSubject accessSubject, final Collection<PrivilegeType> privileges) {
return true;
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/api/impl/RuleAlteredJobAPIImpl.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/api/impl/RuleAlteredJobAPIImpl.java
index e20623956b9..6afb5d99502 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/api/impl/RuleAlteredJobAPIImpl.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/api/impl/RuleAlteredJobAPIImpl.java
@@ -323,7 +323,7 @@ public final class RuleAlteredJobAPIImpl extends AbstractPipelineJobAPIImpl impl
boolean recordsContentMatched = entry.getValue().isRecordsContentMatched();
if (!recordsContentMatched || !recordsCountMatched) {
log.error("Scaling job: {}, table: {} data consistency check failed, recordsContentMatched: {}, recordsCountMatched: {}",
- jobId, entry.getKey(), recordsContentMatched, recordsCountMatched);
+ jobId, entry.getKey(), recordsContentMatched, recordsCountMatched);
return false;
}
}
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/prepare/datasource/AbstractDataSourcePreparer.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/prepare/datasource/AbstractDataSourcePreparer.java
index 8aa3b01d8c4..1f423ff128a 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/prepare/datasource/AbstractDataSourcePreparer.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/prepare/datasource/AbstractDataSourcePreparer.java
@@ -48,7 +48,7 @@ public abstract class AbstractDataSourcePreparer implements DataSourcePreparer {
private static final Pattern PATTERN_CREATE_INDEX = Pattern.compile("CREATE\\s+(UNIQUE\\s+)?INDEX+\\s", Pattern.CASE_INSENSITIVE);
private static final Pattern PATTERN_DROP_INDEX = Pattern.compile("DROP\\s+INDEX+\\s", Pattern.CASE_INSENSITIVE);
-
+
private static final Pattern PATTERN_COMMENT_ON = Pattern.compile("COMMENT\\s+ON\\s+(COLUMN\\s+|TABLE\\s+)", Pattern.CASE_INSENSITIVE);
private static final String[] IGNORE_EXCEPTION_MESSAGE = {"multiple primary keys for table", "already exists"};
@@ -79,7 +79,7 @@ public abstract class AbstractDataSourcePreparer implements DataSourcePreparer {
return Arrays.stream(actualTableDefinition.getTableDefinition().split(";")).collect(Collectors.toList());
}
- //TODO simple lexer
+ // TODO simple lexer
protected final TableDefinitionSQLType getTableDefinitionSQLType(final String sql) {
if (PATTERN_CREATE_TABLE.matcher(sql).find()) {
return TableDefinitionSQLType.CREATE_TABLE;
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJobPreparer.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJobPreparer.java
index 6e9a31ce5b7..7d1b2b1ab88 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJobPreparer.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJobPreparer.java
@@ -79,7 +79,7 @@ public final class RuleAlteredJobPreparer {
*/
public void prepare(final RuleAlteredJobContext jobContext) {
// TODO Initialize source and target data source after tasks initialization, since dumper and importer constructor might call appendJDBCQueryProperties.
- // But InventoryTaskSplitter need to check target tables. It need to do some refactoring for appendJDBCQueryProperties vocations.
+ // But InventoryTaskSplitter need to check target tables. It need to do some refactoring for appendJDBCQueryProperties vocations.
checkSourceDataSource(jobContext);
prepareAndCheckTargetWithLock(jobContext);
try {
@@ -167,7 +167,7 @@ public final class RuleAlteredJobPreparer {
taskConfig.getDumperConfig().setPosition(getIncrementalPosition(jobContext, taskConfig, dataSourceManager));
PipelineTableMetaDataLoader sourceMetaDataLoader = jobContext.getSourceMetaDataLoader();
IncrementalTask incrementalTask = new IncrementalTask(taskConfig.getHandleConfig().getConcurrency(), taskConfig.getDumperConfig(), taskConfig.getImporterConfig(),
- pipelineChannelFactory, dataSourceManager, sourceMetaDataLoader, incrementalDumperExecuteEngine);
+ pipelineChannelFactory, dataSourceManager, sourceMetaDataLoader, incrementalDumperExecuteEngine);
jobContext.getIncrementalTasks().add(incrementalTask);
}
@@ -200,8 +200,8 @@ public final class RuleAlteredJobPreparer {
private void cleanup0(final JobConfiguration jobConfig) throws SQLException {
DatabaseType databaseType = DatabaseTypeRegistry.getActualDatabaseType(jobConfig.getHandleConfig().getSourceDatabaseType());
PositionInitializer positionInitializer = PositionInitializerFactory.getPositionInitializer(databaseType.getName());
- ShardingSpherePipelineDataSourceConfiguration sourceDataSourceConfig = (ShardingSpherePipelineDataSourceConfiguration)
- PipelineDataSourceConfigurationFactory.newInstance(jobConfig.getPipelineConfig().getSource().getType(), jobConfig.getPipelineConfig().getSource().getParameter());
+ ShardingSpherePipelineDataSourceConfiguration sourceDataSourceConfig = (ShardingSpherePipelineDataSourceConfiguration) PipelineDataSourceConfigurationFactory
+ .newInstance(jobConfig.getPipelineConfig().getSource().getType(), jobConfig.getPipelineConfig().getSource().getParameter());
for (DataSourceProperties each : new YamlDataSourceConfigurationSwapper().getDataSourcePropertiesMap(sourceDataSourceConfig.getRootConfig()).values()) {
try (PipelineDataSourceWrapper dataSource = new PipelineDataSourceWrapper(DataSourcePoolCreator.create(each), databaseType)) {
positionInitializer.destroy(dataSource);
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJobWorker.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJobWorker.java
index cf111fa8ae0..6e22fce6e64 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJobWorker.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJobWorker.java
@@ -77,7 +77,7 @@ import java.util.stream.Collectors;
public final class RuleAlteredJobWorker {
private static final RuleAlteredJobWorker INSTANCE = new RuleAlteredJobWorker();
-
+
private static final YamlRuleConfigurationSwapperEngine SWAPPER_ENGINE = new YamlRuleConfigurationSwapperEngine();
private static final AtomicBoolean WORKER_INITIALIZED = new AtomicBoolean(false);
@@ -214,7 +214,7 @@ public final class RuleAlteredJobWorker {
return Optional.of(new JobConfiguration(workflowConfig, pipelineConfig));
}
- private Collection<Pair<YamlRuleConfiguration, YamlRuleConfiguration>> groupSourceTargetRuleConfigsByType(final Collection<YamlRuleConfiguration> sourceRules,
+ private Collection<Pair<YamlRuleConfiguration, YamlRuleConfiguration>> groupSourceTargetRuleConfigsByType(final Collection<YamlRuleConfiguration> sourceRules,
final Collection<YamlRuleConfiguration> targetRules) {
Map<Class<? extends YamlRuleConfiguration>, YamlRuleConfiguration> sourceRulesMap = sourceRules.stream().collect(Collectors.toMap(YamlRuleConfiguration::getClass, Function.identity()));
Map<Class<? extends YamlRuleConfiguration>, YamlRuleConfiguration> targetRulesMap = targetRules.stream().collect(Collectors.toMap(YamlRuleConfiguration::getClass, Function.identity()));
@@ -285,7 +285,7 @@ public final class RuleAlteredJobWorker {
* @param onRuleAlteredActionConfig action configuration
* @return task configuration
*/
- public static TaskConfiguration buildTaskConfig(final PipelineConfiguration pipelineConfig,
+ public static TaskConfiguration buildTaskConfig(final PipelineConfiguration pipelineConfig,
final HandleConfiguration handleConfig, final OnRuleAlteredActionConfiguration onRuleAlteredActionConfig) {
return RuleAlteredJobConfigurationPreparerFactory.newInstance().createTaskConfiguration(pipelineConfig, handleConfig, onRuleAlteredActionConfig);
}
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/client/ConnectInfo.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/client/ConnectInfo.java
index fbda1a9312f..6e275029ffe 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/client/ConnectInfo.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/client/ConnectInfo.java
@@ -23,14 +23,14 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Getter
public final class ConnectInfo {
-
+
private final int serverId;
-
+
private final String host;
-
+
private final int port;
-
+
private final String username;
-
+
private final String password;
}
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/client/InternalResultSet.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/client/InternalResultSet.java
index a3a1154d7de..9f8fa27d0d2 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/client/InternalResultSet.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/client/InternalResultSet.java
@@ -26,7 +26,6 @@ import org.apache.shardingsphere.db.protocol.mysql.packet.command.query.text.MyS
import java.util.ArrayList;
import java.util.List;
-
/**
* Internal Result Set.
*/
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/wal/decode/MppdbDecodingPlugin.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/wal/decode/MppdbDecodingPlugin.java
index e6803b26b7c..ceeb56271ed 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/wal/decode/MppdbDecodingPlugin.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/wal/decode/MppdbDecodingPlugin.java
@@ -123,7 +123,6 @@ public final class MppdbDecodingPlugin implements DecodingPlugin {
private List<Object> getColumnDataFromMppDataEvent(final MppTableData data) {
List<Object> columns = new LinkedList<>();
-
for (int i = 0; i < data.getColumnsType().length; i++) {
columns.add(readColumnData(data.getColumnsVal()[i], data.getColumnsType()[i]));
}
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/prepare/datasource/OpenGaussDataSourcePreparer.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/prepare/datasource/OpenGaussDataSourcePreparer.java
index 2721fdc4b09..c0690d3170d 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/prepare/datasource/OpenGaussDataSourcePreparer.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/prepare/datasource/OpenGaussDataSourcePreparer.java
@@ -129,7 +129,7 @@ public final class OpenGaussDataSourcePreparer extends AbstractDataSourcePrepare
Collection<String> logicTableSQLs = splitTableDefinitionToSQLs(each).stream().map(sql -> {
TableDefinitionSQLType sqlType = getTableDefinitionSQLType(sql);
switch (sqlType) {
- //TODO replace constraint and index name
+ // TODO replace constraint and index name
case CREATE_TABLE:
sql = addIfNotExistsForCreateTableSQL(sql);
sql = replaceActualTableNameToLogicTableName(sql, each.getActualTableName(), each.getLogicTableName());
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-opengauss/src/test/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/wal/decode/MppdbDecodingPluginTest.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-opengauss/src/test/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/wal/decode/MppdbDecodingPluginTest.java
index 7f5fef6a380..0a1b4a32a22 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-opengauss/src/test/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/wal/decode/MppdbDecodingPluginTest.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-opengauss/src/test/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/wal/decode/MppdbDecodingPluginTest.java
@@ -134,9 +134,9 @@ public final class MppdbDecodingPluginTest {
MppTableData tableData = new MppTableData();
tableData.setTableName("public.test");
tableData.setOpType("INSERT");
- String[] insertTypes = new String[] {
+ String[] insertTypes = new String[]{
"time without time zone", "time with time zone", "timestamp without time zone", "timestamp with time zone", "smalldatetime", "date", "interval", "reltime"};
- String[] insertValues = new String[] {"'21:21:21'", "'21:21:21 pst'", "'2010-12-12'", "'2013-12-11 pst'", "'2003-04-12 04:05:06'", "'2021-10-10'", "'3 days'", "'2 mons'"};
+ String[] insertValues = new String[]{"'21:21:21'", "'21:21:21 pst'", "'2010-12-12'", "'2013-12-11 pst'", "'2003-04-12 04:05:06'", "'2021-10-10'", "'3 days'", "'2 mons'"};
final String[] compareValues = {
"21:21:21", "13:21:21", "2010-12-12 00:00:00.0", "2013-12-11 16:00:00.0", "2003-04-12 04:05:00.0", "2021-10-10", "0 years 0 mons 3 days 0 hours 0 mins 0.00 secs", "2 mons"};
tableData.setColumnsName(IntStream.range(0, insertTypes.length).mapToObj(idx -> "data" + idx).toArray(String[]::new));
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/importer/PostgreSQLImporter.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/importer/PostgreSQLImporter.java
index 007d7a7e88a..809424a9b7b 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/importer/PostgreSQLImporter.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/importer/PostgreSQLImporter.java
@@ -41,4 +41,3 @@ public final class PostgreSQLImporter extends AbstractImporter {
return new PostgreSQLPipelineSQLBuilder(shardingColumnsMap);
}
}
-
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/WalEventConverter.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/WalEventConverter.java
index 57038e5ae10..44be238bb0e 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/WalEventConverter.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/WalEventConverter.java
@@ -102,7 +102,7 @@ public final class WalEventConverter {
}
private DataRecord handleDeleteRowsEvent(final DeleteRowEvent event) {
- //TODO completion columns
+ // TODO completion columns
DataRecord result = createDataRecord(event, event.getPrimaryKeys().size());
result.setType(IngestDataChangeType.DELETE);
List<String> primaryKeyColumns = metaDataLoader.getTableMetaData(event.getTableName()).getPrimaryKeyColumns();
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/BaseLogSequenceNumber.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/BaseLogSequenceNumber.java
index 247fbfcdbb3..626294e7b43 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/BaseLogSequenceNumber.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/BaseLogSequenceNumber.java
@@ -28,7 +28,7 @@ public interface BaseLogSequenceNumber {
* @return Long the squence number of long value
*/
long asLong();
-
+
/**
* Get the binded object.
*
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/BaseTimestampUtils.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/BaseTimestampUtils.java
index c58568656c4..66bb880e1df 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/BaseTimestampUtils.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/BaseTimestampUtils.java
@@ -36,7 +36,7 @@ public interface BaseTimestampUtils {
* @throws SQLException the exp
*/
Time toTime(Calendar cal, String input) throws SQLException;
-
+
/**
* Get timestamp.
*
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/PostgreSQLLogSequenceNumber.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/PostgreSQLLogSequenceNu [...]
index edd54e81eba..59c8dab4995 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/PostgreSQLLogSequenceNumber.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/PostgreSQLLogSequenceNumber.java
@@ -29,12 +29,12 @@ import org.postgresql.replication.LogSequenceNumber;
public final class PostgreSQLLogSequenceNumber implements BaseLogSequenceNumber {
private final LogSequenceNumber logSequenceNumber;
-
+
@Override
public long asLong() {
return logSequenceNumber.asLong();
}
-
+
@Override
public Object get() {
return logSequenceNumber;
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/PostgreSQLTimestampUtils.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/PostgreSQLTimestampUtils.java
index f4104631128..2ec643a21ac 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/PostgreSQLTimestampUtils.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/decode/PostgreSQLTimestampUtils.java
@@ -32,12 +32,12 @@ import java.util.Calendar;
public final class PostgreSQLTimestampUtils implements BaseTimestampUtils {
private final TimestampUtils timestampUtils;
-
+
@Override
public Time toTime(final Calendar cal, final String input) throws SQLException {
return timestampUtils.toTime(cal, input);
}
-
+
@Override
public Timestamp toTimestamp(final Calendar cal, final String input) throws SQLException {
return timestampUtils.toTimestamp(cal, input);
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-spi/src/main/java/org/apache/shardingsphere/data/pipeline/api/ingest/record/Record.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-spi/src/main/java/org/apache/shardingsphere/data/pipeline/api/ingest/record/Record.java
index a885440d8ff..9f4ea3357ea 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-spi/src/main/java/org/apache/shardingsphere/data/pipeline/api/ingest/record/Record.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-spi/src/main/java/org/apache/shardingsphere/data/pipeline/api/ingest/record/Record.java
@@ -33,6 +33,6 @@ import org.apache.shardingsphere.data.pipeline.api.ingest.position.IngestPositio
public abstract class Record {
private final IngestPosition<?> position;
-
+
private long commitTime;
}
diff --git a/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/constant/SQLParserOrder.java b/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/constant/SQLParserOrder.java
index e7a78e9bf02..ac456d6951d 100644
--- a/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/constant/SQLParserOrder.java
+++ b/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/constant/SQLParserOrder.java
@@ -21,7 +21,7 @@ package org.apache.shardingsphere.parser.constant;
* SQL parser order.
*/
public final class SQLParserOrder {
-
+
/**
* SQL parser order.
*/
diff --git a/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/rule/builder/DefaultSQLParserRuleConfigurationBuilder.java b/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/rule/builder/DefaultSQLParserRuleConfigurationBuilder.java
index 3f2acfa0775..2507c8ab498 100644
--- a/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/rule/builder/DefaultSQLParserRuleConfigurationBuilder.java
+++ b/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/rule/builder/DefaultSQLParserRuleConfigurationBuilder.java
@@ -26,7 +26,7 @@ import org.apache.shardingsphere.sql.parser.api.CacheOption;
* Default SQL parser rule configuration builder.
*/
public final class DefaultSQLParserRuleConfigurationBuilder implements DefaultGlobalRuleConfigurationBuilder<SQLParserRuleConfiguration, SQLParserRuleBuilder> {
-
+
public static final CacheOption PARSE_TREE_CACHE_OPTION = new CacheOption(128, 1024L, 4);
public static final CacheOption SQL_STATEMENT_CACHE_OPTION = new CacheOption(2000, 65535L, 4);
diff --git a/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserCacheOptionConfigurationYamlSwapper.java b/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserCacheOptionConfigurationYamlSwapper.java
index 3f66329d4f0..3625ffb52e7 100644
--- a/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserCacheOptionConfigurationYamlSwapper.java
+++ b/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserCacheOptionConfigurationYamlSwapper.java
@@ -40,4 +40,3 @@ public final class SQLParserCacheOptionConfigurationYamlSwapper implements YamlC
return new CacheOption(yamlConfig.getInitialCapacity(), yamlConfig.getMaximumSize(), yamlConfig.getConcurrencyLevel());
}
}
-
diff --git a/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationYamlSwapper.java b/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationYamlSwapper.java
index 66cfceef8d2..54ec0156825 100644
--- a/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationYamlSwapper.java
+++ b/shardingsphere-kernel/shardingsphere-parser/shardingsphere-parser-core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationYamlSwapper.java
@@ -39,10 +39,10 @@ public final class SQLParserRuleConfigurationYamlSwapper implements YamlRuleConf
result.setSqlStatementCache(cacheOptionSwapper.swapToYamlConfiguration(data.getSqlStatementCache()));
return result;
}
-
+
@Override
public SQLParserRuleConfiguration swapToObject(final YamlSQLParserRuleConfiguration yamlConfig) {
- CacheOption parseTreeCacheOption = null == yamlConfig.getParseTreeCache()
+ CacheOption parseTreeCacheOption = null == yamlConfig.getParseTreeCache()
? DefaultSQLParserRuleConfigurationBuilder.PARSE_TREE_CACHE_OPTION : cacheOptionSwapper.swapToObject(yamlConfig.getParseTreeCache());
CacheOption sqlStatementCacheOption = null == yamlConfig.getSqlStatementCache()
? DefaultSQLParserRuleConfigurationBuilder.SQL_STATEMENT_CACHE_OPTION : cacheOptionSwapper.swapToObject(yamlConfig.getSqlStatementCache());
diff --git a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/test/java/org/apache/shardingsphere/singletable/metadata/SingleTableMetaDataBuilderTest.java b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/test/java/org/apache/shardingsphere/singletable/metadata/SingleTableMetaDataBuilderTest.java
index bc83029fcaa..b162fcd4b5b 100644
--- a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/test/java/org/apache/shardingsphere/singletable/metadata/SingleTableMetaDataBuilderTest.java
+++ b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/test/java/org/apache/shardingsphere/singletable/metadata/SingleTableMetaDataBuilderTest.java
@@ -79,7 +79,7 @@ public final class SingleTableMetaDataBuilderTest {
Connection connection = mock(Connection.class, RETURNS_DEEP_STUBS);
when(dataSource.getConnection()).thenReturn(connection);
mockSingleTableLoad(connection);
- singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), databaseType,
+ singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), databaseType,
Collections.singletonMap("ds", dataSource), Collections.emptyList(), new ConfigurationProperties(new Properties()));
when(databaseType.formatTableNamePattern("tbl")).thenReturn("tbl");
mockTableIsExist(connection);
diff --git a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/test/java/org/apache/shardingsphere/singletable/route/SingleTableRouteEngineTest.java b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/test/java/org/apache/shardingsphere/singletable/route/SingleTableRouteEngineTest.java
index baae0dc5e3f..acdd895aca4 100644
--- a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/test/java/org/apache/shardingsphere/singletable/route/SingleTableRouteEngineTest.java
+++ b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/test/java/org/apache/shardingsphere/singletable/route/SingleTableRouteEngineTest.java
@@ -73,7 +73,7 @@ public final class SingleTableRouteEngineTest {
@Test
public void assertRouteInDifferentDataSource() {
SingleTableRouteEngine singleTableRouteEngine = new SingleTableRouteEngine(Arrays.asList("t_order", "t_order_item"), null);
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class),
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class),
createDataSourceMap(), Collections.emptyList(), new ConfigurationProperties(new Properties()));
singleTableRule.getSingleTableDataNodes().put("t_order", Collections.singletonList(new DataNode("ds_0", "t_order")));
singleTableRule.getSingleTableDataNodes().put("t_order_item", Collections.singletonList(new DataNode("ds_1", "t_order_item")));
@@ -97,7 +97,7 @@ public final class SingleTableRouteEngineTest {
@Test
public void assertRouteWithoutSingleTableRule() {
SingleTableRouteEngine singleTableRouteEngine = new SingleTableRouteEngine(Arrays.asList("t_order", "t_order_item"), new MySQLCreateTableStatement());
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class),
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class),
createDataSourceMap(), Collections.emptyList(), new ConfigurationProperties(new Properties()));
RouteContext routeContext = new RouteContext();
singleTableRouteEngine.route(routeContext, singleTableRule);
@@ -113,7 +113,7 @@ public final class SingleTableRouteEngineTest {
@Test
public void assertRouteWithDefaultSingleTableRule() {
SingleTableRouteEngine singleTableRouteEngine = new SingleTableRouteEngine(Arrays.asList("t_order", "t_order_item"), new MySQLCreateTableStatement());
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration("ds_0"), mock(DatabaseType.class),
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration("ds_0"), mock(DatabaseType.class),
createDataSourceMap(), Collections.emptyList(), new ConfigurationProperties(new Properties()));
RouteContext routeContext = new RouteContext();
singleTableRouteEngine.route(routeContext, singleTableRule);
diff --git a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/test/java/org/apache/shardingsphere/singletable/rule/SingleTableRuleTest.java b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/test/java/org/apache/shardingsphere/singletable/rule/SingleTableRuleTest.java
index 20433e3fa5e..a2589f20d60 100644
--- a/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/test/java/org/apache/shardingsphere/singletable/rule/SingleTableRuleTest.java
+++ b/shardingsphere-kernel/shardingsphere-single-table/shardingsphere-single-table-core/src/test/java/org/apache/shardingsphere/singletable/rule/SingleTableRuleTest.java
@@ -87,7 +87,7 @@ public final class SingleTableRuleTest {
@Test
public void assertGetRuleType() {
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class),
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class),
Collections.emptyMap(), Collections.emptyList(), new ConfigurationProperties(new Properties()));
assertThat(singleTableRule.getType(), is(SingleTableRule.class.getSimpleName()));
}
@@ -96,7 +96,7 @@ public final class SingleTableRuleTest {
public void assertGetSingleTableDataNodes() {
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
when(dataNodeContainedRule.getAllTables()).thenReturn(Arrays.asList("t_order", "t_order_0", "t_order_1"));
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
Map<String, Collection<DataNode>> actual = singleTableRule.getSingleTableDataNodes();
assertThat(actual.size(), is(2));
@@ -108,7 +108,7 @@ public final class SingleTableRuleTest {
public void assertGetSingleTableDataNodesWithUpperCase() {
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
when(dataNodeContainedRule.getAllTables()).thenReturn(Arrays.asList("T_ORDER", "T_ORDER_0", "T_ORDER_1"));
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
Map<String, Collection<DataNode>> actual = singleTableRule.getSingleTableDataNodes();
assertThat(actual.size(), is(2));
@@ -119,7 +119,7 @@ public final class SingleTableRuleTest {
@Test
public void assertFindSingleTableDataNode() {
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
Optional<DataNode> actual = singleTableRule.findSingleTableDataNode("employee");
assertTrue(actual.isPresent());
@@ -130,7 +130,7 @@ public final class SingleTableRuleTest {
@Test
public void assertFindSingleTableDataNodeWithUpperCase() {
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
Optional<DataNode> actual = singleTableRule.findSingleTableDataNode("EMPLOYEE");
assertTrue(actual.isPresent());
@@ -141,7 +141,7 @@ public final class SingleTableRuleTest {
@Test
public void assertIsSingleTablesInSameDataSource() {
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
Collection<String> singleTableNames = new LinkedList<>();
singleTableNames.add("employee");
@@ -158,7 +158,7 @@ public final class SingleTableRuleTest {
RouteContext routeContext = new RouteContext();
routeContext.putRouteUnit(dataSourceMapper, tableMappers);
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
assertTrue(singleTableRule.isAllTablesInSameDataSource(routeContext, singleTableNames));
}
@@ -168,7 +168,7 @@ public final class SingleTableRuleTest {
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
SingleTableRuleConfiguration singleTableRuleConfiguration = new SingleTableRuleConfiguration();
singleTableRuleConfiguration.setDefaultDataSource("ds_0");
- SingleTableRule singleTableRule = new SingleTableRule(singleTableRuleConfiguration, mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(singleTableRuleConfiguration, mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
assertTrue(singleTableRule.getDefaultDataSource().isPresent());
assertThat(singleTableRule.getDefaultDataSource().get(), is("ds_0"));
@@ -177,7 +177,7 @@ public final class SingleTableRuleTest {
@Test
public void assertGetSingleTableNames() {
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
Collection<String> tableNames = new LinkedList<>();
tableNames.add("employee");
@@ -187,7 +187,7 @@ public final class SingleTableRuleTest {
@Test
public void assertPut() {
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
String tableName = "teacher";
String dataSourceName = "ds_0";
@@ -205,7 +205,7 @@ public final class SingleTableRuleTest {
@Test
public void assertRemove() {
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
String tableName = "employee";
singleTableRule.remove(tableName);
@@ -220,7 +220,7 @@ public final class SingleTableRuleTest {
@Test
public void assertGetAllDataNodes() {
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
assertTrue(singleTableRule.getAllDataNodes().containsKey("employee"));
assertTrue(singleTableRule.getAllDataNodes().containsKey("student"));
@@ -243,7 +243,7 @@ public final class SingleTableRuleTest {
@Test
public void assertFindFirstActualTable() {
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
String logicTable = "employee";
assertFalse(singleTableRule.findFirstActualTable(logicTable).isPresent());
@@ -252,7 +252,7 @@ public final class SingleTableRuleTest {
@Test
public void assertIsNeedAccumulate() {
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
assertFalse(singleTableRule.isNeedAccumulate(Collections.emptyList()));
}
@@ -260,7 +260,7 @@ public final class SingleTableRuleTest {
@Test
public void assertFindLogicTableByActualTable() {
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
String actualTable = "student";
assertFalse(singleTableRule.findLogicTableByActualTable(actualTable).isPresent());
@@ -269,7 +269,7 @@ public final class SingleTableRuleTest {
@Test
public void assertFindActualTableByCatalog() {
DataNodeContainedRule dataNodeContainedRule = mock(DataNodeContainedRule.class);
- SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
+ SingleTableRule singleTableRule = new SingleTableRule(new SingleTableRuleConfiguration(), mock(DatabaseType.class), dataSourceMap,
Collections.singletonList(dataNodeContainedRule), new ConfigurationProperties(new Properties()));
String catalog = "employee";
String logicTable = "t_order_0";
diff --git a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/annotation/ShardingSphereTransactionType.java b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/annotation/ShardingSphereTransactionType.java
index 2435720abbf..ed513c90dcd 100644
--- a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/annotation/ShardingSphereTransactionType.java
+++ b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/annotation/ShardingSphereTransactionType.java
@@ -40,4 +40,3 @@ public @interface ShardingSphereTransactionType {
*/
TransactionType value() default TransactionType.LOCAL;
}
-
diff --git a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/spi/ShardingSphereTransactionManager.java b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/spi/ShardingSphereTransactionManager.java
index 5afc8b029bb..aceb82f735e 100644
--- a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/spi/ShardingSphereTransactionManager.java
+++ b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/spi/ShardingSphereTransactionManager.java
@@ -67,7 +67,7 @@ public interface ShardingSphereTransactionManager extends AutoCloseable {
* Begin transaction.
*/
void begin();
-
+
/**
* Begin transaction with given timeout.
*
diff --git a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManager.java b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/main/java/org/apache/shardingsphere/transaction/base/se [...]
index 713bb0bab10..b6970afd9bd 100644
--- a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManager.java
+++ b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManager.java
@@ -57,7 +57,7 @@ public final class SeataATShardingSphereTransactionManager implements ShardingSp
private final String transactionServiceGroup;
private final boolean enableSeataAT;
-
+
private final int globalTXTimeout;
public SeataATShardingSphereTransactionManager() {
@@ -98,12 +98,12 @@ public final class SeataATShardingSphereTransactionManager implements ShardingSp
Preconditions.checkState(enableSeataAT, "sharding seata-at transaction has been disabled.");
return dataSourceMap.get(dataSourceName).getConnection();
}
-
+
@Override
public void begin() {
begin(globalTXTimeout);
}
-
+
@Override
@SneakyThrows(TransactionException.class)
public void begin(final int timeout) {
@@ -115,7 +115,7 @@ public final class SeataATShardingSphereTransactionManager implements ShardingSp
globalTransaction.begin(timeout * 1000);
SeataTransactionHolder.set(globalTransaction);
}
-
+
@Override
@SneakyThrows(TransactionException.class)
public void commit(final boolean rollbackOnly) {
diff --git a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/test/java/org/apache/shardingsphere/transaction/bas [...]
index 0919df4eb6e..4892ceb1074 100644
--- a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java
+++ b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java
@@ -88,7 +88,7 @@ public final class SeataATShardingSphereTransactionManagerTest {
@Before
public void setUp() {
TransactionRuleConfiguration transactionRuleConfiguration = new TransactionRuleConfiguration("BASE", "Seata", new Properties());
- seataTransactionManager.init(DatabaseTypeRegistry.getActualDatabaseType("MySQL"),
+ seataTransactionManager.init(DatabaseTypeRegistry.getActualDatabaseType("MySQL"),
Collections.singletonList(new ResourceDataSource("foo_ds", new MockedDataSource())), new TransactionRule(transactionRuleConfiguration));
}
diff --git a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/XAShardingSphereTransactionManager.java b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/XAShardingSphereTransactionManager.java
index 7a789631c01..0e578f31f60 100644
--- a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/XAShardingSphereTransactionManager.java
+++ b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/XAShardingSphereTransactionManager.java
@@ -88,7 +88,7 @@ public final class XAShardingSphereTransactionManager implements ShardingSphereT
public void begin() {
xaTransactionManagerProvider.getTransactionManager().begin();
}
-
+
@Override
@SneakyThrows({SystemException.class, NotSupportedException.class})
public void begin(final int timeout) {
@@ -99,7 +99,7 @@ public final class XAShardingSphereTransactionManager implements ShardingSphereT
transactionManager.setTransactionTimeout(timeout);
transactionManager.begin();
}
-
+
@SneakyThrows({SystemException.class, RollbackException.class, HeuristicMixedException.class, HeuristicRollbackException.class})
@Override
public void commit(final boolean rollbackOnly) {
diff --git a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/datasource/properties/dialect/SQLServerXADataSourceDefinition.java b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/d [...]
index 675de1f196e..9e3567bba5e 100644
--- a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/datasource/properties/dialect/SQLServerXADataSourceDefinition.java
+++ b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/datasource/properties/dialect/SQLServerXADataSourceDefinition.java
@@ -37,4 +37,3 @@ public final class SQLServerXADataSourceDefinition implements XADataSourceDefini
return "SQLServer";
}
}
-
diff --git a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-provider/shardingsphere-transaction-xa-narayana/src/main/java/org/apache/shardingsphere/transaction/xa/narayana/config/NarayanaConfigurationFileGenerator.java b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-provider/shardingsphere-transaction-x [...]
index c205debfa86..907b329af6f 100644
--- a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-provider/shardingsphere-transaction-xa-narayana/src/main/java/org/apache/shardingsphere/transaction/xa/narayana/config/NarayanaConfigurationFileGenerator.java
+++ b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-provider/shardingsphere-transaction-xa-narayana/src/main/java/org/apache/shardingsphere/transaction/xa/narayana/config/NarayanaConfigurationFileGenerator.java
@@ -164,7 +164,7 @@ public final class NarayanaConfigurationFileGenerator implements TransactionConf
if (!dataSource.isPresent()) {
return;
}
- DataSourcePoolMetaDataReflection dataSourcePoolMetaDataReflection = new DataSourcePoolMetaDataReflection(dataSource.get(),
+ DataSourcePoolMetaDataReflection dataSourcePoolMetaDataReflection = new DataSourcePoolMetaDataReflection(dataSource.get(),
DataSourcePoolMetaDataFactory.newInstance(dataSource.get().getClass().getName()).map(DataSourcePoolMetaData::getFieldMetaData).orElseGet(DefaultDataSourcePoolFieldMetaData::new));
String jdbcUrl = dataSourcePoolMetaDataReflection.getJdbcUrl();
int endIndex = jdbcUrl.indexOf("?");
@@ -185,8 +185,8 @@ public final class NarayanaConfigurationFileGenerator implements TransactionConf
throw new UnsupportedOperationException(String.format("Cannot support database type: `%s` as narayana recovery store", type));
}
- private void generateTransactionProps(final String recoveryStoreUrl, final String recoveryStoreUser, final String recoveryStorePassword,
- final String recoveryStoreDataSource, final Properties props) {
+ private void generateTransactionProps(final String recoveryStoreUrl, final String recoveryStoreUser, final String recoveryStorePassword,
+ final String recoveryStoreDataSource, final Properties props) {
props.setProperty("recoveryStoreUrl", recoveryStoreUrl);
props.setProperty("recoveryStoreUser", recoveryStoreUser);
props.setProperty("recoveryStorePassword", recoveryStorePassword);
diff --git a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-provider/shardingsphere-transaction-xa-narayana/src/main/java/org/apache/shardingsphere/transaction/xa/narayana/manager/DataSourceXAResourceRecoveryHelper.java b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-provider/shardingsphere-transaction- [...]
index fbd39936cd7..c82de5b8ff2 100644
--- a/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-provider/shardingsphere-transaction-xa-narayana/src/main/java/org/apache/shardingsphere/transaction/xa/narayana/manager/DataSourceXAResourceRecoveryHelper.java
+++ b/shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-provider/shardingsphere-transaction-xa-narayana/src/main/java/org/apache/shardingsphere/transaction/xa/narayana/manager/DataSourceXAResourceRecoveryHelper.java
@@ -75,7 +75,7 @@ public final class DataSourceXAResourceRecoveryHelper implements XAResourceRecov
@Override
public XAResource[] getXAResources() {
if (connect()) {
- return new XAResource[] {this};
+ return new XAResource[]{this};
}
return NO_XA_RESOURCES;
}
diff --git a/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/metadata/MetaDataContexts.java b/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/metadata/MetaDataContexts.java
index 4f5c436856c..579b626d1f3 100644
--- a/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/metadata/MetaDataContexts.java
+++ b/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/metadata/MetaDataContexts.java
@@ -55,7 +55,7 @@ public final class MetaDataContexts implements AutoCloseable {
private final ConfigurationProperties props;
public MetaDataContexts(final MetaDataPersistService metaDataPersistService) {
- this(metaDataPersistService, new LinkedHashMap<>(), new ShardingSphereRuleMetaData(Collections.emptyList(), Collections.emptyList()), null,
+ this(metaDataPersistService, new LinkedHashMap<>(), new ShardingSphereRuleMetaData(Collections.emptyList(), Collections.emptyList()), null,
OptimizerContextFactory.create(new HashMap<>(), new ShardingSphereRuleMetaData(Collections.emptyList(), Collections.emptyList())), new ConfigurationProperties(new Properties()));
}
diff --git a/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsBuilderTest.java b/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsBuilderTest.java
index 32610f6c697..b55449cbd36 100644
--- a/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsBuilderTest.java
+++ b/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsBuilderTest.java
@@ -55,7 +55,7 @@ public final class MetaDataContextsBuilderTest {
AuthorityRuleConfiguration authorityRuleConfig = new AuthorityRuleConfiguration(Collections.singleton(user),
new ShardingSphereAlgorithmConfiguration("ALL_PRIVILEGES_PERMITTED", new Properties()));
MetaDataContextsBuilder builder = new MetaDataContextsBuilder(Collections.singleton(authorityRuleConfig), props);
- builder.addDatabase("logic_db", DatabaseTypeRegistry.getDefaultDatabaseType(),
+ builder.addDatabase("logic_db", DatabaseTypeRegistry.getDefaultDatabaseType(),
new DataSourceProvidedDatabaseConfiguration(Collections.emptyMap(), Collections.singletonList(new FixtureRuleConfiguration())), props);
MetaDataContexts actual = builder.build(mock(MetaDataPersistService.class));
assertRules(actual);
diff --git a/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsTest.java b/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsTest.java
index 5a6fa2d0a2c..477ca09c821 100644
--- a/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsTest.java
+++ b/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsTest.java
@@ -47,7 +47,7 @@ public final class MetaDataContextsTest {
@Test
public void assertGetDefaultMetaData() {
- MetaDataContexts metaDataContexts = new MetaDataContexts(mock(MetaDataPersistService.class), Collections.singletonMap(DefaultSchema.LOGIC_NAME, metaData),
+ MetaDataContexts metaDataContexts = new MetaDataContexts(mock(MetaDataPersistService.class), Collections.singletonMap(DefaultSchema.LOGIC_NAME, metaData),
mock(ShardingSphereRuleMetaData.class), null, optimizerContext, new ConfigurationProperties(new Properties()));
assertThat(metaDataContexts.getMetaData(DefaultSchema.LOGIC_NAME), is(metaData));
}
diff --git a/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/MetaDataPersistServiceTest.java b/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/MetaDataPersistServiceTest.java
index 2209dbfe0b3..1deed2770e6 100644
--- a/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/MetaDataPersistServiceTest.java
+++ b/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/MetaDataPersistServiceTest.java
@@ -111,7 +111,7 @@ public final class MetaDataPersistServiceTest {
private Map<String, DataSourceProperties> createDataSourcePropertiesMap(final Map<String, DataSource> dataSourceMap) {
return dataSourceMap.entrySet().stream().collect(
- Collectors.toMap(Entry::getKey, entry -> DataSourcePropertiesCreator.create(entry.getValue()), (oldValue, currentValue) -> oldValue, LinkedHashMap::new));
+ Collectors.toMap(Entry::getKey, entry -> DataSourcePropertiesCreator.create(entry.getValue()), (oldValue, currentValue) -> oldValue, LinkedHashMap::new));
}
@Test
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinator.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinator.java
index 7c57d4db795..a6148011854 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinator.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinator.java
@@ -283,8 +283,8 @@ public final class ClusterContextManagerCoordinator {
}
Collection<YamlExecuteProcessContext> processContexts = ShowProcessListManager.getInstance().getAllProcessContext();
if (!processContexts.isEmpty()) {
- registryCenter.getRepository().persist(ProcessNode.getShowProcessListInstancePath(event.getShowProcessListId(),
- instanceDefinition.getInstanceType().name().toLowerCase() + "_" + instanceDefinition.getInstanceId().getId()),
+ registryCenter.getRepository().persist(ProcessNode.getShowProcessListInstancePath(event.getShowProcessListId(),
+ instanceDefinition.getInstanceType().name().toLowerCase() + "_" + instanceDefinition.getInstanceId().getId()),
YamlEngine.marshal(new BatchYamlExecuteProcessContext(new LinkedList<>(processContexts))));
}
registryCenter.getRepository().delete(ComputeNode
@@ -325,8 +325,8 @@ public final class ClusterContextManagerCoordinator {
private void disableDataSources(final StatusContainedRule rule) {
Map<String, StorageNodeDataSource> storageNodes = registryCenter.getStorageNodeStatusService().loadStorageNodes();
- Map<String, StorageNodeDataSource> disableDataSources = storageNodes.entrySet().stream().filter(entry ->
- StorageNodeStatus.DISABLED.name().toLowerCase().equals(entry.getValue().getStatus())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
+ Map<String, StorageNodeDataSource> disableDataSources = storageNodes.entrySet().stream().filter(entry -> StorageNodeStatus.DISABLED.name().toLowerCase().equals(entry.getValue().getStatus()))
+ .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
disableDataSources.forEach((key, value) -> rule.updateStatus(new DataSourceNameDisabledEvent(new QualifiedSchema(key), true)));
}
}
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/config/event/schema/SchemaChangedEvent.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/config/event/schema/SchemaChangedEvent.java
index 80096f9c86f..ef40a36b3f4 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/config/event/schema/SchemaChangedEvent.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/config/event/schema/SchemaChangedEvent.java
@@ -28,7 +28,7 @@ import org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.Gover
@RequiredArgsConstructor
@Getter
public final class SchemaChangedEvent implements GovernanceEvent {
-
+
private final String schemaName;
private final TableMetaData changedTableMetaData;
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/metadata/watcher/MetaDataChangedWatcher.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/metadata/watcher/MetaDataChangedWatcher.java
index add7b533d8f..11366cb1723 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/metadata/watcher/MetaDataChangedWatcher.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/metadata/watcher/MetaDataChangedWatcher.java
@@ -84,7 +84,7 @@ public final class MetaDataChangedWatcher implements GovernanceWatcher<Governanc
private boolean isTableMetaDataChanged(final DataChangedEvent event) {
Optional<String> schemaName = SchemaMetaDataNode.getSchemaName(event.getKey());
Optional<String> tableName = SchemaMetaDataNode.getTableName(event.getKey());
- return schemaName.isPresent() && tableName.isPresent()
+ return schemaName.isPresent() && tableName.isPresent()
&& !SystemSchemaBuilderRule.isSystemTable(schemaName.get(), tableName.get()) && !Strings.isNullOrEmpty(event.getValue());
}
@@ -121,7 +121,8 @@ public final class MetaDataChangedWatcher implements GovernanceWatcher<Governanc
@SuppressWarnings("unchecked")
private DataSourceChangedEvent createDataSourceChangedEvent(final String schemaName, final String schemaVersion, final DataChangedEvent event) {
Map<String, Map<String, Object>> yamlDataSources = YamlEngine.unmarshal(event.getValue(), Map.class);
- Map<String, DataSourceProperties> dataSourcePropertiesMap = yamlDataSources.isEmpty() ? new HashMap<>()
+ Map<String, DataSourceProperties> dataSourcePropertiesMap = yamlDataSources.isEmpty()
+ ? new HashMap<>()
: yamlDataSources.entrySet().stream().collect(Collectors.toMap(
Entry::getKey, entry -> new YamlDataSourceConfigurationSwapper().swapToDataSourceProperties(entry.getValue()), (oldValue, currentValue) -> oldValue, LinkedHashMap::new));
return new DataSourceChangedEvent(schemaName, schemaVersion, dataSourcePropertiesMap);
@@ -130,11 +131,12 @@ public final class MetaDataChangedWatcher implements GovernanceWatcher<Governanc
private GovernanceEvent createRuleChangedEvent(final String schemaName, final String schemaVersion, final DataChangedEvent event) {
return new RuleConfigurationsChangedEvent(schemaName, schemaVersion, getRuleConfigurations(event.getValue()));
}
-
+
@SuppressWarnings("unchecked")
private Collection<RuleConfiguration> getRuleConfigurations(final String yamlContent) {
Collection<YamlRuleConfiguration> rules = Strings.isNullOrEmpty(yamlContent)
- ? new LinkedList<>() : YamlEngine.unmarshal(yamlContent, Collection.class, true);
+ ? new LinkedList<>()
+ : YamlEngine.unmarshal(yamlContent, Collection.class, true);
return new YamlRuleConfigurationSwapperEngine().swapToRuleConfigurations(rules);
}
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/WorkerIdEvent.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/WorkerIdEvent.java
index ce35ca5d6c2..a979386202b 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/WorkerIdEvent.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/WorkerIdEvent.java
@@ -30,5 +30,5 @@ public final class WorkerIdEvent implements GovernanceEvent {
private final String instanceId;
- private final Long workerId;
+ private final Long workerId;
}
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChangedWatcher.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChan [...]
index 5edb70df61e..f2f75ae4a03 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChangedWatcher.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChangedWatcher.java
@@ -92,7 +92,7 @@ public final class ComputeNodeStateChangedWatcher implements GovernanceWatcher<G
} else if (Type.DELETED == event.getType()) {
return Optional.of(new ShowProcessListUnitCompleteEvent(matcher.group(3)));
}
- return Optional.empty();
+ return Optional.empty();
}
private static Matcher getShowProcessTriggerMatcher(final DataChangedEvent event) {
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChangedWatcherTest.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeState [...]
index dec9097cd64..640f90bec18 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChangedWatcherTest.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChangedWatcherTest.java
@@ -38,7 +38,7 @@ public final class ComputeNodeStateChangedWatcherTest {
@Test
public void assertCreateEventWhenEnabled() {
- Optional<GovernanceEvent> actual = new ComputeNodeStateChangedWatcher().createGovernanceEvent(new DataChangedEvent("/nodes/compute_nodes/attributes/127.0.0.1@3307/status",
+ Optional<GovernanceEvent> actual = new ComputeNodeStateChangedWatcher().createGovernanceEvent(new DataChangedEvent("/nodes/compute_nodes/attributes/127.0.0.1@3307/status",
YamlEngine.marshal(Arrays.asList(ComputeNodeStatus.CIRCUIT_BREAK.name())), Type.ADDED));
assertTrue(actual.isPresent());
assertThat(((StateEvent) actual.get()).getStatus(), is(Arrays.asList(ComputeNodeStatus.CIRCUIT_BREAK.name())));
@@ -75,7 +75,7 @@ public final class ComputeNodeStateChangedWatcherTest {
@Test
public void assertCreateAddLabelEvent() {
Optional<GovernanceEvent> actual = new ComputeNodeStateChangedWatcher()
- .createGovernanceEvent(new DataChangedEvent("/nodes/compute_nodes/attributes/127.0.0.1@3307/labels",
+ .createGovernanceEvent(new DataChangedEvent("/nodes/compute_nodes/attributes/127.0.0.1@3307/labels",
YamlEngine.marshal(Arrays.asList("label_1", "label_2")), Type.ADDED));
assertTrue(actual.isPresent());
assertThat(((LabelsEvent) actual.get()).getLabels(), is(Arrays.asList("label_1", "label_2")));
@@ -85,7 +85,7 @@ public final class ComputeNodeStateChangedWatcherTest {
@Test
public void assertCreateUpdateLabelsEvent() {
Optional<GovernanceEvent> actual = new ComputeNodeStateChangedWatcher()
- .createGovernanceEvent(new DataChangedEvent("/nodes/compute_nodes/attributes/127.0.0.1@3307/labels",
+ .createGovernanceEvent(new DataChangedEvent("/nodes/compute_nodes/attributes/127.0.0.1@3307/labels",
YamlEngine.marshal(Arrays.asList("label_1", "label_2")), Type.UPDATED));
assertTrue(actual.isPresent());
assertThat(((LabelsEvent) actual.get()).getLabels(), is(Arrays.asList("label_1", "label_2")));
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-etcd/src/main/java/org/apache/shardingsphere/mode/repository/cluster/etcd/props/EtcdPropertyKey.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-clu [...]
index b1209f875b5..ea543a94d13 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-etcd/src/main/java/org/apache/shardingsphere/mode/repository/cluster/etcd/props/EtcdPropertyKey.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-etcd/src/main/java/org/apache/shardingsphere/mode/repository/cluster/etcd/props/EtcdPropertyKey.java
@@ -32,7 +32,7 @@ public enum EtcdPropertyKey implements TypedPropertyKey {
* Time to live seconds.
*/
TIME_TO_LIVE_SECONDS("timeToLiveSeconds", "30", long.class),
-
+
/**
* Time out to connection.
*/
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-etcd/src/test/java/org/apache/shardingsphere/mode/repository/cluster/etcd/EtcdRepositoryTest.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluste [...]
index b20cd3f16ef..eaffd42e28d 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-etcd/src/test/java/org/apache/shardingsphere/mode/repository/cluster/etcd/EtcdRepositoryTest.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-etcd/src/test/java/org/apache/shardingsphere/mode/repository/cluster/etcd/EtcdRepositoryTest.java
@@ -151,11 +151,11 @@ public final class EtcdRepositoryTest {
@Test
public void assertGetChildrenKeys() {
io.etcd.jetcd.api.KeyValue keyValue1 = io.etcd.jetcd.api.KeyValue.newBuilder()
- .setKey(ByteString.copyFromUtf8("/key/key1/key1-1"))
- .setValue(ByteString.copyFromUtf8("value1")).build();
+ .setKey(ByteString.copyFromUtf8("/key/key1/key1-1"))
+ .setValue(ByteString.copyFromUtf8("value1")).build();
io.etcd.jetcd.api.KeyValue keyValue2 = io.etcd.jetcd.api.KeyValue.newBuilder()
- .setKey(ByteString.copyFromUtf8("/key/key2"))
- .setValue(ByteString.copyFromUtf8("value3")).build();
+ .setKey(ByteString.copyFromUtf8("/key/key2"))
+ .setValue(ByteString.copyFromUtf8("value3")).build();
List<KeyValue> keyValues = Arrays.asList(new KeyValue(keyValue1, ByteSequence.EMPTY), new KeyValue(keyValue2, ByteSequence.EMPTY),
new KeyValue(keyValue1, ByteSequence.EMPTY));
when(getResponse.getKvs()).thenReturn(keyValues);
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/JDBCDatabaseCommunicationEngine.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/JDBCDatabaseCommunicationEngine.java
index f51d0f7d375..d68d0551c5a 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/JDBCDatabaseCommunicationEngine.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/JDBCDatabaseCommunicationEngine.java
@@ -124,7 +124,7 @@ public final class JDBCDatabaseCommunicationEngine extends DatabaseCommunication
// TODO move federation route logic to binder
SQLStatementContext<?> sqlStatementContext = logicSQL.getSqlStatementContext();
String defaultSchemaName = backendConnection.getConnectionSession().getSchemaName();
- if (executionContext.getRouteContext().isFederated() || (sqlStatementContext instanceof SelectStatementContext
+ if (executionContext.getRouteContext().isFederated() || (sqlStatementContext instanceof SelectStatementContext
&& SystemSchemaUtil.containsSystemSchema(sqlStatementContext.getDatabaseType(), sqlStatementContext.getTablesContext().getSchemaNames(), defaultSchemaName))) {
MetaDataContexts metaDataContexts = ProxyContext.getInstance().getContextManager().getMetaDataContexts();
ResultSet resultSet = doExecuteFederation(logicSQL, metaDataContexts);
@@ -157,7 +157,7 @@ public final class JDBCDatabaseCommunicationEngine extends DatabaseCommunication
private DriverExecutionPrepareEngine<JDBCExecutionUnit, Connection> createDriverExecutionPrepareEngine(final boolean isReturnGeneratedKeys, final MetaDataContexts metaData) {
int maxConnectionsSizePerQuery = metaData.getProps().<Integer>getValue(ConfigurationPropertyKey.MAX_CONNECTIONS_SIZE_PER_QUERY);
JDBCBackendStatement statementManager = (JDBCBackendStatement) backendConnection.getConnectionSession().getStatementManager();
- return new DriverExecutionPrepareEngine<>(getDriverType(), maxConnectionsSizePerQuery, backendConnection, statementManager,
+ return new DriverExecutionPrepareEngine<>(getDriverType(), maxConnectionsSizePerQuery, backendConnection, statementManager,
new StatementOption(isReturnGeneratedKeys), metaData.getMetaData(backendConnection.getConnectionSession().getSchemaName()).getRuleMetaData().getRules());
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/config/yaml/swapper/YamlProxyConfigurationSwapper.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/config/yaml/swapper/YamlProxyConfigurationSwapper.java
index 5ddfdc6a547..fb658f5dd32 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/config/yaml/swapper/YamlProxyConfigurationSwapper.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/config/yaml/swapper/YamlProxyConfigurationSwapper.java
@@ -36,11 +36,11 @@ import java.util.Map.Entry;
* YAML proxy configuration swapper.
*/
public final class YamlProxyConfigurationSwapper {
-
+
private final YamlProxyDataSourceConfigurationSwapper dataSourceConfigSwapper = new YamlProxyDataSourceConfigurationSwapper();
-
+
private final YamlRuleConfigurationSwapperEngine ruleConfigSwapperEngine = new YamlRuleConfigurationSwapperEngine();
-
+
/**
* Swap YAML proxy configuration to proxy configuration.
*
@@ -53,20 +53,20 @@ public final class YamlProxyConfigurationSwapper {
yamlConfig.getServerConfiguration().getProps(), yamlConfig.getServerConfiguration().getLabels());
return new ProxyConfiguration(databaseConfigs, globalConfig);
}
-
+
private Map<String, DataSourceGeneratedDatabaseConfiguration> swapDatabaseConfigurations(final YamlProxyConfiguration yamlConfig) {
Map<String, DataSourceGeneratedDatabaseConfiguration> result = new LinkedHashMap<>(yamlConfig.getDatabaseConfigurations().size(), 1);
boolean isDataSourceAggregation = yamlConfig.getServerConfiguration().getProps().containsKey("data-source-aggregation-enabled")
&& (boolean) yamlConfig.getServerConfiguration().getProps().get("data-source-aggregation-enabled");
for (Entry<String, YamlProxyDatabaseConfiguration> entry : yamlConfig.getDatabaseConfigurations().entrySet()) {
- Map<String, DataSourceConfiguration> databaseDataSourceConfigs
+ Map<String, DataSourceConfiguration> databaseDataSourceConfigs
= swapDataSourceConfigurations(entry.getValue().getDataSources(), entry.getValue().getDatabaseName(), isDataSourceAggregation);
Collection<RuleConfiguration> databaseRuleConfigs = ruleConfigSwapperEngine.swapToRuleConfigurations(entry.getValue().getRules());
result.put(entry.getKey(), new DataSourceGeneratedDatabaseConfiguration(databaseDataSourceConfigs, databaseRuleConfigs));
}
return result;
}
-
+
private Map<String, DataSourceConfiguration> swapDataSourceConfigurations(final Map<String, YamlProxyDataSourceConfiguration> yamlConfigs, final String databaseName,
final boolean isDataSourceAggregation) {
Map<String, DataSourceConfiguration> result = new LinkedHashMap<>(yamlConfigs.size(), 1);
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/config/yaml/swapper/YamlProxyDataSourceConfigurationSwapper.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/config/yaml/swapper/YamlProxyDataSourceConfigurationSwapper.java
index 39ef7efd334..f19aab6c740 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/config/yaml/swapper/YamlProxyDataSourceConfigurationSwapper.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/config/yaml/swapper/YamlProxyDataSourceConfigurationSwapper.java
@@ -53,7 +53,7 @@ public final class YamlProxyDataSourceConfigurationSwapper {
return new PoolConfiguration(yamlConfig.getConnectionTimeoutMilliseconds(), yamlConfig.getIdleTimeoutMilliseconds(),
yamlConfig.getMaxLifetimeMilliseconds(), yamlConfig.getMaxPoolSize(), yamlConfig.getMinPoolSize(), yamlConfig.getReadOnly(), yamlConfig.getCustomPoolProps());
}
-
+
private void setGlobalDataSourceSchema(final String databaseName, final String dataSourceName, final String jdbcUrl) {
String key = databaseName + "." + dataSourceName;
StandardJdbcUrlParser jdbcUrlParser = new StandardJdbcUrlParser();
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/session/ConnectionSession.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/session/ConnectionSession.java
index 1af819da8f6..ddbbd56f0a8 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/session/ConnectionSession.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/session/ConnectionSession.java
@@ -61,14 +61,14 @@ public final class ConnectionSession {
@Getter(AccessLevel.NONE)
private final AtomicBoolean autoCommit = new AtomicBoolean(true);
-
+
@Getter(AccessLevel.NONE)
private AtomicBoolean readOnly = new AtomicBoolean(false);
-
+
private TransactionIsolationLevel defaultIsolationLevel;
-
+
private TransactionIsolationLevel isolationLevel;
-
+
private final BackendConnection backendConnection;
private final ExecutorStatementManager statementManager;
@@ -135,7 +135,7 @@ public final class ConnectionSession {
public boolean isAutoCommit() {
return autoCommit.get();
}
-
+
/**
* Set autocommit.
*
@@ -144,7 +144,7 @@ public final class ConnectionSession {
public void setAutoCommit(final boolean autoCommit) {
this.autoCommit.set(autoCommit);
}
-
+
/**
* Is readonly.
*
@@ -153,7 +153,7 @@ public final class ConnectionSession {
public boolean isReadOnly() {
return readOnly.get();
}
-
+
/**
* Set readonly.
*
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/session/transaction/TransactionStatus.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/session/transaction/TransactionStatus.java
index 4df4945755f..4b982331aee 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/session/transaction/TransactionStatus.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/session/transaction/TransactionStatus.java
@@ -36,7 +36,7 @@ public final class TransactionStatus {
private volatile boolean inTransaction;
private volatile TransactionType transactionType;
-
+
@Setter
private volatile boolean manualXA;
@@ -55,7 +55,7 @@ public final class TransactionStatus {
public TransactionType getTransactionType() {
return manualXA ? TransactionType.MANUALXA : transactionType;
}
-
+
/**
* Check there's any transaction on this session.
*
@@ -64,7 +64,7 @@ public final class TransactionStatus {
public boolean isInTransaction() {
return inTransaction || manualXA;
}
-
+
/**
* Change transaction type of current channel.
*
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/FunctionWithException.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/FunctionWithException.java
index 7d1a66cbb3b..bc92d7dc5b6 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/FunctionWithException.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/FunctionWithException.java
@@ -22,7 +22,7 @@ package org.apache.shardingsphere.proxy.backend.text.admin;
*/
@FunctionalInterface
public interface FunctionWithException<T, E extends Exception> {
-
+
/**
* Apply function.
*
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/executor/AbstractDatabaseMetadataExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/executor/AbstractDatabaseMetadataExecutor.java
index c42ee4034f3..ddf20c2adbd 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/executor/AbstractDatabaseMetadataExecutor.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/executor/AbstractDatabaseMetadataExecutor.java
@@ -186,11 +186,11 @@ public abstract class AbstractDatabaseMetadataExecutor implements DatabaseAdminQ
public DefaultDatabaseMetadataExecutor(final String sql) {
this.sql = sql;
}
-
+
@Override
protected void initSchemaData(final String schemaName) {
}
-
+
/**
* Get the schema names as a condition for SQL execution.
*
@@ -215,8 +215,8 @@ public abstract class AbstractDatabaseMetadataExecutor implements DatabaseAdminQ
Optional<Entry<String, DataSource>> dataSourceEntry = resource.getDataSources().entrySet().stream().findFirst();
log.info("Actual SQL: {} ::: {}", dataSourceEntry.orElseThrow(DatabaseNotExistedException::new).getKey(), sql);
try (Connection conn = dataSourceEntry.get().getValue().getConnection();
- PreparedStatement ps = conn.prepareStatement(sql);
- ResultSet resultSet = ps.executeQuery()) {
+ PreparedStatement ps = conn.prepareStatement(sql);
+ ResultSet resultSet = ps.executeQuery()) {
callback.apply(resultSet);
}
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/enums/VariableEnum.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/enums/VariableEnum.java
index a23cbb79335..6caf1666a16 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/enums/VariableEnum.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/enums/VariableEnum.java
@@ -24,9 +24,9 @@ import org.apache.shardingsphere.proxy.backend.text.distsql.ral.common.exception
*/
public enum VariableEnum {
- AGENT_PLUGINS_ENABLED,
+ AGENT_PLUGINS_ENABLED,
- CACHED_CONNECTIONS,
+ CACHED_CONNECTIONS,
TRANSACTION_TYPE;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/ApplyDistSQLHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/ApplyDistSQLHandler.java
index 5e857f33a2f..1783ca71265 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/ApplyDistSQLHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/ApplyDistSQLHandler.java
@@ -28,6 +28,6 @@ public final class ApplyDistSQLHandler extends UpdatableRALBackendHandler<AlterT
@Override
protected void update(final ContextManager contextManager, final AlterTransactionRuleStatement sqlStatement) {
- //TODO Metadata support required
+ // TODO Metadata support required
}
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/DiscardDistSQLHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/DiscardDistSQLHandler.java
index 6b75b8c27a6..0d5fc016550 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/DiscardDistSQLHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/DiscardDistSQLHandler.java
@@ -28,6 +28,6 @@ public final class DiscardDistSQLHandler extends UpdatableRALBackendHandler<Alte
@Override
protected void update(final ContextManager contextManager, final AlterTransactionRuleStatement sqlStatement) {
- //TODO Metadata support required
+ // TODO Metadata support required
}
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/PrepareDistSQLHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/PrepareDistSQLHandler.java
index 1103c612fa3..87ca8ebe708 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/PrepareDistSQLHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/PrepareDistSQLHandler.java
@@ -28,6 +28,6 @@ public final class PrepareDistSQLHandler extends UpdatableRALBackendHandler<Alte
@Override
protected void update(final ContextManager contextManager, final AlterTransactionRuleStatement sqlStatement) {
- //TODO Metadata support required
+ // TODO Metadata support required
}
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rql/resource/DataSourceQueryResultSet.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rql/resource/DataSourceQueryResultSet.java
index 3e34e71da95..143d1441c23 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rql/resource/DataSourceQueryResultSet.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rql/resource/DataSourceQueryResultSet.java
@@ -71,7 +71,7 @@ public final class DataSourceQueryResultSet implements DistSQLResultSet {
@Override
public Collection<String> getColumnNames() {
- return Arrays.asList("name", "type", "host", "port", "db", "connection_timeout_milliseconds", "idle_timeout_milliseconds",
+ return Arrays.asList("name", "type", "host", "port", "db", "connection_timeout_milliseconds", "idle_timeout_milliseconds",
"max_lifetime_milliseconds", "max_pool_size", "min_pool_size", "read_only", "other_attributes");
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionBackendHandler.java
index 5118fac86ea..3a58353383c 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionBackendHandler.java
@@ -54,7 +54,7 @@ public final class TransactionBackendHandler implements TextProtocolBackendHandl
private final TransactionOperationType operationType;
private final TransactionManager backendTransactionManager;
-
+
private final ConnectionSession connectionSession;
public TransactionBackendHandler(final TCLStatement tclStatement, final TransactionOperationType operationType, final ConnectionSession connectionSession) {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionSetHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionSetHandler.java
index 0a7678dbd1a..43ea3ce2f13 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionSetHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionSetHandler.java
@@ -35,11 +35,11 @@ import java.sql.SQLException;
*/
@RequiredArgsConstructor
public final class TransactionSetHandler implements TextProtocolBackendHandler {
-
+
private final SetTransactionStatement sqlStatement;
-
+
private final ConnectionSession connectionSession;
-
+
@Override
public ResponseHeader execute() throws SQLException {
if (null == sqlStatement.getScope() && connectionSession.getTransactionStatus().isInTransaction()) {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionXAHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionXAHandler.java
index a6063c9c3dc..a93bdfa1611 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionXAHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/transaction/TransactionXAHandler.java
@@ -37,29 +37,29 @@ import java.util.Collections;
*/
@RequiredArgsConstructor
public final class TransactionXAHandler implements TextProtocolBackendHandler {
-
+
private final XAStatement tclStatement;
-
+
private final ConnectionSession connectionSession;
-
+
private final SchemaAssignedDatabaseBackendHandler backendHandler;
-
+
public TransactionXAHandler(final SQLStatementContext<? extends TCLStatement> sqlStatementContext, final String sql, final ConnectionSession connectionSession) {
this.tclStatement = (XAStatement) sqlStatementContext.getSqlStatement();
this.connectionSession = connectionSession;
this.backendHandler = new SchemaAssignedDatabaseBackendHandler(sqlStatementContext, sql, connectionSession);
}
-
+
@Override
public boolean next() throws SQLException {
return this.tclStatement.getOp().equals("RECOVER") && this.backendHandler.next();
}
-
+
@Override
public Collection<Object> getRowData() throws SQLException {
return this.tclStatement.getOp().equals("RECOVER") ? this.backendHandler.getRowData() : Collections.emptyList();
}
-
+
@Override
public ResponseHeader execute() throws SQLException {
switch (tclStatement.getOp()) {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/util/TransactionUtil.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/util/TransactionUtil.java
index 453b0a8a66d..d870a395655 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/util/TransactionUtil.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/util/TransactionUtil.java
@@ -28,7 +28,7 @@ import java.sql.Connection;
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class TransactionUtil {
-
+
/**
* Get the value of type int according to TransactionIsolationLevel.
*
@@ -49,7 +49,7 @@ public final class TransactionUtil {
return Connection.TRANSACTION_NONE;
}
}
-
+
/**
* Get the value of type TransactionIsolationLevel according to int.
*
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/JDBCBackendDataSourceTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/JDBCBackendDataSourceTest.java
index ca53f63f47d..fc6ce31b796 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/JDBCBackendDataSourceTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/JDBCBackendDataSourceTest.java
@@ -137,7 +137,7 @@ public final class JDBCBackendDataSourceTest {
private final String datasourceName;
private final int connectionSize;
-
+
private final ConnectionMode connectionMode;
@Override
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/BackendExecutorContextTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/BackendExecutorContextTest.java
index 665dfe3c44c..ad1117aaddc 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/BackendExecutorContextTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/BackendExecutorContextTest.java
@@ -41,7 +41,7 @@ public final class BackendExecutorContextTest {
@Before
public void setUp() {
- MetaDataContexts metaDataContexts = new MetaDataContexts(mock(MetaDataPersistService.class), Collections.emptyMap(), mock(ShardingSphereRuleMetaData.class),
+ MetaDataContexts metaDataContexts = new MetaDataContexts(mock(MetaDataPersistService.class), Collections.emptyMap(), mock(ShardingSphereRuleMetaData.class),
mock(ExecutorEngine.class), mock(OptimizerContext.class), new ConfigurationProperties(new Properties()));
ContextManager contextManager = mock(ContextManager.class, RETURNS_DEEP_STUBS);
when(contextManager.getMetaDataContexts()).thenReturn(metaDataContexts);
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/response/header/query/impl/MySQLQueryHeaderBuilderTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/response/header/query/impl/MySQLQueryHeaderBuilderTest.java
index f0266c8ac6e..2a7969ad018 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/response/header/query/impl/MySQLQueryHeaderBuilderTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/response/header/query/impl/MySQLQueryHeaderBuilderTest.java
@@ -81,7 +81,7 @@ public final class MySQLQueryHeaderBuilderTest {
public void assertDataNodeContainedRuleIsNotPresent() throws SQLException {
QueryResultMetaData queryResultMetaData = createQueryResultMetaData();
ShardingSphereMetaData metaData = createMetaData();
- QueryHeader actual = queryHeaderBuilder.build(queryResultMetaData, metaData, queryResultMetaData.getColumnName(1), queryResultMetaData.getColumnLabel(1), 1,
+ QueryHeader actual = queryHeaderBuilder.build(queryResultMetaData, metaData, queryResultMetaData.getColumnName(1), queryResultMetaData.getColumnLabel(1), 1,
new LazyInitializer<DataNodeContainedRule>() {
@Override
@@ -97,7 +97,7 @@ public final class MySQLQueryHeaderBuilderTest {
ShardingSphereMetaData result = mock(ShardingSphereMetaData.class, RETURNS_DEEP_STUBS);
ColumnMetaData columnMetaData = new ColumnMetaData("order_id", Types.INTEGER, true, false, false);
ShardingSphereSchema schema = mock(ShardingSphereSchema.class);
- when(schema.get("t_logic_order")).thenReturn(new TableMetaData("t_logic_order",
+ when(schema.get("t_logic_order")).thenReturn(new TableMetaData("t_logic_order",
Collections.singletonList(columnMetaData), Collections.singletonList(new IndexMetaData("order_id")), Collections.emptyList()));
DataSourcesMetaData dataSourcesMetaData = mock(DataSourcesMetaData.class);
when(dataSourcesMetaData.getDataSourceMetaData("ds_0")).thenReturn(mock(DataSourceMetaData.class));
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/DatabaseOperateBackendHandlerFactoryTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/DatabaseOperateBackendHandlerFactoryTest.java
index 8cd65c504ea..470eff057b7 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/DatabaseOperateBackendHandlerFactoryTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/DatabaseOperateBackendHandlerFactoryTest.java
@@ -70,7 +70,7 @@ public final class DatabaseOperateBackendHandlerFactoryTest {
@Before
public void setUp() {
- MetaDataContexts metaDataContexts = new MetaDataContexts(mock(MetaDataPersistService.class), getMetaDataMap(),
+ MetaDataContexts metaDataContexts = new MetaDataContexts(mock(MetaDataPersistService.class), getMetaDataMap(),
mock(ShardingSphereRuleMetaData.class), mock(ExecutorEngine.class), mock(OptimizerContext.class), new ConfigurationProperties(new Properties()));
when(contextManager.getMetaDataContexts()).thenReturn(metaDataContexts);
ProxyContext.getInstance().init(contextManager);
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/mysql/executor/UseDatabaseExecutorTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/mysql/executor/UseDatabaseExecutorTest.java
index 4b9d8fa0119..45e53953589 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/mysql/executor/UseDatabaseExecutorTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/mysql/executor/UseDatabaseExecutorTest.java
@@ -63,7 +63,7 @@ public final class UseDatabaseExecutorTest {
Field contextManagerField = ProxyContext.getInstance().getClass().getDeclaredField("contextManager");
contextManagerField.setAccessible(true);
ContextManager contextManager = mock(ContextManager.class, RETURNS_DEEP_STUBS);
- MetaDataContexts metaDataContexts = new MetaDataContexts(mock(MetaDataPersistService.class), getMetaDataMap(),
+ MetaDataContexts metaDataContexts = new MetaDataContexts(mock(MetaDataPersistService.class), getMetaDataMap(),
mock(ShardingSphereRuleMetaData.class), mock(ExecutorEngine.class), mock(OptimizerContext.class), new ConfigurationProperties(new Properties()));
when(contextManager.getMetaDataContexts()).thenReturn(metaDataContexts);
contextManagerField.set(ProxyContext.getInstance(), contextManager);
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/DistSQLBackendHandlerFactoryTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/DistSQLBackendHandlerFactoryTest.java
index 6874faabc85..ea2d17feb75 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/DistSQLBackendHandlerFactoryTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/DistSQLBackendHandlerFactoryTest.java
@@ -211,7 +211,7 @@ public final class DistSQLBackendHandlerFactoryTest {
ResponseHeader response = RDLBackendHandlerFactory.newInstance(new MySQLDatabaseType(), mock(DropReadwriteSplittingRuleStatement.class), connectionSession).execute();
assertThat(response, instanceOf(UpdateResponseHeader.class));
}
-
+
@Test
public void assertExecuteCreateReadwriteSplittingRuleContext() throws SQLException {
setContextManager(true);
@@ -247,7 +247,7 @@ public final class DistSQLBackendHandlerFactoryTest {
assertThat(response, instanceOf(QueryResponseHeader.class));
}
- //TODO assertExecuteStopScalingSourceWritingContext, assertExecuteCheckoutScalingContext throw exception
+ // TODO assertExecuteStopScalingSourceWritingContext, assertExecuteCheckoutScalingContext throw exception
@Ignore
@Test
public void assertExecuteStopScalingSourceWritingContext() throws SQLException {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/queryable/ShowInstanceModeHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/queryable/ShowInstanceModeHandlerTest.java
index f22bfdf06f6..117cb5fa765 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/queryable/ShowInstanceModeHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/queryable/ShowInstanceModeHandlerTest.java
@@ -58,7 +58,7 @@ public final class ShowInstanceModeHandlerTest {
private InstanceContext createInstanceContext() {
InstanceContext result = mock(InstanceContext.class, RETURNS_DEEP_STUBS);
when(result.getInstance().getInstanceDefinition().getInstanceId().getId()).thenReturn("127.0.0.1@3309");
- when(result.getModeConfiguration()).thenReturn(new ModeConfiguration("Cluster",
+ when(result.getModeConfiguration()).thenReturn(new ModeConfiguration("Cluster",
new ClusterPersistRepositoryConfiguration("ZooKeeper", "governance_ds", "127.0.0.1:2181", createProperties("key", "value1,value2")), false));
return result;
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/AlterTrafficRuleHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/AlterTrafficRuleHandlerTest.java
index f605e74e56b..b7d572d5118 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/AlterTrafficRuleHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/AlterTrafficRuleHandlerTest.java
@@ -67,7 +67,7 @@ public final class AlterTrafficRuleHandlerTest {
ContextManager contextManager = mock(ContextManager.class, RETURNS_DEEP_STUBS);
when(contextManager.getMetaDataContexts().getGlobalRuleMetaData().findRuleConfiguration(any())).thenReturn(createTrafficRule());
ProxyContext.getInstance().init(contextManager);
- TrafficRuleSegment trafficRuleSegment = new TrafficRuleSegment("rule_name_1", Arrays.asList("olap", "order_by"),
+ TrafficRuleSegment trafficRuleSegment = new TrafficRuleSegment("rule_name_1", Arrays.asList("olap", "order_by"),
new AlgorithmSegment("invalid", new Properties()), new AlgorithmSegment("invalid", new Properties()));
new AlterTrafficRuleHandler().initStatement(getSQLStatement(trafficRuleSegment)).execute();
}
@@ -77,7 +77,7 @@ public final class AlterTrafficRuleHandlerTest {
ContextManager contextManager = mock(ContextManager.class, RETURNS_DEEP_STUBS);
when(contextManager.getMetaDataContexts().getGlobalRuleMetaData().findRuleConfiguration(any())).thenReturn(createTrafficRule());
ProxyContext.getInstance().init(contextManager);
- TrafficRuleSegment trafficRuleSegment = new TrafficRuleSegment("rule_name_3", Arrays.asList("olap", "order_by"),
+ TrafficRuleSegment trafficRuleSegment = new TrafficRuleSegment("rule_name_3", Arrays.asList("olap", "order_by"),
new AlgorithmSegment("TEST", new Properties()), new AlgorithmSegment("TEST", new Properties()));
new AlterTrafficRuleHandler().initStatement(getSQLStatement(trafficRuleSegment)).execute();
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/CreateTrafficRuleHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/CreateTrafficRuleHandlerTest.java
index d6018a489e0..ce412556fc7 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/CreateTrafficRuleHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/CreateTrafficRuleHandlerTest.java
@@ -67,7 +67,7 @@ public final class CreateTrafficRuleHandlerTest {
ContextManager contextManager = mock(ContextManager.class, RETURNS_DEEP_STUBS);
when(contextManager.getMetaDataContexts().getGlobalRuleMetaData().findRuleConfiguration(any())).thenReturn(createTrafficRule());
ProxyContext.getInstance().init(contextManager);
- TrafficRuleSegment trafficRuleSegment = new TrafficRuleSegment("input_rule_name", Arrays.asList("olap", "order_by"),
+ TrafficRuleSegment trafficRuleSegment = new TrafficRuleSegment("input_rule_name", Arrays.asList("olap", "order_by"),
new AlgorithmSegment("invalid", new Properties()), new AlgorithmSegment("invalid", new Properties()));
new CreateTrafficRuleHandler().initStatement(getSQLStatement(trafficRuleSegment)).execute();
}
@@ -77,7 +77,7 @@ public final class CreateTrafficRuleHandlerTest {
ContextManager contextManager = mock(ContextManager.class, RETURNS_DEEP_STUBS);
when(contextManager.getMetaDataContexts().getGlobalRuleMetaData().findRuleConfiguration(any())).thenReturn(createTrafficRule());
ProxyContext.getInstance().init(contextManager);
- TrafficRuleSegment trafficRuleSegment = new TrafficRuleSegment("rule_name_1", Arrays.asList("olap", "order_by"),
+ TrafficRuleSegment trafficRuleSegment = new TrafficRuleSegment("rule_name_1", Arrays.asList("olap", "order_by"),
new AlgorithmSegment("TEST", new Properties()), new AlgorithmSegment("TEST", new Properties()));
new CreateTrafficRuleHandler().initStatement(getSQLStatement(trafficRuleSegment)).execute();
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/SetVariableBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/SetVariableBackendHandlerTest.java
index 4f7578e1c42..2f5bfb44aaf 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/SetVariableBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/updatable/SetVariableBackendHandlerTest.java
@@ -69,7 +69,7 @@ public final class SetVariableBackendHandlerTest {
public void setUp() {
Properties properties = new Properties();
properties.setProperty(ConfigurationPropertyKey.PROXY_BACKEND_DRIVER_TYPE.getKey(), ConfigurationPropertyKey.PROXY_BACKEND_DRIVER_TYPE.getDefaultValue());
- MetaDataContexts metaDataContexts = new MetaDataContexts(mock(MetaDataPersistService.class), getMetaDataMap(),
+ MetaDataContexts metaDataContexts = new MetaDataContexts(mock(MetaDataPersistService.class), getMetaDataMap(),
mock(ShardingSphereRuleMetaData.class), mock(ExecutorEngine.class), mock(OptimizerContext.class), new ConfigurationProperties(properties));
contextManagerBefore = ProxyContext.getInstance().getContextManager();
ContextManager contextManager = mock(ContextManager.class, RETURNS_DEEP_STUBS);
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/ShardingSphereProxy.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/ShardingSphereProxy.java
index 5c702d44c91..c3e24645287 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/ShardingSphereProxy.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/ShardingSphereProxy.java
@@ -44,7 +44,7 @@ import org.apache.shardingsphere.proxy.frontend.protocol.FrontDatabaseProtocolTy
*/
@Slf4j
public final class ShardingSphereProxy {
-
+
private EventLoopGroup bossGroup;
private EventLoopGroup workerGroup;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/command/CommandExecutorTask.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/command/CommandExecutorTask.java
index e27f3e49446..d0dbc6145e8 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/command/CommandExecutorTask.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/command/CommandExecutorTask.java
@@ -82,7 +82,7 @@ public final class CommandExecutorTask implements Runnable {
} finally {
// TODO optimize SQLStatementSchemaHolder
SQLStatementSchemaHolder.remove();
- Collection<SQLException> exceptions = Collections.emptyList();
+ Collection<SQLException> exceptions = Collections.emptyList();
try {
connectionSession.getBackendConnection().closeExecutionResources();
} catch (final BackendConnectionException ex) {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/FrontendTooManyConnectionsException.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/FrontendTooManyConnectionsException.java
index cf2cc66cf38..6c921a7d81c 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/FrontendTooManyConnectionsException.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/FrontendTooManyConnectionsException.java
@@ -21,6 +21,6 @@ package org.apache.shardingsphere.proxy.frontend.exception;
* Frontend too many connections exception.
*/
public final class FrontendTooManyConnectionsException extends FrontendException {
-
+
private static final long serialVersionUID = -4397915988239251541L;
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/test/java/org/apache/shardingsphere/proxy/frontend/protocol/FrontDatabaseProtocolTypeFactoryTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/test/java/org/apache/shardingsphere/proxy/frontend/protocol/FrontDatabaseProtocolTypeFactoryTest.java
index d9ae6677aa5..08699f5ad7b 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/test/java/org/apache/shardingsphere/proxy/frontend/protocol/FrontDatabaseProtocolTypeFactoryTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/test/java/org/apache/shardingsphere/proxy/frontend/protocol/FrontDatabaseProtocolTypeFactoryTest.java
@@ -51,7 +51,7 @@ public final class FrontDatabaseProtocolTypeFactoryTest {
@Test
public void assertGetDatabaseTypeWhenThrowShardingSphereConfigurationException() {
- MetaDataContexts metaDataContexts = new MetaDataContexts(mock(MetaDataPersistService.class), Collections.emptyMap(),
+ MetaDataContexts metaDataContexts = new MetaDataContexts(mock(MetaDataPersistService.class), Collections.emptyMap(),
mock(ShardingSphereRuleMetaData.class), mock(ExecutorEngine.class), mock(OptimizerContext.class), new ConfigurationProperties(new Properties()));
setContextManager(metaDataContexts);
assertTrue(metaDataContexts.getMetaDataMap().isEmpty());
@@ -60,7 +60,7 @@ public final class FrontDatabaseProtocolTypeFactoryTest {
@Test
public void assertGetDatabaseTypeInstanceOfMySQLDatabaseTypeFromMetaDataContextsSchemaName() {
- MetaDataContexts metaDataContexts = new MetaDataContexts(mock(MetaDataPersistService.class), mockMetaDataMap(),
+ MetaDataContexts metaDataContexts = new MetaDataContexts(mock(MetaDataPersistService.class), mockMetaDataMap(),
mock(ShardingSphereRuleMetaData.class), mock(ExecutorEngine.class), mock(OptimizerContext.class), new ConfigurationProperties(new Properties()));
setContextManager(metaDataContexts);
assertFalse(metaDataContexts.getMetaDataMap().isEmpty());
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/authentication/MySQLAuthenticationHandler.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/authentication/MySQLAuthenticationHandler.java
index 0f7945a2544..b0c3f87cd62 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/authentication/MySQLAuthenticationHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/authentication/MySQLAuthenticationHandler.java
@@ -57,7 +57,7 @@ public final class MySQLAuthenticationHandler {
}
return null == databaseName || SQLCheckEngine.check(databaseName, rules, grantee) ? Optional.empty() : Optional.of(MySQLServerErrorCode.ER_DBACCESS_DENIED_ERROR);
}
-
+
/**
* Get authenticator.
*
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareChecker.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareChecker.java
index 283e6f2a9df..60ddb1a705b 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareChecker.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareChecker.java
@@ -87,16 +87,16 @@ public final class MySQLComStmtPrepareChecker {
static {
SQL_STATEMENTS_ALLOWED.addAll(Arrays.asList(MySQLAlterTableStatement.class, MySQLAlterUserStatement.class, MySQLAnalyzeTableStatement.class,
- MySQLCacheIndexStatement.class, MySQLCallStatement.class, MySQLChangeMasterStatement.class, MySQLChecksumTableStatement.class, MySQLCommitStatement.class,
- MySQLCreateIndexStatement.class, MySQLDropIndexStatement.class, MySQLCreateDatabaseStatement.class, MySQLDropDatabaseStatement.class,
- MySQLCreateTableStatement.class, MySQLDropTableStatement.class, MySQLCreateUserStatement.class, MySQLRenameUserStatement.class, MySQLDropUserStatement.class,
- MySQLCreateViewStatement.class, MySQLDropViewStatement.class, MySQLDeleteStatement.class, MySQLDoStatement.class, MySQLFlushStatement.class,
- MySQLGrantStatement.class, MySQLInsertStatement.class, MySQLInstallPluginStatement.class, MySQLKillStatement.class, MySQLLoadIndexInfoStatement.class,
- MySQLOptimizeTableStatement.class, MySQLRenameTableStatement.class, MySQLRepairTableStatement.class, MySQLResetStatement.class,
- MySQLRevokeStatement.class, MySQLSelectStatement.class, MySQLSetStatement.class, MySQLShowWarningsStatement.class, MySQLShowErrorsStatement.class,
- MySQLShowBinlogEventsStatement.class, MySQLShowCreateProcedureStatement.class, MySQLShowCreateFunctionStatement.class, MySQLShowCreateEventStatement.class,
- MySQLShowCreateTableStatement.class, MySQLShowCreateViewStatement.class, MySQLShowBinaryLogsStatement.class, MySQLShowStatusStatement.class,
- MySQLStartSlaveStatement.class, MySQLStopSlaveStatement.class, MySQLTruncateStatement.class, MySQLUninstallPluginStatement.class, MySQLUpdateStatement.class, MySQLXAStatement.class));
+ MySQLCacheIndexStatement.class, MySQLCallStatement.class, MySQLChangeMasterStatement.class, MySQLChecksumTableStatement.class, MySQLCommitStatement.class,
+ MySQLCreateIndexStatement.class, MySQLDropIndexStatement.class, MySQLCreateDatabaseStatement.class, MySQLDropDatabaseStatement.class,
+ MySQLCreateTableStatement.class, MySQLDropTableStatement.class, MySQLCreateUserStatement.class, MySQLRenameUserStatement.class, MySQLDropUserStatement.class,
+ MySQLCreateViewStatement.class, MySQLDropViewStatement.class, MySQLDeleteStatement.class, MySQLDoStatement.class, MySQLFlushStatement.class,
+ MySQLGrantStatement.class, MySQLInsertStatement.class, MySQLInstallPluginStatement.class, MySQLKillStatement.class, MySQLLoadIndexInfoStatement.class,
+ MySQLOptimizeTableStatement.class, MySQLRenameTableStatement.class, MySQLRepairTableStatement.class, MySQLResetStatement.class,
+ MySQLRevokeStatement.class, MySQLSelectStatement.class, MySQLSetStatement.class, MySQLShowWarningsStatement.class, MySQLShowErrorsStatement.class,
+ MySQLShowBinlogEventsStatement.class, MySQLShowCreateProcedureStatement.class, MySQLShowCreateFunctionStatement.class, MySQLShowCreateEventStatement.class,
+ MySQLShowCreateTableStatement.class, MySQLShowCreateViewStatement.class, MySQLShowBinaryLogsStatement.class, MySQLShowStatusStatement.class,
+ MySQLStartSlaveStatement.class, MySQLStopSlaveStatement.class, MySQLTruncateStatement.class, MySQLUninstallPluginStatement.class, MySQLUpdateStatement.class, MySQLXAStatement.class));
}
/**
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareCheckerTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareCheckerTest.java
index 94ed6280862..904367d69f6 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareCheckerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareCheckerTest.java
@@ -80,17 +80,18 @@ public final class MySQLComStmtPrepareCheckerTest {
@Test
public void assertIsStatementAllowed() {
Collection<SQLStatement> sqlStatements = Arrays.asList(
- new MySQLAlterTableStatement(), new MySQLAlterUserStatement(), new MySQLAnalyzeTableStatement(), new MySQLCacheIndexStatement(),
- new MySQLCallStatement(), new MySQLChangeMasterStatement(), new MySQLChecksumTableStatement(), new MySQLCommitStatement(), new MySQLCreateIndexStatement(),
- new MySQLDropIndexStatement(), new MySQLCreateDatabaseStatement(), new MySQLDropDatabaseStatement(), new MySQLCreateTableStatement(),
- new MySQLDropTableStatement(), new MySQLCreateUserStatement(), new MySQLRenameUserStatement(), new MySQLDropUserStatement(),
- new MySQLCreateViewStatement(), new MySQLDropViewStatement(), new MySQLDeleteStatement(), new MySQLDoStatement(), new MySQLFlushStatement(),
- new MySQLGrantStatement(), new MySQLInsertStatement(), new MySQLInstallPluginStatement(), new MySQLKillStatement(),
- new MySQLLoadIndexInfoStatement(), new MySQLOptimizeTableStatement(), new MySQLRenameTableStatement(), new MySQLRepairTableStatement(),
- new MySQLResetStatement(), new MySQLRevokeStatement(), new MySQLSelectStatement(), new MySQLSetStatement(), new MySQLShowWarningsStatement(),
- new MySQLShowErrorsStatement(), new MySQLShowBinlogEventsStatement(), new MySQLShowCreateProcedureStatement(), new MySQLShowCreateFunctionStatement(), new MySQLShowCreateEventStatement(),
- new MySQLShowCreateTableStatement(), new MySQLShowCreateViewStatement(), new MySQLShowBinaryLogsStatement(), new MySQLShowStatusStatement(), new MySQLStartSlaveStatement(),
- new MySQLStopSlaveStatement(), new MySQLTruncateStatement(), new MySQLUninstallPluginStatement(), new MySQLUpdateStatement(), new MySQLXAStatement());
+ new MySQLAlterTableStatement(), new MySQLAlterUserStatement(), new MySQLAnalyzeTableStatement(), new MySQLCacheIndexStatement(),
+ new MySQLCallStatement(), new MySQLChangeMasterStatement(), new MySQLChecksumTableStatement(), new MySQLCommitStatement(), new MySQLCreateIndexStatement(),
+ new MySQLDropIndexStatement(), new MySQLCreateDatabaseStatement(), new MySQLDropDatabaseStatement(), new MySQLCreateTableStatement(),
+ new MySQLDropTableStatement(), new MySQLCreateUserStatement(), new MySQLRenameUserStatement(), new MySQLDropUserStatement(),
+ new MySQLCreateViewStatement(), new MySQLDropViewStatement(), new MySQLDeleteStatement(), new MySQLDoStatement(), new MySQLFlushStatement(),
+ new MySQLGrantStatement(), new MySQLInsertStatement(), new MySQLInstallPluginStatement(), new MySQLKillStatement(),
+ new MySQLLoadIndexInfoStatement(), new MySQLOptimizeTableStatement(), new MySQLRenameTableStatement(), new MySQLRepairTableStatement(),
+ new MySQLResetStatement(), new MySQLRevokeStatement(), new MySQLSelectStatement(), new MySQLSetStatement(), new MySQLShowWarningsStatement(),
+ new MySQLShowErrorsStatement(), new MySQLShowBinlogEventsStatement(), new MySQLShowCreateProcedureStatement(), new MySQLShowCreateFunctionStatement(),
+ new MySQLShowCreateEventStatement(),
+ new MySQLShowCreateTableStatement(), new MySQLShowCreateViewStatement(), new MySQLShowBinaryLogsStatement(), new MySQLShowStatusStatement(), new MySQLStartSlaveStatement(),
+ new MySQLStopSlaveStatement(), new MySQLTruncateStatement(), new MySQLUninstallPluginStatement(), new MySQLUpdateStatement(), new MySQLXAStatement());
for (SQLStatement each : sqlStatements) {
assertTrue(MySQLComStmtPrepareChecker.isStatementAllowed(each));
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/test/java/org/apache/shardingsphere/proxy/frontend/opengauss/command/query/extended/bind/OpenGaussComBatchBindExecutorTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/test/java/org/apache/shardingsphere/proxy/frontend/opengauss/command/query/extended/bind/OpenGaussComBatchBindExecutorTest.java
index 9f1caa56ef6..5c014ebda2e 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/test/java/org/apache/shardingsphere/proxy/frontend/opengauss/command/query/extended/bind/OpenGaussComBatchBindExecutorTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-opengauss/src/test/java/org/apache/shardingsphere/proxy/frontend/opengauss/command/query/extended/bind/OpenGaussComBatchBindExecutorTest.java
@@ -59,7 +59,7 @@ import static org.mockito.Mockito.when;
public final class OpenGaussComBatchBindExecutorTest {
- private static final ShardingSphereSQLParserEngine SQL_PARSER_ENGINE = new ShardingSphereSQLParserEngine("openGauss",
+ private static final ShardingSphereSQLParserEngine SQL_PARSER_ENGINE = new ShardingSphereSQLParserEngine("openGauss",
new ParserConfiguration(new CacheOption(2000, 65535L, 4), new CacheOption(128, 1024L, 4), false));
private ContextManager contextManagerBefore;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/PostgreSQLAuthenticationHandler.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/PostgreSQLAuthenticationHandler.java
index 04ad2e38d30..68ecf464a10 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/PostgreSQLAuthenticationHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/PostgreSQLAuthenticationHandler.java
@@ -55,7 +55,7 @@ public final class PostgreSQLAuthenticationHandler {
return new PostgreSQLLoginResult(PostgreSQLErrorCode.INVALID_AUTHORIZATION_SPECIFICATION, String.format("unknown username: %s", username));
}
PostgreSQLAuthenticator authenticator = getAuthenticator(username, grantee.getHostname());
- if (!SQLCheckEngine.check(grantee, (a, b) -> authenticator.authenticate((ShardingSphereUser) a, (Object[]) b), new Object[] {digest, md5Salt}, getRules(databaseName))) {
+ if (!SQLCheckEngine.check(grantee, (a, b) -> authenticator.authenticate((ShardingSphereUser) a, (Object[]) b), new Object[]{digest, md5Salt}, getRules(databaseName))) {
return new PostgreSQLLoginResult(PostgreSQLErrorCode.INVALID_PASSWORD, String.format("password authentication failed for user \"%s\"", username));
}
return null == databaseName || SQLCheckEngine.check(databaseName, getRules(databaseName), grantee)
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLBatchedStatementsExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLBatchedStatementsExecutor.java
index 893d1276c63..68d871e25e0 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLBatchedStatementsExecutor.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLBatchedStatementsExecutor.java
@@ -184,11 +184,11 @@ public final class PostgreSQLBatchedStatementsExecutor {
}
private static class BatchedStatementsJDBCExecutorCallback extends JDBCExecutorCallback<int[]> {
-
+
BatchedStatementsJDBCExecutorCallback(final DatabaseType databaseType, final SQLStatement sqlStatement, final boolean isExceptionThrown) {
super(databaseType, sqlStatement, isExceptionThrown);
}
-
+
@Override
protected int[] executeSQL(final String sql, final Statement statement, final ConnectionMode connectionMode) throws SQLException {
try {
@@ -197,7 +197,7 @@ public final class PostgreSQLBatchedStatementsExecutor {
statement.close();
}
}
-
+
@SuppressWarnings("OptionalContainsCollection")
@Override
protected Optional<int[]> getSaneResult(final SQLStatement sqlStatement) {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/PostgreSQLAuthenticationHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/PostgreSQLAuthenticationHandlerTest.java
index ff7c4dfec41..9c242a9a712 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/PostgreSQLAuthenticationHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/PostgreSQLAuthenticationHandlerTest.java
@@ -143,7 +143,7 @@ public final class PostgreSQLAuthenticationHandlerTest {
}
private MetaDataContexts getMetaDataContexts(final ShardingSphereUser user) {
- return new MetaDataContexts(mock(MetaDataPersistService.class), getMetaDataMap(),
+ return new MetaDataContexts(mock(MetaDataPersistService.class), getMetaDataMap(),
buildGlobalRuleMetaData(user), mock(ExecutorEngine.class), mock(OptimizerContext.class), new ConfigurationProperties(new Properties()));
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/authenticator/PostgreSQLMD5PasswordAuthenticatorTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/authenticator/PostgreSQLMD5PasswordAuthenticatorTest.java
index 98e53c9b6da..f937674ce5a 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/authenticator/PostgreSQLMD5PasswordAuthenticatorTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/authenticator/PostgreSQLMD5PasswordAuthenticatorTest.java
@@ -48,8 +48,8 @@ public final class PostgreSQLMD5PasswordAuthenticatorTest {
ShardingSphereUser user = new ShardingSphereUser(username, password, "");
byte[] md5Salt = PostgreSQLRandomGenerator.getInstance().generateRandomBytes(4);
String md5Digest = md5Encode(username, password, md5Salt);
- assertTrue(authenticator.authenticate(user, new Object[] {md5Digest, md5Salt}));
- assertFalse(authenticator.authenticate(user, new Object[] {"wrong", md5Salt}));
+ assertTrue(authenticator.authenticate(user, new Object[]{md5Digest, md5Salt}));
+ assertFalse(authenticator.authenticate(user, new Object[]{"wrong", md5Salt}));
}
@SneakyThrows(ReflectiveOperationException.class)
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/authenticator/PostgreSQLPasswordAuthenticatorTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/authenticator/PostgreSQLPasswordAuthenticatorTest.java
index 7a5116381fa..4233563ef37 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/authenticator/PostgreSQLPasswordAuthenticatorTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/authenticator/PostgreSQLPasswordAuthenticatorTest.java
@@ -42,7 +42,7 @@ public final class PostgreSQLPasswordAuthenticatorTest {
@Test
public void assertAuthenticate() {
ShardingSphereUser user = new ShardingSphereUser(username, password, "");
- assertTrue(authenticator.authenticate(user, new Object[] {password, null}));
- assertFalse(authenticator.authenticate(user, new Object[] {"wrong", null}));
+ assertTrue(authenticator.authenticate(user, new Object[]{password, null}));
+ assertFalse(authenticator.authenticate(user, new Object[]{"wrong", null}));
}
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLAggregatedBatchedStatementsCommandExecutorTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLAggregatedBatchedStatementsCommandExecutorTest.java
index 11b84f8b477..6ab115cea57 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLAggregatedBatchedStatementsCommandExecutorTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLAggregatedBatchedStatementsCommandExecutorTest.java
@@ -62,7 +62,7 @@ import static org.mockito.Mockito.when;
public final class PostgreSQLAggregatedBatchedStatementsCommandExecutorTest {
- private static final ShardingSphereSQLParserEngine SQL_PARSER_ENGINE = new ShardingSphereSQLParserEngine("PostgreSQL",
+ private static final ShardingSphereSQLParserEngine SQL_PARSER_ENGINE = new ShardingSphereSQLParserEngine("PostgreSQL",
new ParserConfiguration(new CacheOption(2000, 65535L, 4), new CacheOption(128, 1024L, 4), false));
private static final int CONNECTION_ID = 1;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutorTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutorTest.java
index 9777b0d138f..20e7440d766 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutorTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutorTest.java
@@ -82,7 +82,7 @@ public final class PostgreSQLComDescribeExecutorTest {
private static final String TABLE_NAME = "t_order";
- private static final ShardingSphereSQLParserEngine SQL_PARSER_ENGINE = new ShardingSphereSQLParserEngine("PostgreSQL",
+ private static final ShardingSphereSQLParserEngine SQL_PARSER_ENGINE = new ShardingSphereSQLParserEngine("PostgreSQL",
new ParserConfiguration(new CacheOption(2000, 65535L, 4), new CacheOption(128, 1024L, 4), false));
private ContextManager contextManagerBefore;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-reactive-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/reactive/mysql/command/ReactiveMySQLFrontendEngine.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-reactive-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/reactive/mysql/command/ReactiveMySQLFrontendEngine.java
index bd5481a2098..51a40288e33 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-reactive-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/reactive/mysql/command/ReactiveMySQLFrontendEngine.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-reactive-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/reactive/mysql/command/ReactiveMySQLFrontendEngine.java
@@ -34,8 +34,8 @@ public final class ReactiveMySQLFrontendEngine implements ReactiveDatabaseProtoc
private final MySQLFrontendEngine delegated = new MySQLFrontendEngine();
- private final ReactiveCommandExecuteEngine reactiveCommandExecuteEngine =
- (type, packet, connectionSession) -> ReactiveMySQLCommandExecutorFactory.newInstance((MySQLCommandPacketType) type, packet, connectionSession);
+ private final ReactiveCommandExecuteEngine reactiveCommandExecuteEngine = (type, packet, connectionSession) -> ReactiveMySQLCommandExecutorFactory.newInstance((MySQLCommandPacketType) type,
+ packet, connectionSession);
@Override
public FrontendContext getFrontendContext() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-spi/src/main/java/org/apache/shardingsphere/proxy/frontend/authentication/Authenticator.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-spi/src/main/java/org/apache/shardingsphere/proxy/frontend/authentication/Authenticator.java
index 6f47e050955..4e48f894a40 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-spi/src/main/java/org/apache/shardingsphere/proxy/frontend/authentication/Authenticator.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-spi/src/main/java/org/apache/shardingsphere/proxy/frontend/authentication/Authenticator.java
@@ -21,7 +21,7 @@ package org.apache.shardingsphere.proxy.frontend.authentication;
* Authenticator.
*/
public interface Authenticator {
-
+
/**
* Get the name of authentication method.
*
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/MySQLSQLStatVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/MySQLSQLStatVisitor.java
index 7ec8ae11734..342ac0066ed 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/MySQLSQLStatVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/MySQLSQLStatVisitor.java
@@ -104,7 +104,7 @@ public final class MySQLSQLStatVisitor extends MySQLStatementBaseVisitor<SQLStat
}
private SimpleTableSegment getTableName(final TableNameContext ctx) {
- SimpleTableSegment result = new SimpleTableSegment(new TableNameSegment(ctx.name().getStart().getStartIndex(),
+ SimpleTableSegment result = new SimpleTableSegment(new TableNameSegment(ctx.name().getStart().getStartIndex(),
ctx.name().getStop().getStopIndex(), new IdentifierValue(ctx.name().identifier().getText())));
OwnerContext owner = ctx.owner();
if (null != owner) {
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/format/impl/MySQLFormatSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/format/impl/MySQLFormatSQLVisitor.java
index f28e09347c6..129b86e8c21 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/format/impl/MySQLFormatSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/format/impl/MySQLFormatSQLVisitor.java
@@ -709,14 +709,14 @@ public abstract class MySQLFormatSQLVisitor extends MySQLStatementBaseVisitor<St
formatPrint(")");
return result.toString();
}
-
+
@Override
public String visitUserVariable(final UserVariableContext ctx) {
formatPrint("@");
visit(ctx.textOrIdentifier());
return result.toString();
}
-
+
@Override
public String visitSystemVariable(final SystemVariableContext ctx) {
formatPrint("@@");
@@ -734,7 +734,7 @@ public abstract class MySQLFormatSQLVisitor extends MySQLStatementBaseVisitor<St
}
return result.toString();
}
-
+
@Override
public String visitTerminal(final TerminalNode node) {
if ("<EOF>".equals(node.getText())) {
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDALStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDALStatementSQLVisitor.java
index 1540873b291..574faa649f3 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDALStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDALStatementSQLVisitor.java
@@ -279,7 +279,7 @@ public final class MySQLDALStatementSQLVisitor extends MySQLStatementSQLVisitor
MySQLShowEngineStatement result = new MySQLShowEngineStatement();
result.setEngineName(ctx.engineRef().getText());
return result;
- }
+ }
@Override
public ASTNode visitShowCharset(final ShowCharsetContext ctx) {
@@ -351,7 +351,7 @@ public final class MySQLDALStatementSQLVisitor extends MySQLStatementSQLVisitor
}
return result;
}
-
+
@Override
public ASTNode visitResetPersist(final ResetPersistContext ctx) {
MySQLResetPersistStatement result = new MySQLResetPersistStatement();
@@ -363,7 +363,7 @@ public final class MySQLDALStatementSQLVisitor extends MySQLStatementSQLVisitor
}
return result;
}
-
+
@Override
public ASTNode visitResetOption(final ResetOptionContext ctx) {
if (null != ctx.MASTER()) {
@@ -386,17 +386,17 @@ public final class MySQLDALStatementSQLVisitor extends MySQLStatementSQLVisitor
result.setStopIndex(ctx.stop.getStopIndex());
return result;
}
-
+
@Override
public ASTNode visitChannelOption(final ChannelOptionContext ctx) {
return visit(ctx.string_());
}
-
+
@Override
public ASTNode visitBinaryLogFileIndexNumber(final BinaryLogFileIndexNumberContext ctx) {
return new NumberLiteralValue(ctx.getText());
}
-
+
@Override
public ASTNode visitShowReplicas(final ShowReplicasContext ctx) {
return new MySQLShowReplicasStatement();
@@ -596,7 +596,7 @@ public final class MySQLDALStatementSQLVisitor extends MySQLStatementSQLVisitor
return visit(ctx.update());
}
}
-
+
@Override
public ASTNode visitShowProcedureCode(final ShowProcedureCodeContext ctx) {
MySQLShowProcedureCodeStatement result = new MySQLShowProcedureCodeStatement();
@@ -656,7 +656,7 @@ public final class MySQLDALStatementSQLVisitor extends MySQLStatementSQLVisitor
result.getParameterMarkerSegments().addAll(getParameterMarkerSegments());
return result;
}
-
+
@Override
public ASTNode visitShowTriggers(final ShowTriggersContext ctx) {
MySQLShowTriggersStatement result = new MySQLShowTriggersStatement();
@@ -670,7 +670,7 @@ public final class MySQLDALStatementSQLVisitor extends MySQLStatementSQLVisitor
result.getParameterMarkerSegments().addAll(getParameterMarkerSegments());
return result;
}
-
+
@Override
public ASTNode visitShowWhereClause(final ShowWhereClauseContext ctx) {
return new WhereSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), (ExpressionSegment) visit(ctx.expr()));
@@ -902,7 +902,7 @@ public final class MySQLDALStatementSQLVisitor extends MySQLStatementSQLVisitor
public ASTNode visitShutdown(final ShutdownContext ctx) {
return new MySQLShutdownStatement();
}
-
+
@Override
public ASTNode visitShowProcesslist(final ShowProcesslistContext ctx) {
return new MySQLShowProcessListStatement();
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDCLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDCLStatementSQLVisitor.java
index 780730cf2e8..57ba6b9ecd6 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDCLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDCLStatementSQLVisitor.java
@@ -192,7 +192,7 @@ public final class MySQLDCLStatementSQLVisitor extends MySQLStatementSQLVisitor
private GrantLevelSegment generateGrantLevel(final GrantIdentifierContext ctx) {
if (ctx instanceof GrantLevelGlobalContext) {
return new GrantLevelSegment(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), "*", "*");
-
+
} else if (ctx instanceof GrantLevelSchemaGlobalContext) {
String schemaName = new IdentifierValue(((GrantLevelSchemaGlobalContext) ctx).schemaName().getText()).getValue();
return new GrantLevelSegment(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), schemaName, "*");
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLRLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLRLStatementSQLVisitor.java
index 1fae7bd0406..89cad44cc93 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLRLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLRLStatementSQLVisitor.java
@@ -40,7 +40,8 @@ public final class MySQLRLStatementSQLVisitor extends MySQLStatementSQLVisitor i
super(props);
}
- @Override public ASTNode visitChangeMasterTo(final ChangeMasterToContext ctx) {
+ @Override
+ public ASTNode visitChangeMasterTo(final ChangeMasterToContext ctx) {
return new MySQLChangeMasterStatement();
}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLStatementSQLVisitor.java
index de2a32004fc..a4883151745 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLStatementSQLVisitor.java
@@ -221,7 +221,7 @@ import java.util.stream.Collectors;
@NoArgsConstructor
@Getter(AccessLevel.PROTECTED)
public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor<ASTNode> {
-
+
private int currentParameterIndex;
private final Collection<ParameterMarkerSegment> parameterMarkerSegments = new LinkedList<>();
@@ -274,13 +274,13 @@ public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor
public final ASTNode visitNumberLiterals(final NumberLiteralsContext ctx) {
return new NumberLiteralValue(ctx.getText());
}
-
+
@Override
public ASTNode visitTemporalLiterals(final TemporalLiteralsContext ctx) {
// TODO deal with TemporalLiterals
return new OtherLiteralValue(ctx.getText());
}
-
+
@Override
public final ASTNode visitHexadecimalLiterals(final HexadecimalLiteralsContext ctx) {
// TODO deal with hexadecimalLiterals
@@ -316,7 +316,7 @@ public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor
@Override
public final ASTNode visitTableName(final TableNameContext ctx) {
- SimpleTableSegment result = new SimpleTableSegment(new TableNameSegment(ctx.name().getStart().getStartIndex(),
+ SimpleTableSegment result = new SimpleTableSegment(new TableNameSegment(ctx.name().getStart().getStartIndex(),
ctx.name().getStop().getStopIndex(), new IdentifierValue(ctx.name().identifier().getText())));
OwnerContext owner = ctx.owner();
if (null != owner) {
@@ -327,7 +327,7 @@ public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor
@Override
public final ASTNode visitViewName(final ViewNameContext ctx) {
- SimpleTableSegment result = new SimpleTableSegment(new TableNameSegment(ctx.identifier().getStart().getStartIndex(),
+ SimpleTableSegment result = new SimpleTableSegment(new TableNameSegment(ctx.identifier().getStart().getStartIndex(),
ctx.identifier().getStop().getStopIndex(), new IdentifierValue(ctx.identifier().getText())));
OwnerContext owner = ctx.owner();
if (null != owner) {
@@ -368,7 +368,7 @@ public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor
}
return result;
}
-
+
@Override
public final ASTNode visitViewNames(final ViewNamesContext ctx) {
CollectionValue<SimpleTableSegment> result = new CollectionValue<>();
@@ -747,7 +747,8 @@ public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor
public final ASTNode visitAggregationFunction(final AggregationFunctionContext ctx) {
String aggregationType = ctx.aggregationFunctionName().getText();
return AggregationType.isAggregationType(aggregationType)
- ? createAggregationSegment(ctx, aggregationType) : new ExpressionProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), getOriginalText(ctx));
+ ? createAggregationSegment(ctx, aggregationType)
+ : new ExpressionProjectionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), getOriginalText(ctx));
}
private ASTNode createAggregationSegment(final AggregationFunctionContext ctx, final String aggregationType) {
@@ -885,7 +886,7 @@ public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor
ColumnSegment columnSegment = (ColumnSegment) visit(ctx.columnRefList().columnRef(0));
result.getParameters().add(columnSegment);
}
- return result;
+ return result;
}
@Override
@@ -1017,7 +1018,7 @@ public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor
if (expr instanceof ColumnSegment) {
return new ColumnOrderByItemSegment((ColumnSegment) expr, orderDirection);
} else {
- return new ExpressionOrderByItemSegment(ctx.expr().getStart().getStartIndex(),
+ return new ExpressionOrderByItemSegment(ctx.expr().getStart().getStartIndex(),
ctx.expr().getStop().getStopIndex(), getOriginalText(ctx.expr()), orderDirection, (ExpressionSegment) expr);
}
}
@@ -1437,7 +1438,8 @@ public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor
return projection;
}
LiteralExpressionSegment column = (LiteralExpressionSegment) projection;
- ExpressionProjectionSegment result = null == alias ? new ExpressionProjectionSegment(column.getStartIndex(), column.getStopIndex(), String.valueOf(column.getLiterals()), column)
+ ExpressionProjectionSegment result = null == alias
+ ? new ExpressionProjectionSegment(column.getStartIndex(), column.getStopIndex(), String.valueOf(column.getLiterals()), column)
: new ExpressionProjectionSegment(column.getStartIndex(), ctx.alias().stop.getStopIndex(), String.valueOf(column.getLiterals()), column);
result.setAlias(alias);
return result;
@@ -1526,7 +1528,7 @@ public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor
}
return result;
}
-
+
private String getJoinType(final JoinedTableContext ctx) {
String joinType = null;
if (null != ctx.innerJoinType()) {
@@ -1544,7 +1546,7 @@ public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor
}
return joinType;
}
-
+
private JoinTableSegment visitJoinSpecification(final JoinSpecificationContext ctx, final JoinTableSegment joinTableSource) {
if (null != ctx.expr()) {
ExpressionSegment condition = (ExpressionSegment) visit(ctx.expr());
@@ -1597,7 +1599,7 @@ public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor
if (null != ctx.numberLiterals()) {
return new NumberLiteralLimitValueSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), ((NumberLiteralValue) visit(ctx.numberLiterals())).getValue().longValue());
}
- ParameterMarkerSegment result = new ParameterMarkerLimitValueSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(),
+ ParameterMarkerSegment result = new ParameterMarkerLimitValueSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(),
((ParameterMarkerValue) visit(ctx.parameterMarker())).getValue());
parameterMarkerSegments.add(result);
return result;
@@ -1613,7 +1615,7 @@ public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor
if (null != ctx.numberLiterals()) {
return new NumberLiteralLimitValueSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), ((NumberLiteralValue) visit(ctx.numberLiterals())).getValue().longValue());
}
- ParameterMarkerSegment result = new ParameterMarkerLimitValueSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(),
+ ParameterMarkerSegment result = new ParameterMarkerLimitValueSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(),
((ParameterMarkerValue) visit(ctx.parameterMarker())).getValue());
parameterMarkerSegments.add(result);
return result;
@@ -1624,7 +1626,7 @@ public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor
if (null != ctx.collationName()) {
return new LiteralExpressionSegment(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), ctx.collationName().textOrIdentifier().getText());
}
- ParameterMarkerExpressionSegment segment = new ParameterMarkerExpressionSegment(ctx.start.getStartIndex(), ctx.stop.getStopIndex(),
+ ParameterMarkerExpressionSegment segment = new ParameterMarkerExpressionSegment(ctx.start.getStartIndex(), ctx.stop.getStopIndex(),
((ParameterMarkerValue) visit(ctx.parameterMarker())).getValue());
parameterMarkerSegments.add(segment);
return segment;
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLTCLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLTCLStatementSQLVisitor.java
index 3098380ac75..abbf038fd9c 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLTCLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLTCLStatementSQLVisitor.java
@@ -107,7 +107,7 @@ public final class MySQLTCLStatementSQLVisitor extends MySQLStatementSQLVisitor
result.setAutoCommit(generateAutoCommitSegment(ctx.autoCommitValue).isAutoCommit());
return result;
}
-
+
private AutoCommitSegment generateAutoCommitSegment(final Token ctx) {
boolean autoCommit = "1".equals(ctx.getText()) || "ON".equals(ctx.getText());
return new AutoCommitSegment(ctx.getStartIndex(), ctx.getStopIndex(), autoCommit);
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussDALStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussDALStatementSQLVisitor.java
index ce5aab7f884..f512d04803a 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussDALStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussDALStatementSQLVisitor.java
@@ -155,7 +155,7 @@ public final class OpenGaussDALStatementSQLVisitor extends OpenGaussStatementSQL
} else if (null != ctx.delete()) {
return visit(ctx.delete());
} else if (null != ctx.declare()) {
- // TODO visit declare statement
+ // TODO visit declare statement
return visit(ctx.declare());
} else if (null != ctx.executeStmt()) {
return visit(ctx.executeStmt());
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussDDLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussDDLStatementSQLVisitor.java
index 5c59e444dc9..f1e4e1aba92 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussDDLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussDDLStatementSQLVisitor.java
@@ -605,21 +605,21 @@ public final class OpenGaussDDLStatementSQLVisitor extends OpenGaussStatementSQL
result.setDatabaseName(((IdentifierValue) visit(ctx.name())).getValue());
return result;
}
-
+
@Override
public ASTNode visitCreateSequence(final CreateSequenceContext ctx) {
OpenGaussCreateSequenceStatement result = new OpenGaussCreateSequenceStatement();
result.setSequenceName(((SimpleTableSegment) visit(ctx.qualifiedName())).getTableName().getIdentifier().getValue());
return result;
}
-
+
@Override
public ASTNode visitAlterSequence(final AlterSequenceContext ctx) {
OpenGaussAlterSequenceStatement result = new OpenGaussAlterSequenceStatement();
result.setSequenceName(((SimpleTableSegment) visit(ctx.qualifiedName())).getTableName().getIdentifier().getValue());
return result;
}
-
+
@Override
public ASTNode visitDropSequence(final DropSequenceContext ctx) {
OpenGaussDropSequenceStatement result = new OpenGaussDropSequenceStatement();
@@ -631,7 +631,7 @@ public final class OpenGaussDDLStatementSQLVisitor extends OpenGaussStatementSQL
public ASTNode visitPrepare(final PrepareContext ctx) {
OpenGaussPrepareStatement result = new OpenGaussPrepareStatement();
if (null != ctx.preparableStmt().select()) {
- result.setSelect((SelectStatement) visit(ctx.preparableStmt().select()));
+ result.setSelect((SelectStatement) visit(ctx.preparableStmt().select()));
}
if (null != ctx.preparableStmt().insert()) {
result.setInsert((InsertStatement) visit(ctx.preparableStmt().insert()));
@@ -649,7 +649,7 @@ public final class OpenGaussDDLStatementSQLVisitor extends OpenGaussStatementSQL
public ASTNode visitDeallocate(final DeallocateContext ctx) {
return new OpenGaussDeallocateStatement();
}
-
+
@Override
public ASTNode visitCreateTablespace(final CreateTablespaceContext ctx) {
return new OpenGaussCreateTablespaceStatement();
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussStatementSQLVisitor.java
index 0b03ecfeab4..0686519a34c 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussStatementSQLVisitor.java
@@ -304,7 +304,7 @@ public abstract class OpenGaussStatementSQLVisitor extends OpenGaussStatementBas
String text = ctx.start.getInputStream().getText(new Interval(ctx.start.getStartIndex(), ctx.stop.getStopIndex()));
return new CommonExpressionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), text);
}
-
+
private BinaryOperationExpression createPatternMatchingOperationSegment(final AExprContext ctx) {
String operator = ctx.patternMatchingOperator().getText();
ExpressionSegment left = (ExpressionSegment) visit(ctx.aExpr(0));
@@ -356,7 +356,7 @@ public abstract class OpenGaussStatementSQLVisitor extends OpenGaussStatementBas
}
private ExpressionSegment createSubqueryExpressionSegment(final CExprContext ctx) {
- SubquerySegment subquerySegment = new SubquerySegment(ctx.selectWithParens().getStart().getStartIndex(),
+ SubquerySegment subquerySegment = new SubquerySegment(ctx.selectWithParens().getStart().getStartIndex(),
ctx.selectWithParens().getStop().getStopIndex(), (OpenGaussSelectStatement) visit(ctx.selectWithParens()));
if (null != ctx.EXISTS()) {
return new ExistsSubqueryExpression(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), subquerySegment);
@@ -554,7 +554,7 @@ public abstract class OpenGaussStatementSQLVisitor extends OpenGaussStatementBas
return new IndexOrderByItemSegment(index.getStartIndex(), index.getStopIndex(), Integer.parseInt(index.getLiterals().toString()), orderDirection);
}
if (expr instanceof ExpressionSegment) {
- return new ExpressionOrderByItemSegment(ctx.aExpr().getStart().getStartIndex(),
+ return new ExpressionOrderByItemSegment(ctx.aExpr().getStart().getStartIndex(),
ctx.aExpr().getStop().getStopIndex(), getOriginalText(ctx.aExpr()), orderDirection, (ExpressionSegment) expr);
}
return new ExpressionOrderByItemSegment(ctx.aExpr().getStart().getStartIndex(), ctx.aExpr().getStop().getStopIndex(), getOriginalText(ctx.aExpr()), orderDirection);
@@ -1056,7 +1056,7 @@ public abstract class OpenGaussStatementSQLVisitor extends OpenGaussStatementBas
result.setAlias(alias);
return result;
}
- // TODO deal with functionTable and xmlTable
+ // TODO deal with functionTable and xmlTable
TableNameSegment tableName = new TableNameSegment(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), new IdentifierValue("not support"));
return new SimpleTableSegment(tableName);
}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDCLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDCLStatementSQLVisitor.java
index bfde2e726fe..d4ec2f992a1 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDCLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDCLStatementSQLVisitor.java
@@ -111,7 +111,7 @@ public final class OracleDCLStatementSQLVisitor extends OracleStatementSQLVisito
public ASTNode visitDropRole(final DropRoleContext ctx) {
return new OracleDropRoleStatement();
}
-
+
@Override
public ASTNode visitSetRole(final SetRoleContext ctx) {
return new OracleSetRoleStatement();
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDDLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDDLStatementSQLVisitor.java
index b762d1cbec4..946da60e43a 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDDLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDDLStatementSQLVisitor.java
@@ -309,7 +309,7 @@ public final class OracleDDLStatementSQLVisitor extends OracleStatementSQLVisito
for (ColumnOrVirtualDefinitionContext each : ctx.columnOrVirtualDefinitions().columnOrVirtualDefinition()) {
if (null != each.columnDefinition()) {
AddColumnDefinitionSegment addColumnDefinition = new AddColumnDefinitionSegment(
- each.columnDefinition().getStart().getStartIndex(), each.columnDefinition().getStop().getStopIndex(),
+ each.columnDefinition().getStart().getStartIndex(), each.columnDefinition().getStop().getStopIndex(),
Collections.singletonList((ColumnDefinitionSegment) visit(each.columnDefinition())));
result.getValue().add(addColumnDefinition);
}
@@ -319,7 +319,7 @@ public final class OracleDDLStatementSQLVisitor extends OracleStatementSQLVisito
@Override
public ASTNode visitModifyColumnSpecification(final ModifyColumnSpecificationContext ctx) {
- // TODO handle no columnDefinition and multiple columnDefinitions
+ // TODO handle no columnDefinition and multiple columnDefinitions
ColumnDefinitionSegment columnDefinition = null;
for (ModifyColPropertiesContext each : ctx.modifyColProperties()) {
columnDefinition = (ColumnDefinitionSegment) visit(each);
@@ -383,22 +383,22 @@ public final class OracleDDLStatementSQLVisitor extends OracleStatementSQLVisito
public ASTNode visitDropDatabaseLink(final DropDatabaseLinkContext ctx) {
return new OracleDropDatabaseLinkStatement();
}
-
+
@Override
public ASTNode visitAlterView(final AlterViewContext ctx) {
return new OracleAlterViewStatement();
}
-
+
@Override
public ASTNode visitDropView(final DropViewContext ctx) {
return new OracleDropViewStatement();
}
-
+
@Override
public ASTNode visitDropTrigger(final DropTriggerContext ctx) {
return new OracleDropTriggerStatement();
}
-
+
@Override
public ASTNode visitAlterTrigger(final AlterTriggerContext ctx) {
return new OracleAlterTriggerStatement();
@@ -434,7 +434,7 @@ public final class OracleDDLStatementSQLVisitor extends OracleStatementSQLVisito
result.getIndexes().add((IndexSegment) visit(ctx.indexName()));
return result;
}
-
+
@Override
public ASTNode visitAlterSynonym(final AlterSynonymContext ctx) {
return new OracleAlterSynonymStatement();
@@ -454,7 +454,7 @@ public final class OracleDDLStatementSQLVisitor extends OracleStatementSQLVisito
public ASTNode visitAlterSystem(final AlterSystemContext ctx) {
return new OracleAlterSystemStatement();
}
-
+
@Override
public ASTNode visitAnalyze(final AnalyzeContext ctx) {
OracleAnalyzeStatement result = new OracleAnalyzeStatement();
@@ -466,38 +466,38 @@ public final class OracleDDLStatementSQLVisitor extends OracleStatementSQLVisito
}
return result;
}
-
+
@Override
public ASTNode visitAssociateStatistics(final AssociateStatisticsContext ctx) {
OracleAssociateStatisticsStatement result = new OracleAssociateStatisticsStatement();
if (null != ctx.columnAssociation()) {
- for (TableNameContext each: ctx.columnAssociation().tableName()) {
+ for (TableNameContext each : ctx.columnAssociation().tableName()) {
result.getTables().add((SimpleTableSegment) visit(each));
}
- for (ColumnNameContext each: ctx.columnAssociation().columnName()) {
+ for (ColumnNameContext each : ctx.columnAssociation().columnName()) {
result.getColumns().add((ColumnSegment) visit(each));
}
}
if (null != ctx.functionAssociation()) {
- for (IndexNameContext each: ctx.functionAssociation().indexName()) {
+ for (IndexNameContext each : ctx.functionAssociation().indexName()) {
result.getIndexes().add((IndexSegment) visit(each));
}
- for (FunctionContext each: ctx.functionAssociation().function()) {
+ for (FunctionContext each : ctx.functionAssociation().function()) {
result.getFunctions().add((FunctionSegment) visit(each));
}
- for (PackageNameContext each: ctx.functionAssociation().packageName()) {
+ for (PackageNameContext each : ctx.functionAssociation().packageName()) {
result.getPackages().add((PackageSegment) visit(each));
}
- for (TypeNameContext each: ctx.functionAssociation().typeName()) {
+ for (TypeNameContext each : ctx.functionAssociation().typeName()) {
result.getTypes().add((TypeSegment) visit(each));
}
- for (IndextypeNameContext each: ctx.functionAssociation().indextypeName()) {
+ for (IndextypeNameContext each : ctx.functionAssociation().indextypeName()) {
result.getIndextypes().add((IndextypeSegment) visit(each));
}
}
return result;
}
-
+
@Override
public ASTNode visitDisassociateStatistics(final DisassociateStatisticsContext ctx) {
OracleDisassociateStatisticsStatement result = new OracleDisassociateStatisticsStatement();
@@ -505,38 +505,38 @@ public final class OracleDDLStatementSQLVisitor extends OracleStatementSQLVisito
for (TableNameContext each : ctx.tableName()) {
result.getTables().add((SimpleTableSegment) visit(each));
}
- for (ColumnNameContext each: ctx.columnName()) {
+ for (ColumnNameContext each : ctx.columnName()) {
result.getColumns().add((ColumnSegment) visit(each));
}
}
if (null != ctx.indexName()) {
- for (IndexNameContext each: ctx.indexName()) {
+ for (IndexNameContext each : ctx.indexName()) {
result.getIndexes().add((IndexSegment) visit(each));
}
}
if (null != ctx.function()) {
- for (FunctionContext each: ctx.function()) {
+ for (FunctionContext each : ctx.function()) {
result.getFunctions().add((FunctionSegment) visit(each));
}
}
if (null != ctx.packageName()) {
- for (PackageNameContext each: ctx.packageName()) {
+ for (PackageNameContext each : ctx.packageName()) {
result.getPackages().add((PackageSegment) visit(each));
}
}
if (null != ctx.typeName()) {
- for (TypeNameContext each: ctx.typeName()) {
+ for (TypeNameContext each : ctx.typeName()) {
result.getTypes().add((TypeSegment) visit(each));
}
}
if (null != ctx.indextypeName()) {
- for (IndextypeNameContext each: ctx.indextypeName()) {
+ for (IndextypeNameContext each : ctx.indextypeName()) {
result.getIndextypes().add((IndextypeSegment) visit(each));
}
}
return result;
}
-
+
@Override
public ASTNode visitAudit(final AuditContext ctx) {
return new OracleAuditStatement();
@@ -546,7 +546,7 @@ public final class OracleDDLStatementSQLVisitor extends OracleStatementSQLVisito
public ASTNode visitNoAudit(final NoAuditContext ctx) {
return new OracleNoAuditStatement();
}
-
+
@Override
public ASTNode visitComment(final CommentContext ctx) {
OracleCommentStatement result = new OracleCommentStatement();
@@ -561,23 +561,23 @@ public final class OracleDDLStatementSQLVisitor extends OracleStatementSQLVisito
}
return result;
}
-
+
@Override
public ASTNode visitFlashbackDatabase(final FlashbackDatabaseContext ctx) {
return new OracleFlashbackDatabaseStatement();
}
-
+
@Override
public ASTNode visitFlashbackTable(final FlashbackTableContext ctx) {
OracleFlashbackTableStatement result = new OracleFlashbackTableStatement();
result.setTable((SimpleTableSegment) visit(ctx.tableName()));
-
+
if (null != ctx.renameToTable()) {
result.setRenameTable((SimpleTableSegment) visit(ctx.renameToTable().tableName()));
}
return result;
}
-
+
@Override
public ASTNode visitPurge(final PurgeContext ctx) {
OraclePurgeStatement result = new OraclePurgeStatement();
@@ -589,42 +589,42 @@ public final class OracleDDLStatementSQLVisitor extends OracleStatementSQLVisito
}
return result;
}
-
+
@Override
public ASTNode visitRename(final RenameContext ctx) {
return new OracleRenameStatement();
}
-
+
@Override
public ASTNode visitCreateDatabase(final CreateDatabaseContext ctx) {
return new OracleCreateDatabaseStatement();
}
-
+
@Override
public ASTNode visitCreateDatabaseLink(final CreateDatabaseLinkContext ctx) {
return new OracleCreateDatabaseLinkStatement();
}
-
+
@Override
public ASTNode visitCreateDimension(final CreateDimensionContext ctx) {
return new OracleCreateDimensionStatement();
}
-
+
@Override
public ASTNode visitAlterDimension(final AlterDimensionContext ctx) {
return new OracleAlterDimensionStatement();
}
-
+
@Override
public ASTNode visitDropDimension(final DropDimensionContext ctx) {
return new OracleDropDimensionStatement();
}
-
+
@Override
public ASTNode visitDropDirectory(final DropDirectoryContext ctx) {
return new OracleDropDirectoryStatement();
}
-
+
@Override
public ASTNode visitCreateFunction(final CreateFunctionContext ctx) {
return new OracleCreateFunctionStatement();
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDMLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDMLStatementSQLVisitor.java
index 884b07c46b5..bf88fdad338 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDMLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDMLStatementSQLVisitor.java
@@ -218,7 +218,7 @@ public final class OracleDMLStatementSQLVisitor extends OracleStatementSQLVisito
private InsertMultiTableElementSegment createInsertMultiTableElementSegment(final List<MultiTableElementContext> ctx) {
Collection<OracleInsertStatement> insertStatements = new LinkedList<>();
- for (MultiTableElementContext each: ctx) {
+ for (MultiTableElementContext each : ctx) {
insertStatements.add((OracleInsertStatement) visit(each));
}
InsertMultiTableElementSegment result = new InsertMultiTableElementSegment(ctx.get(0).getStart().getStartIndex(), ctx.get(ctx.size() - 1).getStop().getStopIndex());
@@ -276,7 +276,7 @@ public final class OracleDMLStatementSQLVisitor extends OracleStatementSQLVisito
@Override
public ASTNode visitConditionalInsertClause(final ConditionalInsertClauseContext ctx) {
Collection<OracleInsertStatement> insertStatements = new LinkedList<>();
- for (ConditionalInsertWhenPartContext each: ctx.conditionalInsertWhenPart()) {
+ for (ConditionalInsertWhenPartContext each : ctx.conditionalInsertWhenPart()) {
insertStatements.addAll(createInsertStatementsFromConditionalInsertWhen(each));
}
if (null != ctx.conditionalInsertElsePart()) {
@@ -289,7 +289,7 @@ public final class OracleDMLStatementSQLVisitor extends OracleStatementSQLVisito
private Collection<OracleInsertStatement> createInsertStatementsFromConditionalInsertWhen(final ConditionalInsertWhenPartContext ctx) {
Collection<OracleInsertStatement> result = new LinkedList<>();
- for (MultiTableElementContext each: ctx.multiTableElement()) {
+ for (MultiTableElementContext each : ctx.multiTableElement()) {
result.add((OracleInsertStatement) visit(each));
}
return result;
@@ -297,7 +297,7 @@ public final class OracleDMLStatementSQLVisitor extends OracleStatementSQLVisito
private Collection<OracleInsertStatement> createInsertStatementsFromConditionalInsertElse(final ConditionalInsertElsePartContext ctx) {
Collection<OracleInsertStatement> result = new LinkedList<>();
- for (MultiTableElementContext each: ctx.multiTableElement()) {
+ for (MultiTableElementContext each : ctx.multiTableElement()) {
result.add((OracleInsertStatement) visit(each));
}
return result;
@@ -374,8 +374,8 @@ public final class OracleDMLStatementSQLVisitor extends OracleStatementSQLVisito
AssignmentSegment result = new ColumnAssignmentSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), columnSegments, value);
return result;
} else if (null != ctx.selectSubquery()) {
- SubquerySegment subquerySegment =
- new SubquerySegment(ctx.selectSubquery().start.getStartIndex(), ctx.selectSubquery().stop.getStopIndex(), (OracleSelectStatement) visit(ctx.selectSubquery()));
+ SubquerySegment subquerySegment = new SubquerySegment(ctx.selectSubquery().start.getStartIndex(), ctx.selectSubquery().stop.getStopIndex(),
+ (OracleSelectStatement) visit(ctx.selectSubquery()));
SubqueryExpressionSegment value = new SubqueryExpressionSegment(subquerySegment);
AssignmentSegment result = new ColumnAssignmentSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), columnSegments, value);
result.getColumns().add(column);
@@ -416,7 +416,7 @@ public final class OracleDMLStatementSQLVisitor extends OracleStatementSQLVisito
SubqueryExpressionSegment value = new SubqueryExpressionSegment(subquerySegment);
AssignmentSegment result = new ColumnAssignmentSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), columnSegments, value);
result.getColumns().add(column);
- return result;
+ return result;
}
}
@@ -869,7 +869,7 @@ public final class OracleDMLStatementSQLVisitor extends OracleStatementSQLVisito
} else if (null != ctx.shardsClause()) {
result = (TableSegment) visit(ctx.shardsClause());
} else {
- result = (TableSegment) visit(ctx.queryTableExprClause());
+ result = (TableSegment) visit(ctx.queryTableExprClause());
}
if (null != ctx.alias()) {
result.setAlias((AliasSegment) visit(ctx.alias()));
@@ -963,7 +963,7 @@ public final class OracleDMLStatementSQLVisitor extends OracleStatementSQLVisito
if (null != ctx.rollupCubeClause()) {
for (RollupCubeClauseContext each : ctx.rollupCubeClause()) {
result.addAll(generateOrderByItemSegmentsFromRollupCubeClause(each));
- }
+ }
}
if (null != ctx.groupingExprList()) {
for (GroupingExprListContext each : ctx.groupingExprList()) {
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleStatementSQLVisitor.java
index cd0acfeffbb..bf4e77c3efc 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleStatementSQLVisitor.java
@@ -209,15 +209,15 @@ public abstract class OracleStatementSQLVisitor extends OracleStatementBaseVisit
public final ASTNode visitSchemaName(final SchemaNameContext ctx) {
return visit(ctx.identifier());
}
-
+
@Override
public final ASTNode visitSynonymName(final SynonymNameContext ctx) {
return visit(ctx.identifier());
}
-
+
@Override
public final ASTNode visitTableName(final TableNameContext ctx) {
- SimpleTableSegment result = new SimpleTableSegment(new TableNameSegment(ctx.name().getStart().getStartIndex(),
+ SimpleTableSegment result = new SimpleTableSegment(new TableNameSegment(ctx.name().getStart().getStartIndex(),
ctx.name().getStop().getStopIndex(), new IdentifierValue(ctx.name().identifier().getText())));
OwnerContext owner = ctx.owner();
if (null != owner) {
@@ -238,7 +238,7 @@ public abstract class OracleStatementSQLVisitor extends OracleStatementBaseVisit
@Override
public final ASTNode visitViewName(final ViewNameContext ctx) {
- SimpleTableSegment result = new SimpleTableSegment(new TableNameSegment(ctx.name().getStart().getStartIndex(),
+ SimpleTableSegment result = new SimpleTableSegment(new TableNameSegment(ctx.name().getStart().getStartIndex(),
ctx.name().getStop().getStopIndex(), new IdentifierValue(ctx.name().identifier().getText())));
OwnerContext owner = ctx.owner();
if (null != owner) {
@@ -251,7 +251,7 @@ public abstract class OracleStatementSQLVisitor extends OracleStatementBaseVisit
public final ASTNode visitIndexName(final IndexNameContext ctx) {
return new IndexSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), (IdentifierValue) visit(ctx.name()));
}
-
+
@Override
public final ASTNode visitFunction(final FunctionContext ctx) {
return new FunctionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), ((IdentifierValue) visit(ctx.name())).getValue(), ctx.getText());
@@ -421,7 +421,7 @@ public abstract class OracleStatementSQLVisitor extends OracleStatementBaseVisit
}
if (astNode instanceof ParameterMarkerValue) {
ParameterMarkerValue parameterMarker = (ParameterMarkerValue) astNode;
- ParameterMarkerExpressionSegment segment = new ParameterMarkerExpressionSegment(context.start.getStartIndex(), context.stop.getStopIndex(),
+ ParameterMarkerExpressionSegment segment = new ParameterMarkerExpressionSegment(context.start.getStartIndex(), context.stop.getStopIndex(),
parameterMarker.getValue(), parameterMarker.getType());
parameterMarkerSegments.add(segment);
return segment;
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleTCLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleTCLStatementSQLVisitor.java
index 301c40eb88b..7a2cd31efaf 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleTCLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleTCLStatementSQLVisitor.java
@@ -70,7 +70,7 @@ public final class OracleTCLStatementSQLVisitor extends OracleStatementSQLVisito
result.setSavepointName(((IdentifierValue) visit(ctx.savepointName())).getValue());
return result;
}
-
+
@Override
public ASTNode visitSetConstraints(final SetConstraintsContext ctx) {
return new OracleSetConstraintsStatement();
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDALStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDALStatementSQLVisitor.java
index 202d51c6451..a99ff75cc85 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDALStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDALStatementSQLVisitor.java
@@ -164,7 +164,7 @@ public final class PostgreSQLDALStatementSQLVisitor extends PostgreSQLStatementS
} else if (null != ctx.delete()) {
return visit(ctx.delete());
} else if (null != ctx.declare()) {
- // TODO visit declare statement
+ // TODO visit declare statement
return visit(ctx.declare());
} else if (null != ctx.executeStmt()) {
return visit(ctx.executeStmt());
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
index 6b987a0d80e..36175b03043 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
@@ -368,7 +368,7 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
public ASTNode visitAlterForeignTable(final AlterForeignTableContext ctx) {
return new PostgreSQLAlterForeignTableStatement();
}
-
+
@Override
public ASTNode visitDropForeignTable(final DropForeignTableContext ctx) {
return new PostgreSQLDropForeignTableStatement();
@@ -521,22 +521,22 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
public ASTNode visitDropPolicy(final DropPolicyContext ctx) {
return new PostgreSQLDropPolicyStatement();
}
-
+
@Override
public ASTNode visitDropRule(final DropRuleContext ctx) {
return new PostgreSQLDropRuleStatement();
}
-
+
@Override
public ASTNode visitDropStatistics(final DropStatisticsContext ctx) {
return new PostgreSQLDropStatisticsStatement();
}
-
+
@Override
public ASTNode visitDropPublication(final DropPublicationContext ctx) {
return new PostgreSQLDropPublicationStatement();
}
-
+
@Override
public ASTNode visitDropSubscription(final DropSubscriptionContext ctx) {
return new PostgreSQLDropSubscriptionStatement();
@@ -649,7 +649,7 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
public ASTNode visitDropFunction(final DropFunctionContext ctx) {
return new PostgreSQLDropFunctionStatement();
}
-
+
@Override
public ASTNode visitDropGroup(final DropGroupContext ctx) {
return new PostgreSQLDropGroupStatement();
@@ -677,7 +677,7 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
result.setView((SimpleTableSegment) visit(ctx.qualifiedName()));
if (ctx.alterViewClauses() instanceof AlterRenameViewContext) {
NameContext nameContext = ((AlterRenameViewContext) ctx.alterViewClauses()).name();
- result.setRenameView(new SimpleTableSegment(new TableNameSegment(nameContext.getStart().getStartIndex(),
+ result.setRenameView(new SimpleTableSegment(new TableNameSegment(nameContext.getStart().getStartIndex(),
nameContext.getStop().getStopIndex(), (IdentifierValue) visit(nameContext.identifier()))));
}
return result;
@@ -695,7 +695,7 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
public ASTNode visitDropProcedure(final DropProcedureContext ctx) {
return new PostgreSQLDropProcedureStatement();
}
-
+
@Override
public ASTNode visitDropRoutine(final DropRoutineContext ctx) {
return new PostgreSQLDropRoutineStatement();
@@ -707,21 +707,21 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
result.setDatabaseName(((IdentifierValue) visit(ctx.name())).getValue());
return result;
}
-
+
@Override
public ASTNode visitCreateSequence(final CreateSequenceContext ctx) {
PostgreSQLCreateSequenceStatement result = new PostgreSQLCreateSequenceStatement();
result.setSequenceName(((SimpleTableSegment) visit(ctx.qualifiedName())).getTableName().getIdentifier().getValue());
return result;
}
-
+
@Override
public ASTNode visitAlterSequence(final AlterSequenceContext ctx) {
PostgreSQLAlterSequenceStatement result = new PostgreSQLAlterSequenceStatement();
result.setSequenceName(((SimpleTableSegment) visit(ctx.qualifiedName())).getTableName().getIdentifier().getValue());
return result;
}
-
+
@Override
public ASTNode visitDropSequence(final DropSequenceContext ctx) {
PostgreSQLDropSequenceStatement result = new PostgreSQLDropSequenceStatement();
@@ -733,7 +733,7 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
public ASTNode visitPrepare(final PrepareContext ctx) {
PostgreSQLPrepareStatement result = new PostgreSQLPrepareStatement();
if (null != ctx.preparableStmt().select()) {
- result.setSelect((SelectStatement) visit(ctx.preparableStmt().select()));
+ result.setSelect((SelectStatement) visit(ctx.preparableStmt().select()));
}
if (null != ctx.preparableStmt().insert()) {
result.setInsert((InsertStatement) visit(ctx.preparableStmt().insert()));
@@ -751,12 +751,12 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
public ASTNode visitDeallocate(final DeallocateContext ctx) {
return new PostgreSQLDeallocateStatement();
}
-
+
@Override
public ASTNode visitDropCast(final DropCastContext ctx) {
return new PostgreSQLDropCastStatement();
}
-
+
@Override
public ASTNode visitCreateTablespace(final CreateTablespaceContext ctx) {
return new PostgreSQLCreateTablespaceStatement();
@@ -771,7 +771,7 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
public ASTNode visitDropTablespace(final DropTablespaceContext ctx) {
return new PostgreSQLDropTablespaceStatement();
}
-
+
@Override
public ASTNode visitDropTextSearch(final DropTextSearchContext ctx) {
return new PostgreSQLDropTextSearchStatement();
@@ -881,22 +881,22 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
public ASTNode visitDiscard(final DiscardContext ctx) {
return new PostgreSQLDiscardStatement();
}
-
+
@Override
public ASTNode visitDropOwned(final DropOwnedContext ctx) {
return new PostgreSQLDropOwnedStatement();
}
-
+
@Override
public ASTNode visitDropOperator(final DropOperatorContext ctx) {
return new PostgreSQLDropOperatorStatement();
}
-
+
@Override
public ASTNode visitDropMaterializedView(final DropMaterializedViewContext ctx) {
return new PostgreSQLDropMaterializedViewStatement();
}
-
+
@Override
public ASTNode visitDropEventTrigger(final DropEventTriggerContext ctx) {
return new PostgreSQLDropEventTriggerStatement();
@@ -906,12 +906,12 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
public ASTNode visitDropAggregate(final DropAggregateContext ctx) {
return new PostgreSQLDropAggregateStatement();
}
-
+
@Override
public ASTNode visitDropCollation(final DropCollationContext ctx) {
return new PostgreSQLDropCollationStatement();
}
-
+
@Override
public ASTNode visitDropForeignDataWrapper(final DropForeignDataWrapperContext ctx) {
return new PostgreSQLDropForeignDataWrapperStatement();
@@ -921,7 +921,7 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
public ASTNode visitDropTrigger(final DropTriggerContext ctx) {
return new PostgreSQLDropTriggerStatement();
}
-
+
@Override
public ASTNode visitDropType(final DropTypeContext ctx) {
return new PostgreSQLDropTypeStatement();
@@ -968,12 +968,12 @@ public final class PostgreSQLDDLStatementSQLVisitor extends PostgreSQLStatementS
public ASTNode visitDropOperatorClass(final DropOperatorClassContext ctx) {
return new PostgreSQLDropOperatorClassStatement();
}
-
+
@Override
public ASTNode visitDropOperatorFamily(final DropOperatorFamilyContext ctx) {
return new PostgreSQLDropOperatorFamilyStatement();
}
-
+
@Override
public ASTNode visitDropAccessMethod(final DropAccessMethodContext ctx) {
return new PostgreSQLDropAccessMethodStatement();
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLStatementSQLVisitor.java
index 6fb6cda60f3..3883258319c 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLStatementSQLVisitor.java
@@ -301,7 +301,7 @@ public abstract class PostgreSQLStatementSQLVisitor extends PostgreSQLStatementP
String text = ctx.start.getInputStream().getText(new Interval(ctx.start.getStartIndex(), ctx.stop.getStopIndex()));
return new CommonExpressionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), text);
}
-
+
private BinaryOperationExpression createPatternMatchingOperationSegment(final AExprContext ctx) {
String operator = ctx.patternMatchingOperator().getText();
ExpressionSegment left = (ExpressionSegment) visit(ctx.aExpr(0));
@@ -353,7 +353,7 @@ public abstract class PostgreSQLStatementSQLVisitor extends PostgreSQLStatementP
}
private ExpressionSegment createSubqueryExpressionSegment(final CExprContext ctx) {
- SubquerySegment subquerySegment = new SubquerySegment(ctx.selectWithParens().getStart().getStartIndex(),
+ SubquerySegment subquerySegment = new SubquerySegment(ctx.selectWithParens().getStart().getStartIndex(),
ctx.selectWithParens().getStop().getStopIndex(), (PostgreSQLSelectStatement) visit(ctx.selectWithParens()));
if (null != ctx.EXISTS()) {
return new ExistsSubqueryExpression(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), subquerySegment);
@@ -551,7 +551,7 @@ public abstract class PostgreSQLStatementSQLVisitor extends PostgreSQLStatementP
return new IndexOrderByItemSegment(index.getStartIndex(), index.getStopIndex(), Integer.parseInt(index.getLiterals().toString()), orderDirection);
}
if (expr instanceof ExpressionSegment) {
- return new ExpressionOrderByItemSegment(ctx.aExpr().getStart().getStartIndex(),
+ return new ExpressionOrderByItemSegment(ctx.aExpr().getStart().getStartIndex(),
ctx.aExpr().getStop().getStopIndex(), getOriginalText(ctx.aExpr()), orderDirection, (ExpressionSegment) expr);
}
return new ExpressionOrderByItemSegment(ctx.aExpr().getStart().getStartIndex(), ctx.aExpr().getStop().getStopIndex(), getOriginalText(ctx.aExpr()), orderDirection);
@@ -1021,7 +1021,7 @@ public abstract class PostgreSQLStatementSQLVisitor extends PostgreSQLStatementP
result.setAlias(alias);
return result;
}
- // TODO deal with functionTable and xmlTable
+ // TODO deal with functionTable and xmlTable
TableNameSegment tableName = new TableNameSegment(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), new IdentifierValue("not support"));
return new SimpleTableSegment(tableName);
}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/statement/impl/SQL92DDLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/statement/impl/SQL92DDLStatementSQLVisitor.java
index 7262edad7b4..b2d8e1b49ae 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/statement/impl/SQL92DDLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/statement/impl/SQL92DDLStatementSQLVisitor.java
@@ -207,7 +207,7 @@ public final class SQL92DDLStatementSQLVisitor extends SQL92StatementSQLVisitor
public ASTNode visitAddColumnSpecification(final AddColumnSpecificationContext ctx) {
CollectionValue<AddColumnDefinitionSegment> result = new CollectionValue<>();
AddColumnDefinitionSegment addColumnDefinition = new AddColumnDefinitionSegment(
- ctx.columnDefinition().getStart().getStartIndex(), ctx.columnDefinition().getStop().getStopIndex(),
+ ctx.columnDefinition().getStart().getStartIndex(), ctx.columnDefinition().getStop().getStopIndex(),
Collections.singletonList((ColumnDefinitionSegment) visit(ctx.columnDefinition())));
result.getValue().add(addColumnDefinition);
return result;
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/statement/impl/SQL92StatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/statement/impl/SQL92StatementSQLVisitor.java
index 21e1db3b613..1370874281f 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/statement/impl/SQL92StatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/statement/impl/SQL92StatementSQLVisitor.java
@@ -360,7 +360,7 @@ public abstract class SQL92StatementSQLVisitor extends SQL92StatementBaseVisitor
}
if (astNode instanceof ParameterMarkerValue) {
ParameterMarkerValue parameterMarker = (ParameterMarkerValue) astNode;
- ParameterMarkerExpressionSegment segment = new ParameterMarkerExpressionSegment(context.start.getStartIndex(), context.stop.getStopIndex(),
+ ParameterMarkerExpressionSegment segment = new ParameterMarkerExpressionSegment(context.start.getStartIndex(), context.stop.getStopIndex(),
parameterMarker.getValue(), parameterMarker.getType());
parameterMarkerSegments.add(segment);
return segment;
@@ -540,7 +540,7 @@ public abstract class SQL92StatementSQLVisitor extends SQL92StatementBaseVisitor
/**
* Get original text.
- *
+ *
* @param ctx context
* @return original text
*/
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/statement/impl/SQL92TCLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/statement/impl/SQL92TCLStatementSQLVisitor.java
index 07436b7676d..2b01f52ff2f 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/statement/impl/SQL92TCLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/statement/impl/SQL92TCLStatementSQLVisitor.java
@@ -35,11 +35,11 @@ import java.util.Properties;
*/
@NoArgsConstructor
public final class SQL92TCLStatementSQLVisitor extends SQL92StatementSQLVisitor implements TCLSQLVisitor, SQLStatementVisitor {
-
+
public SQL92TCLStatementSQLVisitor(final Properties props) {
super(props);
}
-
+
@Override
public ASTNode visitSetTransaction(final SetTransactionContext ctx) {
return new SQL92SetTransactionStatement();
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/impl/SQLServerDCLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/impl/SQLServerDCLStatementSQLVisitor.java
index 32495db7751..9c7247ff780 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/impl/SQLServerDCLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/impl/SQLServerDCLStatementSQLVisitor.java
@@ -351,7 +351,7 @@ public final class SQLServerDCLStatementSQLVisitor extends SQLServerStatementSQL
userSegment.setUser(((StringLiteralValue) visit(ctx.stringLiterals())).getValue());
userSegment.setStartIndex(ctx.stringLiterals().start.getStartIndex());
userSegment.setStopIndex(ctx.stringLiterals().stop.getStopIndex());
- result.setUser(userSegment);
+ result.setUser(userSegment);
}
return result;
}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/impl/SQLServerDDLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/impl/SQLServerDDLStatementSQLVisitor.java
index 5725176fdd0..829f0399b71 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/impl/SQLServerDDLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/impl/SQLServerDDLStatementSQLVisitor.java
@@ -127,11 +127,11 @@ import java.util.Properties;
*/
@NoArgsConstructor
public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQLVisitor implements DDLSQLVisitor, SQLStatementVisitor {
-
+
public SQLServerDDLStatementSQLVisitor(final Properties props) {
super(props);
}
-
+
@SuppressWarnings("unchecked")
@Override
public ASTNode visitCreateTable(final CreateTableContext ctx) {
@@ -194,7 +194,7 @@ public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQL
}
return result;
}
-
+
private boolean isPrimaryKey(final ColumnDefinitionContext ctx) {
for (ColumnDefinitionOptionContext each : ctx.columnDefinitionOption()) {
for (ColumnConstraintContext columnConstraint : each.columnConstraint()) {
@@ -210,7 +210,7 @@ public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQL
}
return false;
}
-
+
@SuppressWarnings("unchecked")
@Override
public ASTNode visitTableConstraint(final TableConstraintContext ctx) {
@@ -231,7 +231,7 @@ public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQL
}
return result;
}
-
+
@SuppressWarnings("unchecked")
@Override
public ASTNode visitAlterTable(final AlterTableContext ctx) {
@@ -256,7 +256,7 @@ public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQL
}
return result;
}
-
+
@SuppressWarnings("unchecked")
@Override
public ASTNode visitAlterDefinitionClause(final AlterDefinitionClauseContext ctx) {
@@ -278,7 +278,7 @@ public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQL
}
return result;
}
-
+
@Override
public ASTNode visitAddColumnSpecification(final AddColumnSpecificationContext ctx) {
CollectionValue<AddColumnDefinitionSegment> result = new CollectionValue<>();
@@ -294,7 +294,7 @@ public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQL
}
return result;
}
-
+
@Override
public ASTNode visitModifyColumnSpecification(final ModifyColumnSpecificationContext ctx) {
// TODO visit pk and table ref
@@ -303,7 +303,7 @@ public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQL
ColumnDefinitionSegment columnDefinition = new ColumnDefinitionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), column, dataType, false);
return new ModifyColumnDefinitionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), columnDefinition);
}
-
+
@Override
public ASTNode visitDropColumnSpecification(final DropColumnSpecificationContext ctx) {
Collection<ColumnSegment> columns = new LinkedList<>();
@@ -312,7 +312,7 @@ public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQL
}
return new DropColumnDefinitionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), columns);
}
-
+
@SuppressWarnings("unchecked")
@Override
public ASTNode visitDropTable(final DropTableContext ctx) {
@@ -321,14 +321,14 @@ public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQL
result.setContainsExistClause(null != ctx.ifExist());
return result;
}
-
+
@Override
public ASTNode visitTruncateTable(final TruncateTableContext ctx) {
SQLServerTruncateStatement result = new SQLServerTruncateStatement();
result.getTables().add((SimpleTableSegment) visit(ctx.tableName()));
return result;
}
-
+
@Override
public ASTNode visitCreateIndex(final CreateIndexContext ctx) {
SQLServerCreateIndexStatement result = new SQLServerCreateIndexStatement();
@@ -336,7 +336,7 @@ public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQL
result.setIndex((IndexSegment) visit(ctx.indexName()));
return result;
}
-
+
@Override
public ASTNode visitAlterIndex(final AlterIndexContext ctx) {
SQLServerAlterIndexStatement result = new SQLServerAlterIndexStatement();
@@ -346,7 +346,7 @@ public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQL
result.setTable((SimpleTableSegment) visit(ctx.tableName()));
return result;
}
-
+
@Override
public ASTNode visitDropIndex(final DropIndexContext ctx) {
SQLServerDropIndexStatement result = new SQLServerDropIndexStatement();
@@ -355,12 +355,12 @@ public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQL
result.setContainsExistClause(null != ctx.ifExist());
return result;
}
-
+
@Override
public ASTNode visitAlterCheckConstraint(final AlterCheckConstraintContext ctx) {
return new ModifyConstraintDefinitionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), (ConstraintSegment) visit(ctx.constraintName()));
}
-
+
@Override
public ASTNode visitAlterTableDropConstraint(final AlterTableDropConstraintContext ctx) {
CollectionValue<DropConstraintDefinitionSegment> result = new CollectionValue<>();
@@ -369,24 +369,24 @@ public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQL
}
return result;
}
-
+
@Override
public ASTNode visitCreateDatabase(final CreateDatabaseContext ctx) {
SQLServerCreateDatabaseStatement result = new SQLServerCreateDatabaseStatement();
result.setDatabaseName(ctx.databaseName().getText());
return result;
}
-
+
@Override
public ASTNode visitCreateFunction(final CreateFunctionContext ctx) {
return new SQLServerCreateFunctionStatement();
}
-
+
@Override
public ASTNode visitCreateProcedure(final CreateProcedureContext ctx) {
return new SQLServerCreateProcedureStatement();
}
-
+
@Override
public ASTNode visitCreateView(final CreateViewContext ctx) {
SQLServerCreateViewStatement result = new SQLServerCreateViewStatement();
@@ -394,102 +394,102 @@ public final class SQLServerDDLStatementSQLVisitor extends SQLServerStatementSQL
result.setSelect((SQLServerSelectStatement) visit(ctx.createOrAlterViewClause().select()));
return result;
}
-
+
@Override
public ASTNode visitCreateTrigger(final CreateTriggerContext ctx) {
return new SQLServerCreateTriggerStatement();
}
-
+
@Override
public ASTNode visitCreateSequence(final CreateSequenceContext ctx) {
return new SQLServerCreateSequenceStatement();
}
-
+
@Override
public ASTNode visitCreateSchema(final CreateSchemaContext ctx) {
return new SQLServerCreateSchemaStatement();
}
-
+
@Override
public ASTNode visitCreateService(final CreateServiceContext ctx) {
return new SQLServerCreateServiceStatement();
}
-
+
@Override
public ASTNode visitAlterSchema(final AlterSchemaContext ctx) {
return new SQLServerAlterSchemaStatement();
}
-
+
@Override
public ASTNode visitAlterService(final AlterServiceContext ctx) {
return new SQLServerAlterServiceStatement();
}
-
+
@Override
public ASTNode visitDropSchema(final DropSchemaContext ctx) {
return new SQLServerDropSchemaStatement();
}
-
+
@Override
public ASTNode visitDropService(final DropServiceContext ctx) {
return new SQLServerDropServiceStatement();
}
-
+
@Override
public ASTNode visitAlterTrigger(final AlterTriggerContext ctx) {
return new SQLServerAlterTriggerStatement();
}
-
+
@Override
public ASTNode visitAlterSequence(final AlterSequenceContext ctx) {
return new SQLServerAlterSequenceStatement();
}
-
+
@Override
public ASTNode visitAlterProcedure(final AlterProcedureContext ctx) {
return new SQLServerAlterProcedureStatement();
}
-
+
@Override
public ASTNode visitAlterFunction(final AlterFunctionContext ctx) {
return new SQLServerAlterFunctionStatement();
}
-
+
@Override
public ASTNode visitAlterView(final AlterViewContext ctx) {
return new SQLServerAlterViewStatement();
}
-
+
@Override
public ASTNode visitAlterDatabase(final AlterDatabaseContext ctx) {
return new SQLServerAlterDatabaseStatement();
}
-
+
@Override
public ASTNode visitDropDatabase(final DropDatabaseContext ctx) {
return new SQLServerDropDatabaseStatement();
}
-
+
@Override
public ASTNode visitDropFunction(final DropFunctionContext ctx) {
return new SQLServerDropFunctionStatement();
}
-
+
@Override
public ASTNode visitDropProcedure(final DropProcedureContext ctx) {
return new SQLServerDropProcedureStatement();
}
-
+
@Override
public ASTNode visitDropView(final DropViewContext ctx) {
return new SQLServerDropViewStatement();
}
-
+
@Override
public ASTNode visitDropTrigger(final DropTriggerContext ctx) {
return new SQLServerDropTriggerStatement();
}
-
+
@Override
public ASTNode visitDropSequence(final DropSequenceContext ctx) {
return new SQLServerDropSequenceStatement();
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/impl/SQLServerStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/impl/SQLServerStatementSQLVisitor.java
index 7cd4964e3b9..82b5b2d9f0b 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/impl/SQLServerStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/impl/SQLServerStatementSQLVisitor.java
@@ -284,7 +284,7 @@ public abstract class SQLServerStatementSQLVisitor extends SQLServerStatementBas
public final ASTNode visitUnreservedWord(final UnreservedWordContext ctx) {
return new IdentifierValue(ctx.getText());
}
-
+
@Override
public final ASTNode visitSchemaName(final SchemaNameContext ctx) {
return visit(ctx.identifier());
@@ -473,7 +473,7 @@ public abstract class SQLServerStatementSQLVisitor extends SQLServerStatementBas
}
if (astNode instanceof ParameterMarkerValue) {
ParameterMarkerValue parameterMarker = (ParameterMarkerValue) astNode;
- ParameterMarkerExpressionSegment segment = new ParameterMarkerExpressionSegment(context.start.getStartIndex(), context.stop.getStopIndex(),
+ ParameterMarkerExpressionSegment segment = new ParameterMarkerExpressionSegment(context.start.getStartIndex(), context.stop.getStopIndex(),
parameterMarker.getValue(), parameterMarker.getType());
parameterMarkerSegments.add(segment);
return segment;
@@ -658,7 +658,7 @@ public abstract class SQLServerStatementSQLVisitor extends SQLServerStatementBas
}
return result;
}
-
+
@Override
public final ASTNode visitViewName(final ViewNameContext ctx) {
SimpleTableSegment result = new SimpleTableSegment(new TableNameSegment(ctx.name().getStart().getStartIndex(),
@@ -669,7 +669,7 @@ public abstract class SQLServerStatementSQLVisitor extends SQLServerStatementBas
}
return result;
}
-
+
@Override
public ASTNode visitSelect(final SelectContext ctx) {
// TODO :Unsupported for withClause.
@@ -678,13 +678,13 @@ public abstract class SQLServerStatementSQLVisitor extends SQLServerStatementBas
result.getParameterMarkerSegments().addAll(getParameterMarkerSegments());
return result;
}
-
+
@Override
public ASTNode visitAggregationClause(final AggregationClauseContext ctx) {
// TODO :Unsupported for union | except | intersect SQL.
return visit(ctx.selectClause(0));
}
-
+
@Override
public ASTNode visitSelectClause(final SelectClauseContext ctx) {
SQLServerSelectStatement result = new SQLServerSelectStatement();
@@ -710,13 +710,13 @@ public abstract class SQLServerStatementSQLVisitor extends SQLServerStatementBas
}
return result;
}
-
+
@Override
public ASTNode visitHavingClause(final HavingClauseContext ctx) {
ExpressionSegment expr = (ExpressionSegment) visit(ctx.expr());
return new HavingSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), expr);
}
-
+
private SQLServerSelectStatement visitOrderBy(final SQLServerSelectStatement selectStatement, final OrderByClauseContext ctx) {
Collection<OrderByItemSegment> items = new LinkedList<>();
int orderByStartIndex = ctx.start.getStartIndex();
@@ -754,11 +754,11 @@ public abstract class SQLServerStatementSQLVisitor extends SQLServerStatementBas
selectStatement.setLimit(limitSegment);
return selectStatement;
}
-
+
private boolean isDistinct(final SelectClauseContext ctx) {
return ((BooleanLiteralValue) visit(ctx.duplicateSpecification())).getValue();
}
-
+
@Override
public ASTNode visitProjections(final ProjectionsContext ctx) {
Collection<ProjectionSegment> projections = new LinkedList<>();
@@ -772,7 +772,7 @@ public abstract class SQLServerStatementSQLVisitor extends SQLServerStatementBas
result.getProjections().addAll(projections);
return result;
}
-
+
@Override
public ASTNode visitTableReferences(final TableReferencesContext ctx) {
TableSegment result = (TableSegment) visit(ctx.tableReference(0));
@@ -783,7 +783,7 @@ public abstract class SQLServerStatementSQLVisitor extends SQLServerStatementBas
}
return result;
}
-
+
private JoinTableSegment generateJoinTableSourceFromTableReference(final TableReferenceContext ctx, final TableSegment tableSegment) {
JoinTableSegment result = new JoinTableSegment();
result.setStartIndex(tableSegment.getStartIndex());
@@ -792,12 +792,12 @@ public abstract class SQLServerStatementSQLVisitor extends SQLServerStatementBas
result.setRight((TableSegment) visit(ctx));
return result;
}
-
+
@Override
public ASTNode visitWhereClause(final WhereClauseContext ctx) {
return new WhereSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), (ExpressionSegment) visit(ctx.expr()));
}
-
+
@Override
public ASTNode visitGroupByClause(final GroupByClauseContext ctx) {
Collection<OrderByItemSegment> items = new LinkedList<>();
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
index 3f669bb9d92..2e1f117ab98 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
@@ -59,9 +59,9 @@ public enum SQLVisitorRule {
ALTER_FOREIGN_DATA_WRAPPER("AlterForeignDataWrapper", SQLStatementType.DDL),
ALTER_FOREIGN_TABLE("AlterForeignTable", SQLStatementType.DDL),
-
+
DROP_FOREIGN_TABLE("DropForeignTable", SQLStatementType.DDL),
-
+
ALTER_GROUP("AlterGroup", SQLStatementType.DDL),
ALTER_MATERIALIZED_VIEW("AlterMaterializedView", SQLStatementType.DDL),
@@ -83,21 +83,21 @@ public enum SQLVisitorRule {
ALTER_STATEMENT("AlterStatement", SQLStatementType.DDL),
DROP_PROCEDURE("DropProcedure", SQLStatementType.DDL),
-
+
DROP_ROUTINE("DropRoutine", SQLStatementType.DDL),
-
+
DROP_RULE("DropRule", SQLStatementType.DDL),
-
+
DROP_STATISTICS("DropStatistics", SQLStatementType.DDL),
-
+
DROP_PUBLICATION("DropPublication", SQLStatementType.DDL),
-
+
DROP_SUBSCRIPTION("DropSubscription", SQLStatementType.DDL),
CREATE_FUNCTION("CreateFunction", SQLStatementType.DDL),
ALTER_FUNCTION("AlterFunction", SQLStatementType.DDL),
-
+
DROP_CAST("DropCast", SQLStatementType.DDL),
DROP_FUNCTION("DropFunction", SQLStatementType.DDL),
@@ -119,7 +119,7 @@ public enum SQLVisitorRule {
ALTER_DIMENSION("AlterDimension", SQLStatementType.DDL),
DROP_DIMENSION("DropDimension", SQLStatementType.DDL),
-
+
DROP_DIRECTORY("DropDirectory", SQLStatementType.DDL),
CREATE_EVENT("CreateEvent", SQLStatementType.DDL),
@@ -151,7 +151,7 @@ public enum SQLVisitorRule {
ALTER_TRIGGER("AlterTrigger", SQLStatementType.DDL),
DROP_TRIGGER("DropTrigger", SQLStatementType.DDL),
-
+
DROP_EVENT_TRIGGER("DropEventTrigger", SQLStatementType.DDL),
CREATE_VIEW("CreateView", SQLStatementType.DDL),
@@ -181,7 +181,7 @@ public enum SQLVisitorRule {
ALTER_TABLESPACE("AlterTablespace", SQLStatementType.DDL),
DROP_TABLESPACE("DropTablespace", SQLStatementType.DDL),
-
+
DROP_TEXT_SEARCH("DropTextSearch", SQLStatementType.DDL),
ASSOCIATE_STATISTICS("AssociateStatistics", SQLStatementType.DDL),
@@ -408,7 +408,7 @@ public enum SQLVisitorRule {
CALL("Call", SQLStatementType.DML),
- CHANGE_MASTER("ChangeMaster", SQLStatementType.RL),
+ CHANGE_MASTER("ChangeMaster", SQLStatementType.RL),
START_SLAVE("StartSlave", SQLStatementType.RL),
@@ -467,7 +467,7 @@ public enum SQLVisitorRule {
DROP_OPERATOR("DropOperator", SQLStatementType.DDL),
DROP_MATERIALIZED_VIEW("DropMaterializedView", SQLStatementType.DDL),
-
+
DROP_AGGREGATE("DropAggregate", SQLStatementType.DDL),
DROP_COLLATION("DropCollation", SQLStatementType.DDL),
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/JoinType.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/JoinType.java
index f00d6c6df9b..02f2593ffa3 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/JoinType.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/JoinType.java
@@ -28,13 +28,13 @@ public enum JoinType {
MYSQL_NATURAL_INNER_JOIN("NATURAL_INNER"),
MYSQL_NATURAL_LEFT_JOIN("NATURAL_LEFT"),
MYSQL_NATURAL_RIGHT_JOIN("NATURAL_RIGHT");
-
+
private final String joinType;
-
+
JoinType(final String joinType) {
this.joinType = joinType;
}
-
+
/**
* Get join type.
*
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/OperationScope.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/OperationScope.java
index 9fd1b345560..643526aed97 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/OperationScope.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/OperationScope.java
@@ -26,9 +26,9 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Getter
public enum OperationScope {
-
+
GLOBAL("GLOBAL"),
SESSION("SESSION");
-
+
private final String scope;
}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/TransactionAccessType.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/TransactionAccessType.java
index 134858b5a8e..e55969b5eaf 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/TransactionAccessType.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/TransactionAccessType.java
@@ -26,9 +26,9 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Getter
public enum TransactionAccessType {
-
+
READ_ONLY("READ_ONLY"),
READ_WRITE("READ_WRITE");
-
+
private final String accessType;
}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/TransactionIsolationLevel.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/TransactionIsolationLevel.java
index 100ee5a7b03..886551f9b81 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/TransactionIsolationLevel.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/TransactionIsolationLevel.java
@@ -26,13 +26,13 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Getter
public enum TransactionIsolationLevel {
-
+
NONE("NONE"),
READ_UNCOMMITTED("READ-UNCOMMITTED"),
READ_COMMITTED("READ-COMMITTED"),
REPEATABLE_READ("REPEATABLE-READ"),
SNAPSHOT("SNAPSHOT"),
SERIALIZABLE("SERIALIZABLE");
-
+
private final String isolationLevel;
}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/ddl/index/DropIndexDefinitionSegment.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/ddl/index/DropIndexDefinitionSegment.java
index 5ce7a208d58..d4166638573 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/ddl/index/DropIndexDefinitionSegment.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/ddl/index/DropIndexDefinitionSegment.java
@@ -27,10 +27,10 @@ import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.AlterDefiniti
@RequiredArgsConstructor
@Getter
public final class DropIndexDefinitionSegment implements AlterDefinitionSegment {
-
+
private final int startIndex;
-
+
private final int stopIndex;
-
+
private final IndexSegment indexSegment;
}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/ddl/index/IndexSegment.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/ddl/index/IndexSegment.java
index b14174f26d0..3789f0a4bbb 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/ddl/index/IndexSegment.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/ddl/index/IndexSegment.java
@@ -42,10 +42,9 @@ public final class IndexSegment implements SQLSegment, OwnerAvailable {
private final IdentifierValue identifier;
private OwnerSegment owner;
-
+
@Override
public Optional<OwnerSegment> getOwner() {
return Optional.ofNullable(owner);
}
-
}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/expr/BetweenExpression.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/expr/BetweenExpression.java
index 0ae1d7d15f0..94c394b60f4 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/expr/BetweenExpression.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/expr/BetweenExpression.java
@@ -38,4 +38,3 @@ public final class BetweenExpression implements ExpressionSegment {
private final boolean not;
}
-
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/order/item/ExpressionOrderByItemSegment.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/order/item/ExpressionOrderByItemSegment.java
index be9e24a6e1c..d0d144ce650 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/order/item/ExpressionOrderByItemSegment.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/order/item/ExpressionOrderByItemSegment.java
@@ -30,7 +30,7 @@ import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.Expressi
public final class ExpressionOrderByItemSegment extends TextOrderByItemSegment {
private final String expression;
-
+
private final ExpressionSegment expr;
public ExpressionOrderByItemSegment(final int startIndex, final int stopIndex, final String expression, final OrderDirection orderDirection, final OrderDirection nullOrderDirection) {
@@ -44,7 +44,7 @@ public final class ExpressionOrderByItemSegment extends TextOrderByItemSegment {
this.expression = expression;
this.expr = null;
}
-
+
public ExpressionOrderByItemSegment(final int startIndex, final int stopIndex, final String expression, final OrderDirection orderDirection, final ExpressionSegment expr) {
super(startIndex, stopIndex, orderDirection, OrderDirection.ASC);
this.expression = expression;
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/util/ExpressionExtractUtil.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/util/ExpressionExtractUtil.java
index 46d54d5a1a2..16630d75371 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/util/ExpressionExtractUtil.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/util/ExpressionExtractUtil.java
@@ -103,7 +103,7 @@ public final class ExpressionExtractUtil {
if (each instanceof ParameterMarkerExpressionSegment) {
result.add((ParameterMarkerExpressionSegment) each);
}
- // TODO support more expression type if necessary
+ // TODO support more expression type if necessary
if (each instanceof BinaryOperationExpression) {
extractParameterMarkerExpressions(result, Collections.singletonList(((BinaryOperationExpression) each).getLeft()));
extractParameterMarkerExpressions(result, Collections.singletonList(((BinaryOperationExpression) each).getRight()));
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/util/SQLUtil.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/util/SQLUtil.java
index 72953db2cb4..9d553613ae0 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/util/SQLUtil.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/util/SQLUtil.java
@@ -312,8 +312,8 @@ public final class SQLUtil {
public static String convertLikePatternToRegex(final String pattern) {
String result = pattern;
if (pattern.contains("_")) {
- result = SINGLE_CHARACTER_PATTERN.matcher(result).replaceAll("$1.");
- result = SINGLE_CHARACTER_ESCAPE_PATTERN.matcher(result).replaceAll("_");
+ result = SINGLE_CHARACTER_PATTERN.matcher(result).replaceAll("$1.");
+ result = SINGLE_CHARACTER_ESCAPE_PATTERN.matcher(result).replaceAll("_");
}
if (pattern.contains("%")) {
result = ANY_CHARACTER_PATTERN.matcher(result).replaceAll("$1.*");
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/handler/dml/DeleteStatementHandler.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/handler/dml/DeleteStatementHandler.java
index bbd35904f82..c590602a7e5 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/handler/dml/DeleteStatementHandler.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/handler/dml/DeleteStatementHandler.java
@@ -76,7 +76,7 @@ public final class DeleteStatementHandler implements SQLStatementHandler {
}
return Optional.empty();
}
-
+
/**
* Get with segment.
*
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/mysql/dml/MySQLSelectStatement.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/mysql/dml/MySQLSelectStatement.java
index c51cff40dd8..f8f941666ca 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/mysql/dml/MySQLSelectStatement.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/mysql/dml/MySQLSelectStatement.java
@@ -69,7 +69,7 @@ public final class MySQLSelectStatement extends SelectStatement implements MySQL
public Optional<WindowSegment> getWindow() {
return Optional.ofNullable(window);
}
-
+
/**
* Get simple table segment.
*
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/mysql/segment/CloneActionSegment.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/mysql/segment/CloneActionSegment.java
index 5588833c7a8..a663b1cf10d 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/mysql/segment/CloneActionSegment.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/mysql/segment/CloneActionSegment.java
@@ -31,12 +31,12 @@ import org.apache.shardingsphere.sql.parser.sql.common.segment.SQLSegment;
@Getter
@Setter
public final class CloneActionSegment implements SQLSegment {
-
+
private final int startIndex;
-
+
private final int stopIndex;
-
+
private String cloneDir;
-
+
private CloneInstanceSegment cloneInstance;
}
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/opengauss/ddl/OpenGaussCreateSequenceStatement.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/opengauss/ddl/OpenGaussCreateSequenceStatement.java
index e5f32872390..5ef97438e59 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/opengauss/ddl/OpenGaussCreateSequenceStatement.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/opengauss/ddl/OpenGaussCreateSequenceStatement.java
@@ -27,4 +27,3 @@ import org.apache.shardingsphere.sql.parser.sql.dialect.statement.opengauss.Open
@ToString
public final class OpenGaussCreateSequenceStatement extends CreateSequenceStatement implements OpenGaussStatement {
}
-
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLCreateSequenceStatement.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLCreateSequenceStatement.java
index 7b280792184..d25d226c785 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLCreateSequenceStatement.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLCreateSequenceStatement.java
@@ -27,4 +27,3 @@ import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.Pos
@ToString
public final class PostgreSQLCreateSequenceStatement extends CreateSequenceStatement implements PostgreSQLStatement {
}
-
diff --git a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/java/org/apache/shardingsphere/driver/AbstractYamlDataSourceTest.java b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/java/org/apache/shardingsphere/driver/AbstractYamlDataSourceTest.java
index a4cedcb4979..538355f394a 100644
--- a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/java/org/apache/shardingsphere/driver/AbstractYamlDataSourceTest.java
+++ b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/java/org/apache/shardingsphere/driver/AbstractYamlDataSourceTest.java
@@ -58,7 +58,7 @@ public abstract class AbstractYamlDataSourceTest {
}
private static List<String> getSchemaFiles() {
- return Arrays.asList("yaml/schema/sharding/db0.sql",
+ return Arrays.asList("yaml/schema/sharding/db0.sql",
"yaml/schema/sharding/db1.sql",
"yaml/schema/readwrite_splitting/write_ds.sql",
"yaml/schema/readwrite_splitting/read_ds_0.sql",
diff --git a/shardingsphere-test/shardingsphere-integration-scaling-test/shardingsphere-integration-scaling-test-mysql/src/test/java/org/apache/shardingsphere/integration/scaling/test/mysql/env/config/SourceConfiguration.java b/shardingsphere-test/shardingsphere-integration-scaling-test/shardingsphere-integration-scaling-test-mysql/src/test/java/org/apache/shardingsphere/integration/scaling/test/mysql/env/config/SourceConfiguration.java
index 597b7effe00..504dbc3c867 100644
--- a/shardingsphere-test/shardingsphere-integration-scaling-test/shardingsphere-integration-scaling-test-mysql/src/test/java/org/apache/shardingsphere/integration/scaling/test/mysql/env/config/SourceConfiguration.java
+++ b/shardingsphere-test/shardingsphere-integration-scaling-test/shardingsphere-integration-scaling-test-mysql/src/test/java/org/apache/shardingsphere/integration/scaling/test/mysql/env/config/SourceConfiguration.java
@@ -93,7 +93,7 @@ public final class SourceConfiguration {
@SneakyThrows(SQLException.class)
public static DataSource createHostDataSource(final Map<String, YamlTableRuleConfiguration> tableRules) {
ShardingSpherePipelineDataSourceConfiguration config = getHostConfiguration(tableRules);
- return new ShardingSphereDataSource(DefaultSchema.LOGIC_NAME,
+ return new ShardingSphereDataSource(DefaultSchema.LOGIC_NAME,
null, new YamlDataSourceConfigurationSwapper().swapToDataSources(config.getRootConfig().getDataSources()),
new YamlRuleConfigurationSwapperEngine().swapToRuleConfigurations(config.getRootConfig().getRules()), null);
}
diff --git a/shardingsphere-test/shardingsphere-integration-scaling-test/shardingsphere-integration-scaling-test-mysql/src/test/java/org/apache/shardingsphere/integration/scaling/test/mysql/util/ScalingUtil.java b/shardingsphere-test/shardingsphere-integration-scaling-test/shardingsphere-integration-scaling-test-mysql/src/test/java/org/apache/shardingsphere/integration/scaling/test/mysql/util/ScalingUtil.java
index fcbc5fdc692..fb9dcca2961 100644
--- a/shardingsphere-test/shardingsphere-integration-scaling-test/shardingsphere-integration-scaling-test-mysql/src/test/java/org/apache/shardingsphere/integration/scaling/test/mysql/util/ScalingUtil.java
+++ b/shardingsphere-test/shardingsphere-integration-scaling-test/shardingsphere-integration-scaling-test-mysql/src/test/java/org/apache/shardingsphere/integration/scaling/test/mysql/util/ScalingUtil.java
@@ -52,9 +52,9 @@ public final class ScalingUtil {
try {
// TODO getJobStatus
return "";
- //CHECKSTYLE:OFF
+ // CHECKSTYLE:OFF
} catch (Exception ignored) {
- //CHECKSTYLE:ON
+ // CHECKSTYLE:ON
}
return null;
}
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/atomic/storage/StorageContainerFactory.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/atomic/storage/StorageContainerFactory.java
index 1d78e97aced..5fa7f8bc2b5 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/atomic/storage/StorageContainerFactory.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/atomic/storage/StorageContainerFactory.java
@@ -41,7 +41,7 @@ public final class StorageContainerFactory {
switch (databaseType.getName()) {
case "MySQL":
return new MySQLContainer(scenario);
- case "PostgreSQL" :
+ case "PostgreSQL":
return new PostgreSQLContainer(scenario);
case "H2":
return new H2Container(scenario);
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/compose/ComposedContainerRegistry.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/compose/ComposedContainerRegistry.java
index c98b362c1d6..c5bf3db7fd5 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/compose/ComposedContainerRegistry.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/compose/ComposedContainerRegistry.java
@@ -59,7 +59,7 @@ public final class ComposedContainerRegistry implements AutoCloseable {
private boolean isMemoryMode(final ParameterizedArray parameterizedArray) {
// TODO cluster mode often throw exception sometimes, issue is #15517
return true;
-// return "H2".equals(parameterizedArray.getDatabaseType().getName());
+ // return "H2".equals(parameterizedArray.getDatabaseType().getName());
}
@Override
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/watcher/ITWatcher.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/watcher/ITWatcher.java
index 829e93d1678..f858223d362 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/watcher/ITWatcher.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/watcher/ITWatcher.java
@@ -45,9 +45,9 @@ public final class ITWatcher extends TestWatcher {
cause.printStackTrace(printStream);
printStream.flush();
return out.toString();
- //CHECKSTYLE:OFF
+ // CHECKSTYLE:OFF
} catch (final Exception ignored) {
- //CHECKSTYLE:ON
+ // CHECKSTYLE:ON
return "";
}
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/assignment/AssignmentAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/assignment/AssignmentAssert.java
index 4a1e97016af..a40b9b31584 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/assignment/AssignmentAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/assignment/AssignmentAssert.java
@@ -54,7 +54,7 @@ public final class AssignmentAssert {
} else {
ColumnAssert.assertIs(assertContext, actual.getColumns().get(0), expected.getColumn());
// TODO assert assign operator
- AssignmentValueAssert.assertIs(assertContext, actual.getValue(), expected.getAssignmentValue());
+ AssignmentValueAssert.assertIs(assertContext, actual.getValue(), expected.getAssignmentValue());
}
}
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/lock/LockClauseAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/lock/LockClauseAssert.java
index 5dd15569850..7761598e97b 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/lock/LockClauseAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/lock/LockClauseAssert.java
@@ -39,7 +39,7 @@ import static org.junit.Assert.assertTrue;
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class LockClauseAssert {
-
+
/**
* Assert lock segment index and forTables.
* @param assertContext assert context
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/output/OutputClauseAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/output/OutputClauseAssert.java
index 025a94cf492..4155072d225 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/output/OutputClauseAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/output/OutputClauseAssert.java
@@ -69,7 +69,7 @@ public final class OutputClauseAssert {
}
}
- private static void assertOutputColumnSegment(final SQLCaseAssertContext assertContext, final ColumnProjectionSegment actual, final ExpectedColumnProjection expected) {
+ private static void assertOutputColumnSegment(final SQLCaseAssertContext assertContext, final ColumnProjectionSegment actual, final ExpectedColumnProjection expected) {
IdentifierValueAssert.assertIs(assertContext, actual.getColumn().getIdentifier(), expected, "Output column");
SQLSegmentAssert.assertIs(assertContext, actual, expected);
}
@@ -85,7 +85,7 @@ public final class OutputClauseAssert {
actual.getTableColumns().size(), is(expected.getOutputTableColumns().getColumns().size()));
int count = 0;
for (ColumnSegment each : actual.getTableColumns()) {
- assertThat(assertContext.getText("Output table column name assertion error: "),
+ assertThat(assertContext.getText("Output table column name assertion error: "),
each.getIdentifier().getValue(), is(expected.getOutputTableColumns().getColumns().get(count).getName()));
SQLSegmentAssert.assertIs(assertContext, each, expected.getOutputTableColumns().getColumns().get(count));
count++;
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/packages/PackageAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/packages/PackageAssert.java
index 40e5081f3e0..04cac077e35 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/packages/PackageAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/packages/PackageAssert.java
@@ -35,7 +35,7 @@ import static org.junit.Assert.assertTrue;
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class PackageAssert {
-
+
/**
* Assert actual package segment is correct with expected package.
*
@@ -55,4 +55,3 @@ public final class PackageAssert {
SQLSegmentAssert.assertIs(assertContext, actual, expected);
}
}
-
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/projection/ProjectionAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/projection/ProjectionAssert.java
index 0bc6dc12f56..b4274647d76 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/projection/ProjectionAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/projection/ProjectionAssert.java
@@ -63,7 +63,7 @@ public final class ProjectionAssert {
/**
* Assert actual projections segment is correct with expected projections.
- *
+ *
* @param assertContext assert context
* @param actual actual projection
* @param expected expected projections
@@ -83,7 +83,7 @@ public final class ProjectionAssert {
assertThat(assertContext.getText("Projections distinct row assertion error: "), actual.isDistinctRow(), is(expected.isDistinctRow()));
SQLSegmentAssert.assertIs(assertContext, actual, expected);
}
-
+
/**
* Assert actual projection segment is correct with expected projection.
* @param assertContext assert context
@@ -146,7 +146,7 @@ public final class ProjectionAssert {
assertThat(assertContext.getText("Aggregation projection alias assertion error: "), actual.getAlias().orElse(null), is(expected.getAlias()));
if (actual instanceof AggregationDistinctProjectionSegment) {
assertThat(assertContext.getText("Projection type assertion error: "), expected, instanceOf(ExpectedAggregationDistinctProjection.class));
- assertThat(assertContext.getText("Aggregation projection alias assertion error: "),
+ assertThat(assertContext.getText("Aggregation projection alias assertion error: "),
((AggregationDistinctProjectionSegment) actual).getDistinctExpression(), is(((ExpectedAggregationDistinctProjection) expected).getDistinctExpression()));
}
}
@@ -165,10 +165,10 @@ public final class ProjectionAssert {
private static void assertTopProjection(final SQLCaseAssertContext assertContext, final TopProjectionSegment actual, final ExpectedTopProjection expected) {
if (actual.getTop() instanceof NumberLiteralRowNumberValueSegment) {
- assertThat(assertContext.getText("Expression projection top value assertion error: "),
+ assertThat(assertContext.getText("Expression projection top value assertion error: "),
((NumberLiteralRowNumberValueSegment) actual.getTop()).getValue(), is(expected.getTopValue().getValue()));
} else {
- assertThat(assertContext.getText("Expression projection top parameter index assertion error: "),
+ assertThat(assertContext.getText("Expression projection top parameter index assertion error: "),
((ParameterMarkerRowNumberValueSegment) actual.getTop()).getParameterIndex(), is(expected.getTopValue().getParameterIndex()));
}
assertThat(assertContext.getText("Expression projection alias assertion error: "), actual.getAlias(), is(expected.getAlias()));
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/table/TableAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/table/TableAssert.java
index 74d44df9a5f..83515658246 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/table/TableAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/table/TableAssert.java
@@ -88,7 +88,7 @@ public final class TableAssert {
}
SQLSegmentAssert.assertIs(assertContext, actual, expected);
}
-
+
/**
* Assert subquery expression.
*
@@ -100,7 +100,7 @@ public final class TableAssert {
SelectStatementAssert.assertIs(assertContext, actual.getSubquery().getSelect(), expected.getSubquery().getSelectTestCases());
assertThat(assertContext.getText("Table alias assertion error: "), actual.getAlias().orElse(null), is(expected.getAlias()));
}
-
+
/**
* Assert join table.
*
@@ -120,7 +120,7 @@ public final class TableAssert {
count++;
}
}
-
+
/**
* Assert actual table segments is correct with expected tables.
*
@@ -136,7 +136,7 @@ public final class TableAssert {
count++;
}
}
-
+
/**
* Assert actual simple table segments with expected simple tables.
*
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/type/TypeAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/type/TypeAssert.java
index 180f35d7c88..3b514fda220 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/type/TypeAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/type/TypeAssert.java
@@ -35,7 +35,7 @@ import static org.junit.Assert.assertTrue;
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class TypeAssert {
-
+
/**
* Assert actual type segment is correct with expected type.
*
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/with/WithClauseAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/with/WithClauseAssert.java
index 92a237cc4b3..489e9d50c80 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/with/WithClauseAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/with/WithClauseAssert.java
@@ -48,7 +48,7 @@ public final class WithClauseAssert {
*/
public static void assertIs(final SQLCaseAssertContext assertContext, final WithSegment actual, final ExpectedWithClause expected) {
assertNotNull(assertContext.getText("With clause should exist."), expected);
- assertThat(assertContext.getText("With clause common table expressions size assertion error: "),
+ assertThat(assertContext.getText("With clause common table expressions size assertion error: "),
actual.getCommonTableExpressions().size(), is(expected.getCommonTableExpressions().size()));
int count = 0;
for (CommonTableExpressionSegment each : actual.getCommonTableExpressions()) {
@@ -58,7 +58,7 @@ public final class WithClauseAssert {
SQLSegmentAssert.assertIs(assertContext, actual, expected);
}
- private static void assertCommonTableExpressionSegment(final SQLCaseAssertContext assertContext, final CommonTableExpressionSegment actual, final ExpectedCommonTableExpressionClause expected) {
+ private static void assertCommonTableExpressionSegment(final SQLCaseAssertContext assertContext, final CommonTableExpressionSegment actual, final ExpectedCommonTableExpressionClause expected) {
if (null != expected.getCommonTableExpressColumns()) {
assertThat(assertContext.getText("Common table expression column size assertion error: "), actual.getColumns().size(), is(expected.getCommonTableExpressColumns().getColumns().size()));
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/AbstractSQLStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/AbstractSQLStatementAssert.java
index 4abb6caee14..db3ff5338b6 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/AbstractSQLStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/AbstractSQLStatementAssert.java
@@ -30,7 +30,7 @@ import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class AbstractSQLStatementAssert {
-
+
/**
* Assert abstract sql statement is correct with expected parser result.
*
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/SQLStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/SQLStatementAssert.java
index 6da6c14a06a..4fbd3205011 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/SQLStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/SQLStatementAssert.java
@@ -40,7 +40,7 @@ import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class SQLStatementAssert {
-
+
/**
* Assert SQL statement is correct with expected parser result.
*
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowReplicaStatusStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowReplicaStatusStatementAssert.java
index 9940526cf65..d73b20c0ff7 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowReplicaStatusStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowReplicaStatusStatementAssert.java
@@ -31,7 +31,7 @@ import static org.junit.Assert.assertThat;
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class ShowReplicaStatusStatementAssert {
-
+
/**
* Assert show replica status statement is correct with expected show replica status statement test case.
*
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowSlaveHostsStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowSlaveHostsStatementAssert.java
index df06ae3ae25..b8063a3052a 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowSlaveHostsStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowSlaveHostsStatementAssert.java
@@ -28,7 +28,7 @@ import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class ShowSlaveHostsStatementAssert {
-
+
/**
* Assert show slave host statement is correct with expected show slave host statement test case.
*
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowSlaveStatusStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowSlaveStatusStatementAssert.java
index 88206a70f91..63ab08022a4 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowSlaveStatusStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowSlaveStatusStatementAssert.java
@@ -31,7 +31,7 @@ import static org.junit.Assert.assertThat;
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class ShowSlaveStatusStatementAssert {
-
+
/**
* Assert show slave status statement is correct with expected show slave status statement test case.
*
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowTriggersStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowTriggersStatementAssert.java
index 4f4ec0aa925..082fc7918cc 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowTriggersStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowTriggersStatementAssert.java
@@ -31,7 +31,7 @@ import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class ShowTriggersStatementAssert {
-
+
/**
* Assert show triggers statement is correct with expected parser result.
*
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/impl/mysql/MySQLRevokeStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/impl/mysql/MySQLRevokeStatementAssert.java
index 6a201fc03af..8332724d745 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/impl/mysql/MySQLRevokeStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/impl/mysql/MySQLRevokeStatementAssert.java
@@ -29,7 +29,6 @@ import java.util.Collections;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
-
/**
* MySQL Revoke statement assert.
*/
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/impl/sqlserver/SQLServerRevokeStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/impl/sqlserver/SQLServerRevokeStatementAssert.java
index 956a47f4a8f..44c60d9320e 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/impl/sqlserver/SQLServerRevokeStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/impl/sqlserver/SQLServerRevokeStatementAssert.java
@@ -25,7 +25,6 @@ import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.segment.c
import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.segment.table.TableAssert;
import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.RevokeStatementTestCase;
-
/**
* SQLServer Revoke statement assert.
*/
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/impl/AlterSynonymStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/impl/AlterSynonymStatementAssert.java
index 7715937447b..433e2c9c5f5 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/impl/AlterSynonymStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/impl/AlterSynonymStatementAssert.java
@@ -28,7 +28,7 @@ import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class AlterSynonymStatementAssert {
-
+
/**
* Assert alter synonym statement is correct with expected parser result.
*
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/impl/FlashbackTableStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/impl/FlashbackTableStatementAssert.java
index bd1558bc85a..9a77fd951a3 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/impl/FlashbackTableStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/impl/FlashbackTableStatementAssert.java
@@ -45,7 +45,7 @@ public final class FlashbackTableStatementAssert {
private static void assertTable(final SQLCaseAssertContext assertContext, final OracleFlashbackTableStatement actual, final FlashbackTableStatementTestCase expected) {
TableAssert.assertIs(assertContext, actual.getTable(), expected.getTable());
}
-
+
private static void assertRenameTable(final SQLCaseAssertContext assertContext, final OracleFlashbackTableStatement actual, final FlashbackTableStatementTestCase expected) {
if (null != expected.getRenameTable()) {
TableAssert.assertIs(assertContext, actual.getRenameTable(), expected.getRenameTable());
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/queryable/ExportSchemaConfigurationStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/queryable/ExportSchemaConfigurationStatementAssert.java
index 6b9a14f7994..98dc71137ae 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/queryable/ExportSchemaConfigurationStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/common/queryable/ExportSchemaConfigurationStatementAssert.java
@@ -28,7 +28,7 @@ import static org.junit.Assert.assertNull;
* Export schema configuration statement assert.
*/
public final class ExportSchemaConfigurationStatementAssert {
-
+
/**
* Assert export schema configuration statement is correct with expected parser result.
*
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/scaling/UpdatableScalingRALStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/scaling/UpdatableScalingRALStatementAssert.java
index 6b023bd6ad0..4963bac6da4 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/scaling/UpdatableScalingRALStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/ral/impl/scaling/UpdatableScalingRALStatementAssert.java
@@ -49,7 +49,7 @@ import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class UpdatableScalingRALStatementAssert {
-
+
/**
* Assert updatable scaling RAL statement is correct with expected parser result.
*
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/AlterRuleStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/AlterRuleStatementAssert.java
index 79be66c4152..b543c4bed9b 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/AlterRuleStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/AlterRuleStatementAssert.java
@@ -101,7 +101,7 @@ public final class AlterRuleStatementAssert {
} else if (actual instanceof AlterShadowAlgorithmStatement) {
AlterShadowAlgorithmStatementAssert.assertIs(assertContext, (AlterShadowAlgorithmStatement) actual, (AlterShadowAlgorithmStatementTestCase) expected);
} else if (actual instanceof AlterDefaultSingleTableRuleStatement) {
- AlterDefaultSingleTableRuleStatementAssert.assertIs(assertContext, (AlterDefaultSingleTableRuleStatement) actual,
+ AlterDefaultSingleTableRuleStatementAssert.assertIs(assertContext, (AlterDefaultSingleTableRuleStatement) actual,
(AlterDefaultSingleTableRuleStatementTestCase) expected);
} else if (actual instanceof AlterShardingKeyGeneratorStatement) {
AlterShardingKeyGeneratorStatementAssert.assertIs(assertContext, (AlterShardingKeyGeneratorStatement) actual, (AlterShardingKeyGeneratorStatementTestCase) expected);
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDefaultShardingStrategyStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDefaultShardingStrategyStatementAssert.java
index 45876169cf1..a766b8802fb 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDefaultShardingStrategyStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDefaultShardingStrategyStatementAssert.java
@@ -46,13 +46,13 @@ public final class AlterDefaultShardingStrategyStatementAssert {
assertNull(assertContext.getText("Actual statement should not exist."), actual);
} else {
assertNotNull(assertContext.getText("Actual statement should exist."), actual);
- assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
+ assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
actual.getDefaultType(), is(expected.getStrategy().getDefaultType()));
- assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
+ assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
actual.getShardingColumn(), is(expected.getStrategy().getShardingColumn()));
- assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
+ assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
actual.getStrategyType(), is(expected.getStrategy().getStrategyType()));
- assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
+ assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
actual.getShardingAlgorithmName(), is(expected.getStrategy().getShardingAlgorithmName()));
}
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDefaultSingleTableRuleStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDefaultSingleTableRuleStatementAssert.java
index b7b41c667d0..c3112befff4 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDefaultSingleTableRuleStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterDefaultSingleTableRuleStatementAssert.java
@@ -41,13 +41,13 @@ public final class AlterDefaultSingleTableRuleStatementAssert {
* @param actual actual alter default single table rule statement
* @param expected expected alter default single table rule statement test case
*/
- public static void assertIs(final SQLCaseAssertContext assertContext, final AlterDefaultSingleTableRuleStatement actual,
+ public static void assertIs(final SQLCaseAssertContext assertContext, final AlterDefaultSingleTableRuleStatement actual,
final AlterDefaultSingleTableRuleStatementTestCase expected) {
if (null == expected) {
assertNull(assertContext.getText("Actual statement should not exist."), actual);
} else {
assertNotNull(assertContext.getText("Actual statement should exist."), actual);
- assertThat(assertContext.getText(String.format("`%s`'s default data source assertion error: ", actual.getClass().getSimpleName())),
+ assertThat(assertContext.getText(String.format("`%s`'s default data source assertion error: ", actual.getClass().getSimpleName())),
actual.getDefaultResource(), is(expected.getDefaultDataSource()));
}
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterShadowAlgorithmStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterShadowAlgorithmStatementAssert.java
index 615e6aaebbf..e1ff5dd5352 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterShadowAlgorithmStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterShadowAlgorithmStatementAssert.java
@@ -37,7 +37,7 @@ import static org.junit.Assert.assertNull;
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class AlterShadowAlgorithmStatementAssert {
-
+
/**
* Assert alter shadow algorithm statement is correct with expected parser result.
*
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterShadowRuleStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterShadowRuleStatementAssert.java
index 4cb2f6b4302..ee15719e397 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterShadowRuleStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/AlterShadowRuleStatementAssert.java
@@ -37,7 +37,7 @@ import static org.junit.Assert.assertNull;
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class AlterShadowRuleStatementAssert {
-
+
/**
* Assert alter shadow rule statement is correct with expected parser result.
*
@@ -53,7 +53,7 @@ public final class AlterShadowRuleStatementAssert {
assertShadowRule(assertContext, actual.getRules(), expected.getRules());
}
}
-
+
private static void assertShadowRule(final SQLCaseAssertContext assertContext, final Collection<ShadowRuleSegment> actual, final List<ExpectedShadowRule> expected) {
if (null == expected) {
assertNull(assertContext.getText("Actual shadow rule should not exist."), actual);
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/DisableShardingScalingRuleStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/DisableShardingScalingRuleStatementAssert.java
index d6d8ab13969..9ef40b13d10 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/DisableShardingScalingRuleStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/DisableShardingScalingRuleStatementAssert.java
@@ -46,7 +46,7 @@ public final class DisableShardingScalingRuleStatementAssert {
assertNull(assertContext.getText("Actual statement should not exist."), actual);
} else {
assertNotNull(assertContext.getText("Actual statement should exist."), actual);
- assertThat(assertContext.getText(String.format("`%s`'s scaling name assertion error: ", actual.getClass().getSimpleName())),
+ assertThat(assertContext.getText(String.format("`%s`'s scaling name assertion error: ", actual.getClass().getSimpleName())),
actual.getScalingName(), is(expected.getScalingName()));
}
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/EnableShardingScalingRuleStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/EnableShardingScalingRuleStatementAssert.java
index 6a9f0635657..141b777f67f 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/EnableShardingScalingRuleStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/EnableShardingScalingRuleStatementAssert.java
@@ -46,7 +46,7 @@ public final class EnableShardingScalingRuleStatementAssert {
assertNull(assertContext.getText("Actual statement should not exist."), actual);
} else {
assertNotNull(assertContext.getText("Actual statement should exist."), actual);
- assertThat(assertContext.getText(String.format("`%s`'s scaling name assertion error: ", actual.getClass().getSimpleName())),
+ assertThat(assertContext.getText(String.format("`%s`'s scaling name assertion error: ", actual.getClass().getSimpleName())),
actual.getScalingName(), is(expected.getScalingName()));
}
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDefaultShadowAlgorithmStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDefaultShadowAlgorithmStatementAssert.java
index 26cfdc0f811..d27c2225be6 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDefaultShadowAlgorithmStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDefaultShadowAlgorithmStatementAssert.java
@@ -46,7 +46,7 @@ public final class CreateDefaultShadowAlgorithmStatementAssert {
assertNull(assertContext.getText("Actual statement should not exist."), actual);
} else {
assertNotNull(assertContext.getText("Actual statement should exist."), actual);
- assertThat(assertContext.getText(String.format("`%s`'s algorithm name assertion error: ", actual.getClass().getSimpleName())),
+ assertThat(assertContext.getText(String.format("`%s`'s algorithm name assertion error: ", actual.getClass().getSimpleName())),
actual.getAlgorithmName(), is(expected.getAlgorithmName()));
}
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDefaultShardingStrategyStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDefaultShardingStrategyStatementAssert.java
index 2daf4bbaf4d..bd31e9934ed 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDefaultShardingStrategyStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDefaultShardingStrategyStatementAssert.java
@@ -46,13 +46,13 @@ public final class CreateDefaultShardingStrategyStatementAssert {
assertNull(assertContext.getText("Actual statement should not exist."), actual);
} else {
assertNotNull(assertContext.getText("Actual statement should exist."), actual);
- assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
+ assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
actual.getDefaultType(), is(expected.getStrategy().getDefaultType()));
- assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
+ assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
actual.getShardingColumn(), is(expected.getStrategy().getShardingColumn()));
- assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
+ assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
actual.getStrategyType(), is(expected.getStrategy().getStrategyType()));
- assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
+ assertThat(assertContext.getText(String.format("`%s`'s datasource segment assertion error: ", actual.getClass().getSimpleName())),
actual.getShardingAlgorithmName(), is(expected.getStrategy().getShardingAlgorithmName()));
}
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDefaultSingleTableRuleStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDefaultSingleTableRuleStatementAssert.java
index 8e3e17f8603..03fcf0c9289 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDefaultSingleTableRuleStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateDefaultSingleTableRuleStatementAssert.java
@@ -41,13 +41,13 @@ public final class CreateDefaultSingleTableRuleStatementAssert {
* @param actual actual create default single table rule statement
* @param expected expected create default single table rule statement test case
*/
- public static void assertIs(final SQLCaseAssertContext assertContext, final CreateDefaultSingleTableRuleStatement actual,
+ public static void assertIs(final SQLCaseAssertContext assertContext, final CreateDefaultSingleTableRuleStatement actual,
final CreateDefaultSingleTableRuleStatementTestCase expected) {
if (null == expected) {
assertNull(assertContext.getText("Actual statement should not exist."), actual);
} else {
assertNotNull(assertContext.getText("Actual statement should exist."), actual);
- assertThat(assertContext.getText(String.format("`%s`'s default data source assertion error: ", actual.getClass().getSimpleName())),
+ assertThat(assertContext.getText(String.format("`%s`'s default data source assertion error: ", actual.getClass().getSimpleName())),
actual.getDefaultResource(), is(expected.getDefaultDataSource()));
}
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateEncryptRuleStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateEncryptRuleStatementAssert.java
index e100d852c68..d7ed4c0d718 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateEncryptRuleStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateEncryptRuleStatementAssert.java
@@ -49,7 +49,7 @@ public final class CreateEncryptRuleStatementAssert {
*/
public static void assertIs(final SQLCaseAssertContext assertContext, final CreateEncryptRuleStatement actual, final CreateEncryptRuleStatementTestCase expected) {
if (null == expected) {
- assertNull(assertContext.getText("Actual statement should not exist."), actual);
+ assertNull(assertContext.getText("Actual statement should not exist."), actual);
} else {
assertNotNull(assertContext.getText("Actual statement should exist."), actual);
assertEncryptRules(assertContext, actual.getRules(), expected.getRules());
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateShadowAlgorithmStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateShadowAlgorithmStatementAssert.java
index 9d6b9199488..177f568c94e 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateShadowAlgorithmStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateShadowAlgorithmStatementAssert.java
@@ -37,7 +37,7 @@ import static org.junit.Assert.assertNull;
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class CreateShadowAlgorithmStatementAssert {
-
+
/**
* Assert create shadow algorithm statement is correct with expected parser result.
*
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateShadowRuleStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateShadowRuleStatementAssert.java
index bcb61205418..961a42a584b 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateShadowRuleStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateShadowRuleStatementAssert.java
@@ -37,7 +37,7 @@ import static org.junit.Assert.assertNull;
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class CreateShadowRuleStatementAssert {
-
+
/**
* Assert create shadow rule statement is correct with expected parser result.
*
@@ -53,7 +53,7 @@ public final class CreateShadowRuleStatementAssert {
assertShadowRule(assertContext, actual.getRules(), expected.getRules());
}
}
-
+
private static void assertShadowRule(final SQLCaseAssertContext assertContext, final Collection<ShadowRuleSegment> actual, final List<ExpectedShadowRule> expected) {
if (null == expected) {
assertNull(assertContext.getText("Actual shadow rule should not exist."), actual);
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/drop/impl/DropShardingScalingRuleStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/drop/impl/DropShardingScalingRuleStatementAssert.java
index d2334f5cf15..3cb9dac1fe3 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/drop/impl/DropShardingScalingRuleStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/drop/impl/DropShardingScalingRuleStatementAssert.java
@@ -46,7 +46,7 @@ public final class DropShardingScalingRuleStatementAssert {
assertNull(assertContext.getText("Actual statement should not exist."), actual);
} else {
assertNotNull(assertContext.getText("Actual statement should exist."), actual);
- assertThat(assertContext.getText(String.format("`%s`'s scaling name assertion error: ", actual.getClass().getSimpleName())),
+ assertThat(assertContext.getText(String.format("`%s`'s scaling name assertion error: ", actual.getClass().getSimpleName())),
actual.getScalingName(), is(expected.getScalingName()));
assertThat(assertContext.getText("Contains exist clause assertion error: "), actual.isContainsExistClause(), is(expected.isContainsExistClause()));
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/DeleteStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/DeleteStatementAssert.java
index efa1a2d6e47..bedbe396234 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/DeleteStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/DeleteStatementAssert.java
@@ -126,7 +126,7 @@ public final class DeleteStatementAssert {
assertFalse(assertContext.getText("Actual order by segment should not exist."), orderBySegment.isPresent());
}
}
-
+
private static void assertLimitClause(final SQLCaseAssertContext assertContext, final DeleteStatement actual, final DeleteStatementTestCase expected) {
Optional<LimitSegment> limitSegment = DeleteStatementHandler.getLimitSegment(actual);
if (null != expected.getLimitClause()) {
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/InsertStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/InsertStatementAssert.java
index 019fe543db2..6968d7cb599 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/InsertStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/InsertStatementAssert.java
@@ -81,7 +81,7 @@ public final class InsertStatementAssert {
private static void assertInsertColumnsClause(final SQLCaseAssertContext assertContext, final InsertStatement actual, final InsertStatementTestCase expected) {
if (null != expected.getInsertColumnsClause()) {
assertTrue(assertContext.getText("Actual insert columns segment should exist."), actual.getInsertColumns().isPresent());
- InsertColumnsClauseAssert.assertIs(assertContext, actual.getInsertColumns().get(), expected.getInsertColumnsClause());
+ InsertColumnsClauseAssert.assertIs(assertContext, actual.getInsertColumns().get(), expected.getInsertColumnsClause());
} else {
assertFalse(assertContext.getText("Actual insert columns segment should not exist."), actual.getInsertColumns().isPresent());
}
@@ -105,7 +105,7 @@ public final class InsertStatementAssert {
assertFalse(assertContext.getText("Actual set assignment segment should not exist."), setAssignmentSegment.isPresent());
}
}
-
+
private static void assertInsertSelectClause(final SQLCaseAssertContext assertContext, final InsertStatement actual, final InsertStatementTestCase expected) {
if (null != expected.getSelectTestCase()) {
assertTrue(assertContext.getText("Actual insert select segment should exist."), actual.getInsertSelect().isPresent());
@@ -129,7 +129,7 @@ public final class InsertStatementAssert {
Optional<WithSegment> withSegment = InsertStatementHandler.getWithSegment(actual);
if (null != expected.getWithClause()) {
assertTrue(assertContext.getText("Actual with segment should exist."), withSegment.isPresent());
- WithClauseAssert.assertIs(assertContext, withSegment.get(), expected.getWithClause());
+ WithClauseAssert.assertIs(assertContext, withSegment.get(), expected.getWithClause());
} else {
assertFalse(assertContext.getText("Actual with segment should not exist."), withSegment.isPresent());
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/MergeStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/MergeStatementAssert.java
index 19f5aeae941..42cfac46c98 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/MergeStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/MergeStatementAssert.java
@@ -78,7 +78,7 @@ public final class MergeStatementAssert {
SetClauseAssert.assertIs(assertContext, actual.getUpdate().getSetAssignment(), expected.getUpdateClause().getSetClause());
} else {
assertNull(assertContext.getText("Actual assignment should not exist."), actual.getUpdate().getSetAssignment());
- }
+ }
}
}
@@ -89,7 +89,7 @@ public final class MergeStatementAssert {
WhereClauseAssert.assertIs(assertContext, actual.getUpdate().getWhere().get(), expected.getUpdateClause().getWhereClause());
} else {
assertFalse(assertContext.getText("Actual update where segment should not exist."), actual.getUpdate().getWhere().isPresent());
- }
+ }
}
if (null != expected.getDeleteClause()) {
if (null != expected.getDeleteClause().getWhereClause()) {
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/SelectStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/SelectStatementAssert.java
index 47ad8bc1693..f08f097267d 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/SelectStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/SelectStatementAssert.java
@@ -105,7 +105,7 @@ public final class SelectStatementAssert {
}
ProjectionAssert.assertIs(assertContext, actual.getProjections(), expected.getProjections());
}
-
+
private static void assertTable(final SQLCaseAssertContext assertContext, final SelectStatement actual, final SelectStatementTestCase expected) {
if (null != expected.getFrom()) {
TableAssert.assertIs(assertContext, actual.getFrom(), expected.getFrom());
@@ -160,7 +160,7 @@ public final class SelectStatementAssert {
assertFalse(assertContext.getText("Actual limit segment should not exist."), limitSegment.isPresent());
}
}
-
+
private static void assertLockClause(final SQLCaseAssertContext assertContext, final SelectStatement actual, final SelectStatementTestCase expected) {
Optional<LockSegment> actualLock = SelectStatementHandler.getLockSegment(actual);
if (null != expected.getLockClause()) {
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/UpdateStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/UpdateStatementAssert.java
index 383dcceadfc..77a86cc8e6e 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/UpdateStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/UpdateStatementAssert.java
@@ -79,7 +79,7 @@ public final class UpdateStatementAssert {
assertFalse(assertContext.getText("Actual where segment should not exist."), actual.getWhere().isPresent());
}
}
-
+
private static void assertOrderByClause(final SQLCaseAssertContext assertContext, final UpdateStatement actual, final UpdateStatementTestCase expected) {
Optional<OrderBySegment> orderBySegment = UpdateStatementHandler.getOrderBySegment(actual);
if (null != expected.getOrderByClause()) {
@@ -89,7 +89,7 @@ public final class UpdateStatementAssert {
assertFalse(assertContext.getText("Actual order by segment should not exist."), orderBySegment.isPresent());
}
}
-
+
private static void assertLimitClause(final SQLCaseAssertContext assertContext, final UpdateStatement actual, final UpdateStatementTestCase expected) {
Optional<LimitSegment> limitSegment = UpdateStatementHandler.getLimitSegment(actual);
if (null != expected.getLimitClause()) {
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
index b17c971a5f8..d20f7298adf 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
@@ -370,7 +370,7 @@ public final class SQLParserTestCases {
@XmlElement(name = "drop-table")
private final List<DropTableStatementTestCase> dropTableTestCases = new LinkedList<>();
-
+
@XmlElement(name = "drop-text-search")
private final List<DropTextSearchStatementTestCase> dropTextSearchTestCases = new LinkedList<>();
@@ -553,7 +553,7 @@ public final class SQLParserTestCases {
@XmlElement(name = "drop-database-link")
private final List<DropDatabaseLinkStatementTestCase> dropDatabaseLinkTestCase = new LinkedList<>();
-
+
@XmlElement(name = "alter-view")
private final List<AlterViewStatementTestCase> alterViewTestCases = new LinkedList<>();
@@ -604,13 +604,13 @@ public final class SQLParserTestCases {
@XmlElement(name = "drop-dimension")
private final List<DropDimensionStatementTestCase> dropDimensionTestCase = new LinkedList<>();
-
+
@XmlElement(name = "drop-directory")
private final List<DropDirectoryStatementTestCase> dropDirectoryTestCase = new LinkedList<>();
@XmlElement(name = "drop-function")
private final List<DropFunctionStatementTestCase> dropFunctionTestCase = new LinkedList<>();
-
+
@XmlElement(name = "drop-group")
private final List<DropGroupStatementTestCase> dropGroupTestCases = new LinkedList<>();
@@ -619,19 +619,19 @@ public final class SQLParserTestCases {
@XmlElement(name = "drop-procedure")
private final List<DropProcedureStatementTestCase> dropProcedureTestCase = new LinkedList<>();
-
+
@XmlElement(name = "drop-routine")
private final List<DropRoutineStatementTestCase> dropRoutineTestCases = new LinkedList<>();
-
+
@XmlElement(name = "drop-rule")
private final List<DropRuleStatementTestCase> dropRuleTestCases = new LinkedList<>();
-
+
@XmlElement(name = "drop-statistics")
private final List<DropStatisticsStatementTestCase> dropStatisticsTestCases = new LinkedList<>();
-
+
@XmlElement(name = "drop-publication")
private final List<DropPublicationStatementTestCase> dropPublicationTestCases = new LinkedList<>();
-
+
@XmlElement(name = "drop-subscription")
private final List<DropSubscriptionStatementTestCase> dropSubscriptionTestCases = new LinkedList<>();
@@ -640,10 +640,10 @@ public final class SQLParserTestCases {
@XmlElement(name = "drop-trigger")
private final List<DropTriggerStatementTestCase> dropTriggerTestCase = new LinkedList<>();
-
+
@XmlElement(name = "alter-trigger")
private final List<AlterTriggerStatementTestCase> alterTriggerTestCase = new LinkedList<>();
-
+
@XmlElement(name = "drop-event-trigger")
private final List<DropEventTriggerStatementTestCase> dropEventTriggerTestCase = new LinkedList<>();
@@ -1171,7 +1171,7 @@ public final class SQLParserTestCases {
@XmlElement(name = "alter-foreign-table")
private final List<AlterForeignTableTestCase> alterForeignTableTestCase = new LinkedList<>();
-
+
@XmlElement(name = "drop-foreign-table")
private final List<DropForeignTableStatementTestCase> dropForeignTableStatementTestCase = new LinkedList<>();
@@ -1237,7 +1237,7 @@ public final class SQLParserTestCases {
@XmlElement(name = "drop-sharding-algorithm")
private final List<DropShardingAlgorithmStatementTestCase> dropShardingAlgorithmStatementTestCases = new LinkedList<>();
-
+
@XmlElement(name = "drop-owned")
private final List<DropOwnedStatementTestCase> dropOwnedStatementTestCases = new LinkedList<>();
@@ -1246,34 +1246,34 @@ public final class SQLParserTestCases {
@XmlElement(name = "import-schema-config")
private final List<ImportSchemaConfigurationStatementTestCase> importSchemaConfigurationStatementTestCases = new LinkedList<>();
-
+
@XmlElement(name = "drop-operator")
private final List<DropOperatorStatementTestCase> dropOperatorStatementTestCases = new LinkedList<>();
-
+
@XmlElement(name = "drop-materialized-view")
private final List<DropMaterializedViewStatementTestCase> dropMaterializedViewStatementTestCases = new LinkedList<>();
-
+
@XmlElement(name = "drop-cast")
private final List<DropCastStatementTestCase> dropCastStatementTestCases = new LinkedList<>();
@XmlElement(name = "drop-aggregate")
private final List<DropAggregateStatementTestCase> dropAggregateStatementTestCases = new LinkedList<>();
-
+
@XmlElement(name = "drop-collation")
private final List<DropCollationStatementTestCase> dropCollationStatementTestCases = new LinkedList<>();
-
+
@XmlElement(name = "drop-foreign-data-wrapper")
private final List<DropForeignDataWrapperStatementTestCase> dropForeignDataWrapperStatementTestCases = new LinkedList<>();
-
+
@XmlElement(name = "drop-type")
private final List<DropTypeStatementTestCase> dropTypeStatementTestCases = new LinkedList<>();
-
+
@XmlElement(name = "drop-operator-class")
private final List<DropOperatorClassStatementTestCase> dropOperatorClassStatementTestCases = new LinkedList<>();
@XmlElement(name = "drop-operator-family")
private final List<DropOperatorFamilyStatementTestCase> dropOperatorFamilyStatementTestCases = new LinkedList<>();
-
+
@XmlElement(name = "drop-access-method")
private final List<DropAccessMethodStatementTestCase> dropAccessMethodStatementTestCases = new LinkedList<>();
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/AbstractExpectedDelimiterSQLSegment.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/AbstractExpectedDelimiterSQLSegment.java
index 9e242e8a0de..d005d8311c1 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/AbstractExpectedDelimiterSQLSegment.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/AbstractExpectedDelimiterSQLSegment.java
@@ -28,7 +28,7 @@ import javax.xml.bind.annotation.XmlAttribute;
@Getter
@Setter
public abstract class AbstractExpectedDelimiterSQLSegment extends AbstractExpectedSQLSegment implements ExpectedDelimiterSQLSegment {
-
+
@XmlAttribute(name = "start-delimiter")
private String startDelimiter = "";
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/AbstractExpectedIdentifierSQLSegment.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/AbstractExpectedIdentifierSQLSegment.java
index 01bd0b6f30a..690aea60b2d 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/AbstractExpectedIdentifierSQLSegment.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/AbstractExpectedIdentifierSQLSegment.java
@@ -28,7 +28,7 @@ import javax.xml.bind.annotation.XmlAttribute;
@Getter
@Setter
public abstract class AbstractExpectedIdentifierSQLSegment extends AbstractExpectedDelimiterSQLSegment implements ExpectedIdentifierSQLSegment {
-
+
@XmlAttribute
private String name;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/call/ExpectedProcedureParameters.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/call/ExpectedProcedureParameters.java
index 50e2d3e7e11..c4a63f44298 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/call/ExpectedProcedureParameters.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/call/ExpectedProcedureParameters.java
@@ -31,7 +31,7 @@ import java.util.List;
@Getter
@Setter
public final class ExpectedProcedureParameters extends AbstractExpectedSQLSegment {
-
+
@XmlElement(name = "parameter")
private List<ExpectedCallParameter> parameters = new LinkedList<>();
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/clone/ExpectedInstance.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/clone/ExpectedInstance.java
index feb47159acb..bf1807d3be5 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/clone/ExpectedInstance.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/clone/ExpectedInstance.java
@@ -30,16 +30,16 @@ public final class ExpectedInstance extends AbstractExpectedSQLSegment {
@XmlAttribute(name = "username")
private String username;
-
+
@XmlAttribute(name = "hostname")
private String hostname;
-
+
@XmlAttribute(name = "port")
private Integer port;
-
+
@XmlAttribute(name = "password")
private String password;
-
+
@XmlAttribute(name = "require-ssl")
private boolean sslRequired;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/ExpectedAlgorithm.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/ExpectedAlgorithm.java
index f7a26713272..995f6257b21 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/ExpectedAlgorithm.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/ExpectedAlgorithm.java
@@ -30,7 +30,7 @@ import javax.xml.bind.annotation.XmlElement;
@Getter
@Setter
public final class ExpectedAlgorithm extends AbstractExpectedIdentifierSQLSegment {
-
+
@XmlAttribute(name = "algorithm-name")
private String name;
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/ExpectedCacheOption.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/ExpectedCacheOption.java
index 4399335b0ad..ba3884ca15c 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/ExpectedCacheOption.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/ExpectedCacheOption.java
@@ -32,10 +32,10 @@ public final class ExpectedCacheOption extends AbstractExpectedIdentifierSQLSegm
@XmlAttribute(name = "initial-capacity")
private int initialCapacity;
-
+
@XmlAttribute(name = "maximum-size")
private long maximumSize;
-
+
@XmlAttribute(name = "concurrency-level")
private int concurrencyLevel;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/ExpectedSQLParserRule.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/ExpectedSQLParserRule.java
index b3abd0b19f5..12a97138344 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/ExpectedSQLParserRule.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/ExpectedSQLParserRule.java
@@ -30,13 +30,13 @@ import javax.xml.bind.annotation.XmlElement;
@Getter
@Setter
public final class ExpectedSQLParserRule extends AbstractExpectedIdentifierSQLSegment {
-
+
@XmlAttribute
private boolean sqlCommentParseEnabled;
@XmlElement(name = "parse-tree-cache")
private ExpectedCacheOption parseTreeCache;
-
+
@XmlElement(name = "sql-statement-cache")
private ExpectedCacheOption sqlStatementCache;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/ExpectedEncryptColumn.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/ExpectedEncryptColumn.java
index 778221d285d..7197172adf1 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/ExpectedEncryptColumn.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/ExpectedEncryptColumn.java
@@ -37,7 +37,7 @@ public final class ExpectedEncryptColumn extends AbstractExpectedIdentifierSQLSe
@XmlAttribute(name = "cipher-column")
private String cipherColumn;
-
+
@XmlAttribute(name = "assisted-query-column")
private String assistedQueryColumn;
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/ExpectedShardingStrategy.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/ExpectedShardingStrategy.java
index 7713a166877..8f33851f3e1 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/ExpectedShardingStrategy.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/ExpectedShardingStrategy.java
@@ -37,7 +37,7 @@ public final class ExpectedShardingStrategy extends AbstractExpectedIdentifierSQ
@XmlAttribute(name = "sharding-algorithm-name")
private String shardingAlgorithmName;
-
+
@XmlElement(name = "algorithm-segment")
private ExpectedAlgorithm algorithmSegment;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/sharding/scaling/ExpectedInputOrOutputSegment.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/sharding/scaling/ExpectedInputOrOutputSegment.java
index 7f52adb9d5c..1eab70bbde0 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/sharding/scaling/ExpectedInputOrOutputSegment.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/sharding/scaling/ExpectedInputOrOutputSegment.java
@@ -31,13 +31,13 @@ import javax.xml.bind.annotation.XmlElement;
@Getter
@Setter
public final class ExpectedInputOrOutputSegment extends AbstractExpectedIdentifierSQLSegment {
-
+
@XmlAttribute(name = "worker-thread")
private int workerThread;
-
+
@XmlAttribute(name = "batch-size")
private int batchSize;
-
+
@XmlElement(name = "rate-limiter")
private ExpectedAlgorithm rateLimiter;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/expr/ExpectedExpression.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/expr/ExpectedExpression.java
index 7751c0ddc76..1b4c3886ac0 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/expr/ExpectedExpression.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/expr/ExpectedExpression.java
@@ -83,7 +83,7 @@ public final class ExpectedExpression extends AbstractExpectedSQLSegment {
@XmlElement(name = "aggregation-projection")
private ExpectedAggregationProjection aggregationProjection;
-
+
@XmlElement(name = "collate-expression")
private ExpectedCollateExpression collateExpression;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/function/ExpectedFunction.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/function/ExpectedFunction.java
index db944a23ef1..00030efdec3 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/function/ExpectedFunction.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/function/ExpectedFunction.java
@@ -35,10 +35,10 @@ import java.util.List;
@Getter
@Setter
public final class ExpectedFunction extends AbstractExpectedSQLSegment implements ExpectedProjection {
-
+
@XmlAttribute(name = "function-name")
private String functionName;
-
+
@XmlElement(name = "parameter")
private List<ExpectedExpression> parameters = new LinkedList<>();
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/index/ExpectedIndex.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/index/ExpectedIndex.java
index aec81cd9c08..0f924f3f0ba 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/index/ExpectedIndex.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/index/ExpectedIndex.java
@@ -30,7 +30,7 @@ import javax.xml.bind.annotation.XmlElement;
@Getter
@Setter
public final class ExpectedIndex extends AbstractExpectedIdentifierSQLSegment {
-
+
@XmlElement
private ExpectedOwner owner;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/index/ExpectedIndextype.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/index/ExpectedIndextype.java
index 38f9b5b3f29..02415c0f04d 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/index/ExpectedIndextype.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/index/ExpectedIndextype.java
@@ -30,7 +30,7 @@ import javax.xml.bind.annotation.XmlElement;
@Getter
@Setter
public final class ExpectedIndextype extends AbstractExpectedIdentifierSQLSegment {
-
+
@XmlElement
private ExpectedOwner owner;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/lock/ExpectedLockClause.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/lock/ExpectedLockClause.java
index f964d0f16d6..b73b8b62a14 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/lock/ExpectedLockClause.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/lock/ExpectedLockClause.java
@@ -33,7 +33,7 @@ import java.util.List;
@Getter
@Setter
public final class ExpectedLockClause extends AbstractExpectedSQLSegment {
-
+
@XmlElement(name = "table")
private final List<ExpectedSimpleTable> tables = new LinkedList<>();
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/orderby/item/ExpectedOrderByItem.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/orderby/item/ExpectedOrderByItem.java
index c3b1d253c1c..13c2a5cc469 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/orderby/item/ExpectedOrderByItem.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/orderby/item/ExpectedOrderByItem.java
@@ -30,6 +30,6 @@ import javax.xml.bind.annotation.XmlAttribute;
@Setter
public abstract class ExpectedOrderByItem extends AbstractExpectedDelimiterSQLSegment {
- @XmlAttribute(name = "order-direction")
+ @XmlAttribute(name = "order-direction")
private String orderDirection = "ASC";
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/orderby/item/impl/ExpectedExpressionOrderByItem.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/orderby/item/impl/ExpectedExpressionOrderByItem.java
index dc90c7618d6..37af52d9b67 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/orderby/item/impl/ExpectedExpressionOrderByItem.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/orderby/item/impl/ExpectedExpressionOrderByItem.java
@@ -34,7 +34,7 @@ public final class ExpectedExpressionOrderByItem extends ExpectedOrderByItem {
@XmlAttribute
private String expression;
-
+
@XmlElement(name = "expr")
private ExpectedExpression expr;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/packages/ExpectedPackage.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/packages/ExpectedPackage.java
index b2dc1661bef..1b1622a8035 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/packages/ExpectedPackage.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/packages/ExpectedPackage.java
@@ -30,7 +30,7 @@ import javax.xml.bind.annotation.XmlElement;
@Getter
@Setter
public final class ExpectedPackage extends AbstractExpectedIdentifierSQLSegment {
-
+
@XmlElement
private ExpectedOwner owner;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/projection/ExpectedProjections.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/projection/ExpectedProjections.java
index 449b1659554..47415540e93 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/projection/ExpectedProjections.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/projection/ExpectedProjections.java
@@ -70,7 +70,7 @@ public final class ExpectedProjections extends AbstractExpectedSQLSegment {
* @return size
*/
public int getSize() {
- return shorthandProjections.size() + columnProjections.size() + aggregationProjections.size() + aggregationDistinctProjections.size()
+ return shorthandProjections.size() + columnProjections.size() + aggregationProjections.size() + aggregationDistinctProjections.size()
+ expressionProjections.size() + topProjections.size() + subqueryProjections.size();
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/projection/impl/expression/ExpectedExpressionProjection.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/projection/impl/expression/ExpectedExpressionProjection.java
index 5abf8af7996..42e674f8c35 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/projection/impl/expression/ExpectedExpressionProjection.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/projection/impl/expression/ExpectedExpressionProjection.java
@@ -30,16 +30,16 @@ import javax.xml.bind.annotation.XmlElement;
@Getter
@Setter
public final class ExpectedExpressionProjection extends AbstractExpectedSQLSegment implements ExpectedProjection, ExpectedComplexExpressionSegment {
-
+
@XmlAttribute(name = "text")
private String text;
-
+
@XmlAttribute(name = "literal-text")
private String literalText;
-
+
@XmlAttribute(name = "alias")
private String alias;
-
+
@XmlElement(name = "expr")
private ExpectedExpression expr;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/reset/ExpectedResetOptionSegment.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/reset/ExpectedResetOptionSegment.java
index 5cb589c47c6..67b51d39435 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/reset/ExpectedResetOptionSegment.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/reset/ExpectedResetOptionSegment.java
@@ -30,13 +30,13 @@ public final class ExpectedResetOptionSegment extends AbstractExpectedSQLSegment
@XmlAttribute(name = "master")
private boolean master;
-
+
@XmlAttribute(name = "binary-log-file-index-number")
private Integer binaryLogFileIndexNumber;
-
+
@XmlAttribute(name = "all")
private boolean all;
-
+
@XmlAttribute(name = "channel")
private String channel;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/table/ExpectedJoinTable.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/table/ExpectedJoinTable.java
index 9615dfa30f1..0aca3ad74a9 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/table/ExpectedJoinTable.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/table/ExpectedJoinTable.java
@@ -33,16 +33,16 @@ import java.util.List;
@Getter
@Setter
public final class ExpectedJoinTable extends AbstractExpectedDelimiterSQLSegment {
-
+
@XmlElement(name = "left")
private ExpectedTable left;
-
+
@XmlElement(name = "right")
private ExpectedTable right;
-
+
@XmlElement(name = "on-condition")
private ExpectedExpression onCondition;
-
+
@XmlElement(name = "using-columns")
private final List<ExpectedColumn> usingColumns = new LinkedList<>();
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/table/ExpectedTable.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/table/ExpectedTable.java
index 6b7c93f9d13..e74cc223d20 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/table/ExpectedTable.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/table/ExpectedTable.java
@@ -35,7 +35,7 @@ public final class ExpectedTable extends AbstractExpectedDelimiterSQLSegment {
@XmlElement(name = "subquery-table")
private ExpectedSubqueryTable subqueryTable;
-
+
@XmlElement(name = "join-table")
private ExpectedJoinTable joinTable;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/type/ExpectedType.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/type/ExpectedType.java
index 8baf44b8ea0..4da7eec3c4a 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/type/ExpectedType.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/type/ExpectedType.java
@@ -30,7 +30,7 @@ import javax.xml.bind.annotation.XmlElement;
@Getter
@Setter
public final class ExpectedType extends AbstractExpectedIdentifierSQLSegment {
-
+
@XmlElement
private ExpectedOwner owner;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/where/ExpectedWhereClause.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/where/ExpectedWhereClause.java
index 204724fafd9..427bc79e6b7 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/where/ExpectedWhereClause.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/where/ExpectedWhereClause.java
@@ -33,7 +33,7 @@ import javax.xml.bind.annotation.XmlElement;
@Setter
@XmlAccessorType(XmlAccessType.FIELD)
public final class ExpectedWhereClause extends AbstractExpectedSQLSegment {
-
+
@XmlElement(name = "expr")
private ExpectedExpression expr;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dal/CloneStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dal/CloneStatementTestCase.java
index 62ccb8ee08b..12d6f1bc4b4 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dal/CloneStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dal/CloneStatementTestCase.java
@@ -37,5 +37,4 @@ public final class CloneStatementTestCase extends SQLParserTestCase {
@XmlElement(name = "instance")
private ExpectedInstance instance;
-
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dal/ShowIndexStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dal/ShowIndexStatementTestCase.java
index 373efa29309..3b036ac6573 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dal/ShowIndexStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dal/ShowIndexStatementTestCase.java
@@ -31,7 +31,7 @@ import javax.xml.bind.annotation.XmlElement;
@Getter
@Setter
public final class ShowIndexStatementTestCase extends SQLParserTestCase {
-
+
@XmlElement
private ExpectedSimpleTable table;
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AnalyzeStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AnalyzeStatementTestCase.java
index a80072bcdaa..510b2f53c07 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AnalyzeStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/AnalyzeStatementTestCase.java
@@ -31,11 +31,10 @@ import javax.xml.bind.annotation.XmlElement;
@Getter
@Setter
public final class AnalyzeStatementTestCase extends SQLParserTestCase {
-
+
@XmlElement(name = "index")
private ExpectedIndex index;
@XmlElement(name = "table")
private ExpectedSimpleTable table;
-
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/CreateTableStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/CreateTableStatementTestCase.java
index ee15deb526c..916e4932961 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/CreateTableStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/CreateTableStatementTestCase.java
@@ -47,7 +47,7 @@ public final class CreateTableStatementTestCase extends SQLParserTestCase {
private final List<ExpectedConstraintDefinition> constraintDefinitions = new LinkedList<>();
@XmlElement(name = "column")
- private final List<ExpectedColumn> columns = new LinkedList<>();
+ private final List<ExpectedColumn> columns = new LinkedList<>();
@XmlElement(name = "select")
private SelectStatementTestCase createTableAsSelectStatement;
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/FlashbackTableStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/FlashbackTableStatementTestCase.java
index 4adc09e5036..2ef7e287dca 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/FlashbackTableStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/FlashbackTableStatementTestCase.java
@@ -30,7 +30,7 @@ import javax.xml.bind.annotation.XmlElement;
@Getter
@Setter
public final class FlashbackTableStatementTestCase extends SQLParserTestCase {
-
+
@XmlElement(name = "table")
private ExpectedSimpleTable table;
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/AlterTrafficRuleStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/AlterTrafficRuleStatementTestCase.java
index 8c4ba3b6a66..79b2115020d 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/AlterTrafficRuleStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/AlterTrafficRuleStatementTestCase.java
@@ -30,7 +30,7 @@ import java.util.List;
*/
@Getter
public final class AlterTrafficRuleStatementTestCase extends SQLParserTestCase {
-
+
@XmlElement(name = "rule")
private final List<ExpectedTrafficRule> rules = new LinkedList<>();
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/CreateTrafficRuleStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/CreateTrafficRuleStatementTestCase.java
index 20fa61b6d87..13c4e2edcfa 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/CreateTrafficRuleStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/CreateTrafficRuleStatementTestCase.java
@@ -30,7 +30,7 @@ import java.util.List;
*/
@Getter
public final class CreateTrafficRuleStatementTestCase extends SQLParserTestCase {
-
+
@XmlElement(name = "rule")
private final List<ExpectedTrafficRule> rules = new LinkedList<>();
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/ExportSchemaConfigurationStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/ExportSchemaConfigurationStatementTestCase.java
index e3a4ddaba33..a9f5294591f 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/ExportSchemaConfigurationStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/ExportSchemaConfigurationStatementTestCase.java
@@ -30,7 +30,7 @@ import javax.xml.bind.annotation.XmlElement;
@Getter
@Setter
public final class ExportSchemaConfigurationStatementTestCase extends SQLParserTestCase {
-
+
@XmlElement(name = "schema")
private ExpectedSchema schema;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/ShowTrafficRulesStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/ShowTrafficRulesStatementTestCase.java
index 6219dd0f393..f56bd8fafad 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/ShowTrafficRulesStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/ShowTrafficRulesStatementTestCase.java
@@ -29,7 +29,7 @@ import javax.xml.bind.annotation.XmlAttribute;
@Getter
@Setter
public final class ShowTrafficRulesStatementTestCase extends SQLParserTestCase {
-
+
@XmlAttribute(name = "rule-name")
private String ruleName;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/DisableShardingScalingRuleStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/DisableShardingScalingRuleStatementTestCase.java
index fc2c4a4add5..da464978577 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/DisableShardingScalingRuleStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/DisableShardingScalingRuleStatementTestCase.java
@@ -29,7 +29,7 @@ import javax.xml.bind.annotation.XmlAttribute;
@Getter
@Setter
public final class DisableShardingScalingRuleStatementTestCase extends SQLParserTestCase {
-
+
@XmlAttribute(name = "scaling-name")
private String scalingName;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/EnableShardingScalingRuleStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/EnableShardingScalingRuleStatementTestCase.java
index acf0aad96f7..5a9a3700281 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/EnableShardingScalingRuleStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/EnableShardingScalingRuleStatementTestCase.java
@@ -29,7 +29,7 @@ import javax.xml.bind.annotation.XmlAttribute;
@Getter
@Setter
public final class EnableShardingScalingRuleStatementTestCase extends SQLParserTestCase {
-
+
@XmlAttribute(name = "scaling-name")
private String scalingName;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/create/CreateShardingScalingRuleStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/create/CreateShardingScalingRuleStatementTestCase.java
index ebaa9742de8..35b9e0fd7ba 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/create/CreateShardingScalingRuleStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/create/CreateShardingScalingRuleStatementTestCase.java
@@ -31,10 +31,10 @@ import javax.xml.bind.annotation.XmlElement;
@Getter
@Setter
public final class CreateShardingScalingRuleStatementTestCase extends SQLParserTestCase {
-
+
@XmlAttribute(name = "scaling-name")
private String scalingName;
-
+
@XmlElement(name = "configuration")
private ExpectedShardingScalingRuleConfigurationSegment configurationSegment;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/drop/DropDefaultSingleTableRuleStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/drop/DropDefaultSingleTableRuleStatementTestCase.java
index 4875c8aa295..82819fd2cba 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/drop/DropDefaultSingleTableRuleStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/drop/DropDefaultSingleTableRuleStatementTestCase.java
@@ -29,7 +29,7 @@ import javax.xml.bind.annotation.XmlAttribute;
@Getter
@Setter
public final class DropDefaultSingleTableRuleStatementTestCase extends SQLParserTestCase {
-
+
@XmlAttribute(name = "contains-exist-clause")
private boolean containsExistClause;
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/drop/DropShardingScalingRuleStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/drop/DropShardingScalingRuleStatementTestCase.java
index 718b18ad778..fe7b4da2d73 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/drop/DropShardingScalingRuleStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/drop/DropShardingScalingRuleStatementTestCase.java
@@ -29,7 +29,7 @@ import javax.xml.bind.annotation.XmlAttribute;
@Getter
@Setter
public final class DropShardingScalingRuleStatementTestCase extends DropRuleStatementTestCase {
-
+
@XmlAttribute(name = "scaling-name")
private String scalingName;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dml/CallStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dml/CallStatementTestCase.java
index bfc7e88361e..85d6c2a5a76 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dml/CallStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dml/CallStatementTestCase.java
@@ -31,10 +31,10 @@ import javax.xml.bind.annotation.XmlElement;
@Getter
@Setter
public final class CallStatementTestCase extends SQLParserTestCase {
-
+
@XmlElement(name = "procedure-name")
private ExpectedProcedureName procedureName;
-
+
@XmlElement(name = "parameters")
private ExpectedProcedureParameters procedureParameters;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dml/SelectStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dml/SelectStatementTestCase.java
index b39d22680be..db4d69fbbdb 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dml/SelectStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dml/SelectStatementTestCase.java
@@ -46,10 +46,10 @@ public final class SelectStatementTestCase extends SQLParserTestCase {
@XmlElement(name = "from")
private ExpectedTable from;
-
+
@XmlElement(name = "simple-table")
private ExpectedSimpleTable simpleTable;
-
+
@XmlElement(name = "projections")
private final ExpectedProjections projections = new ExpectedProjections();
@@ -70,7 +70,7 @@ public final class SelectStatementTestCase extends SQLParserTestCase {
@XmlElement(name = "limit")
private ExpectedLimitClause limitClause;
-
+
@XmlElement(name = "lock")
private ExpectedLockClause lockClause;
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/tcl/RollbackStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/tcl/RollbackStatementTestCase.java
index 978fa153866..3de7998f6a9 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/tcl/RollbackStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/tcl/RollbackStatementTestCase.java
@@ -29,7 +29,7 @@ import javax.xml.bind.annotation.XmlAttribute;
@Getter
@Setter
public final class RollbackStatementTestCase extends SQLParserTestCase {
-
+
@XmlAttribute(name = "savepoint-name")
private String savepointName;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/tcl/SavepointStatementTestCase.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/tcl/SavepointStatementTestCase.java
index bcefef87805..c5778190b85 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/tcl/SavepointStatementTestCase.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/tcl/SavepointStatementTestCase.java
@@ -29,7 +29,7 @@ import javax.xml.bind.annotation.XmlAttribute;
@Getter
@Setter
public final class SavepointStatementTestCase extends SQLParserTestCase {
-
+
@XmlAttribute(name = "savepoint-name")
private String savepointName;
}
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/sql/loader/SQLCasesLoader.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/sql/loader/SQLCasesLoader.java
index e86f30e11f5..1deae0271e4 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/sql/loader/SQLCasesLoader.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/sql/loader/SQLCasesLoader.java
@@ -48,7 +48,7 @@ public final class SQLCasesLoader extends CasesLoader {
public SQLCasesLoader(final String rootDirection) {
super(rootDirection);
}
-
+
@Override
public void buildCaseMap(final Map<String, Case> sqlCaseMap, final InputStream inputStream) throws JAXBException {
SQLCases sqlCases = (SQLCases) JAXBContext.newInstance(SQLCases.class).createUnmarshaller().unmarshal(inputStream);
@@ -106,7 +106,7 @@ public final class SQLCasesLoader extends CasesLoader {
private String getPlaceholderSQL(final String sql) {
return sql;
}
-
+
private String getLiteralSQL(final String sql, final List<?> parameters) {
if (null == parameters || parameters.isEmpty()) {
return sql;
diff --git a/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJobPreparerTest.java b/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJobPreparerTest.java
index a95ea0952ae..d3591f5e541 100644
--- a/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJobPreparerTest.java
+++ b/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJobPreparerTest.java
@@ -18,5 +18,5 @@
package org.apache.shardingsphere.data.pipeline.scenario.rulealtered;
public final class RuleAlteredJobPreparerTest {
- //TODO simple unit test can't cover prepare() method, it's a combination method
+ // TODO simple unit test can't cover prepare() method, it's a combination method
}
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/AbstractSQLRewriterParameterizedTest.java b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/AbstractSQLRewriterParameterizedTest.java
index fdf8c303baf..9ff5b4b8b44 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/AbstractSQLRewriterParameterizedTest.java
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/AbstractSQLRewriterParameterizedTest.java
@@ -74,8 +74,8 @@ public abstract class AbstractSQLRewriterParameterizedTest {
private final SQLRewriteEngineTestParameters testParameters;
- private final SQLParserRule sqlParserRule = new SQLParserRule(new SQLParserRuleConfiguration(true,
- DefaultSQLParserRuleConfigurationBuilder.PARSE_TREE_CACHE_OPTION,
+ private final SQLParserRule sqlParserRule = new SQLParserRule(new SQLParserRuleConfiguration(true,
+ DefaultSQLParserRuleConfigurationBuilder.PARSE_TREE_CACHE_OPTION,
DefaultSQLParserRuleConfigurationBuilder.SQL_STATEMENT_CACHE_OPTION));
@Test
@@ -109,7 +109,7 @@ public abstract class AbstractSQLRewriterParameterizedTest {
ShardingSphereMetaData metaData = new ShardingSphereMetaData(DefaultSchema.LOGIC_NAME, resource, new ShardingSphereRuleMetaData(Collections.emptyList(), rules), schemas);
Map<String, ShardingSphereMetaData> metaDataMap = new HashMap<>(2, 1);
metaDataMap.put(DefaultSchema.LOGIC_NAME, metaData);
- SQLStatementContext<?> sqlStatementContext = SQLStatementContextFactory.newInstance(metaDataMap,
+ SQLStatementContext<?> sqlStatementContext = SQLStatementContextFactory.newInstance(metaDataMap,
sqlStatementParserEngine.parse(getTestParameters().getInputSQL(), false), DefaultSchema.LOGIC_NAME);
if (sqlStatementContext instanceof ParameterAware) {
((ParameterAware) sqlStatementContext).setUpParameters(getTestParameters().getInputParameters());
@@ -120,7 +120,8 @@ public abstract class AbstractSQLRewriterParameterizedTest {
SQLRewriteEntry sqlRewriteEntry = new SQLRewriteEntry(DefaultSchema.LOGIC_NAME, metaData.getDefaultSchema(), props, rules);
SQLRewriteResult sqlRewriteResult = sqlRewriteEntry.rewrite(getTestParameters().getInputSQL(), getTestParameters().getInputParameters(), sqlStatementContext, routeContext);
return sqlRewriteResult instanceof GenericSQLRewriteResult
- ? Collections.singletonList(((GenericSQLRewriteResult) sqlRewriteResult).getSqlRewriteUnit()) : (((RouteSQLRewriteResult) sqlRewriteResult).getSqlRewriteUnits()).values();
+ ? Collections.singletonList(((GenericSQLRewriteResult) sqlRewriteResult).getSqlRewriteUnit())
+ : (((RouteSQLRewriteResult) sqlRewriteResult).getSqlRewriteUnits()).values();
}
protected abstract void mockDataSource(Map<String, DataSource> dataSources) throws SQLException;
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/parameter/SQLRewriteEngineTestParametersBuilder.java b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/parameter/SQLRewriteEngineTestParametersBuilder.java
index 6efe66660fa..a79f27e840b 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/parameter/SQLRewriteEngineTestParametersBuilder.java
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/parameter/SQLRewriteEngineTestParametersBuilder.java
@@ -97,7 +97,7 @@ public final class SQLRewriteEngineTestParametersBuilder {
for (RewriteAssertionEntity each : rootAssertions.getAssertions()) {
for (String databaseType : getDatabaseTypes(each.getDatabaseTypes())) {
result.add(new SQLRewriteEngineTestParameters(type, each.getId(), fileName, rootAssertions.getYamlRule(), each.getInput().getSql(),
- createInputParameters(each.getInput().getParameters()), createOutputSQLs(each.getOutputs()), createOutputGroupedParameters(each.getOutputs()), databaseType).toArray());
+ createInputParameters(each.getInput().getParameters()), createOutputSQLs(each.getOutputs()), createOutputGroupedParameters(each.getOutputs()), databaseType).toArray());
}
}
... 1 lines suppressed ...