diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml new file mode 100644 index 0000000000..435be24ca7 --- /dev/null +++ b/.github/workflows/license-check.yml @@ -0,0 +1,23 @@ +name: License checker + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + check-license: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Check License Header + uses: apache/skywalking-eyes@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + log: info + config: .github/workflows/license-checker-config.yml diff --git a/.github/workflows/license-checker-config.yml b/.github/workflows/license-checker-config.yml new file mode 100644 index 0000000000..3465553be3 --- /dev/null +++ b/.github/workflows/license-checker-config.yml @@ -0,0 +1,9 @@ +header: + license: + spdx-id: Apache-2.0 + copyright-owner: PingCAP, Inc. + paths: + - '**/*.java' + - '**/*.scala' + - '**/*.py' + comment: on-failure \ No newline at end of file diff --git a/core/src/main/java/com/pingcap/tikv/columnar/TiColumnVectorAdapter.java b/core/src/main/java/com/pingcap/tikv/columnar/TiColumnVectorAdapter.java index 27649d26b9..16746fab27 100644 --- a/core/src/main/java/com/pingcap/tikv/columnar/TiColumnVectorAdapter.java +++ b/core/src/main/java/com/pingcap/tikv/columnar/TiColumnVectorAdapter.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/java/com/pingcap/tikv/columnar/TiColumnarBatchHelper.java b/core/src/main/java/com/pingcap/tikv/columnar/TiColumnarBatchHelper.java index 5652fd5de4..f3d83e9181 100644 --- a/core/src/main/java/com/pingcap/tikv/columnar/TiColumnarBatchHelper.java +++ b/core/src/main/java/com/pingcap/tikv/columnar/TiColumnarBatchHelper.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/java/com/pingcap/tikv/datatype/TypeMapping.java b/core/src/main/java/com/pingcap/tikv/datatype/TypeMapping.java index 4bb6dee625..4ce5b24032 100644 --- a/core/src/main/java/com/pingcap/tikv/datatype/TypeMapping.java +++ b/core/src/main/java/com/pingcap/tikv/datatype/TypeMapping.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/DefaultSource.scala b/core/src/main/scala/com/pingcap/tispark/DefaultSource.scala index 1eea7822c8..8916b75939 100644 --- a/core/src/main/scala/com/pingcap/tispark/DefaultSource.scala +++ b/core/src/main/scala/com/pingcap/tispark/DefaultSource.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/MetaManager.scala b/core/src/main/scala/com/pingcap/tispark/MetaManager.scala index c8e8e6ad8f..df587ee070 100644 --- a/core/src/main/scala/com/pingcap/tispark/MetaManager.scala +++ b/core/src/main/scala/com/pingcap/tispark/MetaManager.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/TiConfigConst.scala b/core/src/main/scala/com/pingcap/tispark/TiConfigConst.scala index 2c79902034..2d202f468e 100644 --- a/core/src/main/scala/com/pingcap/tispark/TiConfigConst.scala +++ b/core/src/main/scala/com/pingcap/tispark/TiConfigConst.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/TiDBRelation.scala b/core/src/main/scala/com/pingcap/tispark/TiDBRelation.scala index 13cc5d0fc7..f27e5f63c9 100644 --- a/core/src/main/scala/com/pingcap/tispark/TiDBRelation.scala +++ b/core/src/main/scala/com/pingcap/tispark/TiDBRelation.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/TiDBUtils.scala b/core/src/main/scala/com/pingcap/tispark/TiDBUtils.scala index db72934885..4b794a2ff2 100644 --- a/core/src/main/scala/com/pingcap/tispark/TiDBUtils.scala +++ b/core/src/main/scala/com/pingcap/tispark/TiDBUtils.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/TiPartition.scala b/core/src/main/scala/com/pingcap/tispark/TiPartition.scala index 0282178df7..ca6e7108d0 100644 --- a/core/src/main/scala/com/pingcap/tispark/TiPartition.scala +++ b/core/src/main/scala/com/pingcap/tispark/TiPartition.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/TiSparkInfo.scala b/core/src/main/scala/com/pingcap/tispark/TiSparkInfo.scala index 2e24e60d64..0fbbc75c70 100644 --- a/core/src/main/scala/com/pingcap/tispark/TiSparkInfo.scala +++ b/core/src/main/scala/com/pingcap/tispark/TiSparkInfo.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/TiTableReference.scala b/core/src/main/scala/com/pingcap/tispark/TiTableReference.scala index 3dcb39ed0d..a82c4a5136 100644 --- a/core/src/main/scala/com/pingcap/tispark/TiTableReference.scala +++ b/core/src/main/scala/com/pingcap/tispark/TiTableReference.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/accumulator/CacheInvalidateAccumulator.scala b/core/src/main/scala/com/pingcap/tispark/accumulator/CacheInvalidateAccumulator.scala index a90fb37663..ace701ba67 100644 --- a/core/src/main/scala/com/pingcap/tispark/accumulator/CacheInvalidateAccumulator.scala +++ b/core/src/main/scala/com/pingcap/tispark/accumulator/CacheInvalidateAccumulator.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/auth/MySQLPriv.scala b/core/src/main/scala/com/pingcap/tispark/auth/MySQLPriv.scala new file mode 100644 index 0000000000..11093242eb --- /dev/null +++ b/core/src/main/scala/com/pingcap/tispark/auth/MySQLPriv.scala @@ -0,0 +1,126 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.pingcap.tispark.auth + +import org.apache.spark.sql.catalyst.util.CaseInsensitiveMap + +object MySQLPriv extends Enumeration { + + // UsagePriv is a synonym for “no privileges” + val UsagePriv, + // CreatePriv is the privilege to create schema/table. + CreatePriv, + // SelectPriv is the privilege to read from table. + SelectPriv, + // InsertPriv is the privilege to insert data into table. + InsertPriv, + // UpdatePriv is the privilege to update data in table. + UpdatePriv, + // DeletePriv is the privilege to delete data from table. + DeletePriv, + // ShowDBPriv is the privilege to run show databases statement. + ShowDBPriv, + // SuperPriv enables many operations and server behaviors. + SuperPriv, + // CreateUserPriv is the privilege to create user. + CreateUserPriv, + // TriggerPriv is not checked yet. + TriggerPriv, + // DropPriv is the privilege to drop schema/table. + DropPriv, + // ProcessPriv pertains to display of information about the threads executing within the server. + ProcessPriv, + // GrantPriv is the privilege to grant privilege to user. + GrantPriv, + // ReferencesPriv is not checked yet. + ReferencesPriv, + // AlterPriv is the privilege to run alter statement. + AlterPriv, + // ExecutePriv is the privilege to run execute statement. + ExecutePriv, + // IndexPriv is the privilege to create/drop index. + IndexPriv, + // CreateViewPriv is the privilege to create view. + CreateViewPriv, + // ShowViewPriv is the privilege to show create view. + ShowViewPriv, + // CreateRolePriv the privilege to create a role. + CreateRolePriv, + // DropRolePriv is the privilege to drop a role. + DropRolePriv, + // CreateTMPTablePriv is the privilege to create a temporary table. + CreateTMPTablePriv, LockTablesPriv, CreateRoutinePriv, AlterRoutinePriv, EventPriv, + // ShutdownPriv the privilege to shutdown a server. + ShutdownPriv, + // ReloadPriv is the privilege to enable the use of the FLUSH statement. + ReloadPriv, + // FilePriv is the privilege to enable the use of LOAD DATA and SELECT ... INTO OUTFILE. + FilePriv, + // ConfigPriv is the privilege to enable the use SET CONFIG statements. + ConfigPriv, + // CreateTablespacePriv is the privilege to create tablespace. + CreateTablespacePriv, + // ReplicationClientPriv is used in MySQL replication + ReplicationClientPriv, + // ReplicationSlavePriv is used in MySQL replication + ReplicationSlavePriv, + // AllPriv is the privilege for all actions. + AllPriv, /* + * Please add the new priv before AllPriv to keep the values consistent across versions. + */ + + // ExtendedPriv is used to successful parse privileges not included above. + // these are dynamic privileges in MySQL 8.0 and other extended privileges like LOAD FROM S3 in Aurora. + ExtendedPriv = Value + + final val Str2Priv = CaseInsensitiveMap( + Map( + "CREATE" -> MySQLPriv.CreatePriv, + "SELECT" -> MySQLPriv.SelectPriv, + "INSERT" -> MySQLPriv.InsertPriv, + "UPDATE" -> MySQLPriv.UpdatePriv, + "DELETE" -> MySQLPriv.DeletePriv, + "SHOW DATABASES" -> MySQLPriv.ShowDBPriv, + "SUPER" -> MySQLPriv.SuperPriv, + "CREATE USER" -> MySQLPriv.CreateUserPriv, + "CREATE TABLESPACE" -> MySQLPriv.CreateTablespacePriv, + "TRIGGER" -> MySQLPriv.TriggerPriv, + "DROP" -> MySQLPriv.DropPriv, + "PROCESS" -> MySQLPriv.ProcessPriv, + "GRANT OPTION" -> MySQLPriv.GrantPriv, + "REFERENCES" -> MySQLPriv.ReferencesPriv, + "ALTER" -> MySQLPriv.AlterPriv, + "EXECUTE" -> MySQLPriv.ExecutePriv, + "INDEX" -> MySQLPriv.IndexPriv, + "CREATE VIEW" -> MySQLPriv.CreateViewPriv, + "SHOW VIEW" -> MySQLPriv.ShowViewPriv, + "CREATE ROLE" -> MySQLPriv.CreateRolePriv, + "DROP ROLE" -> MySQLPriv.DropRolePriv, + "CREATE TEMPORARY TABLES" -> MySQLPriv.CreateTMPTablePriv, + "LOCK TABLES" -> MySQLPriv.LockTablesPriv, + "CREATE ROUTINE" -> MySQLPriv.CreateRoutinePriv, + "ALTER ROUTINE" -> MySQLPriv.AlterRoutinePriv, + "EVENT" -> MySQLPriv.EventPriv, + "SHUTDOWN" -> MySQLPriv.ShutdownPriv, + "RELOAD" -> MySQLPriv.ReloadPriv, + "FILE" -> MySQLPriv.FilePriv, + "CONFIG" -> MySQLPriv.ConfigPriv, + "USAGE" -> MySQLPriv.UsagePriv, + "REPLICATION CLIENT" -> MySQLPriv.ReplicationClientPriv, + "REPLICATION SLAVE" -> MySQLPriv.ReplicationSlavePriv, + "ALL PRIVILEGES" -> MySQLPriv.AllPriv)) +} diff --git a/core/src/main/scala/com/pingcap/tispark/auth/TiAuthorization.scala b/core/src/main/scala/com/pingcap/tispark/auth/TiAuthorization.scala new file mode 100644 index 0000000000..749c6d826d --- /dev/null +++ b/core/src/main/scala/com/pingcap/tispark/auth/TiAuthorization.scala @@ -0,0 +1,384 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.pingcap.tispark.auth + +import com.pingcap.tikv.TiConfiguration +import com.pingcap.tikv.jdbc.JDBCClient +import com.pingcap.tispark.auth.TiAuthorization.{ + logger, + parsePrivilegeFromRow, + refreshIntervalSecond +} +import com.pingcap.tispark.write.TiDBOptions +import org.apache.spark.sql.catalyst.util.CaseInsensitiveMap +import org.apache.spark.sql.internal.SQLConf +import org.slf4j.LoggerFactory + +import java.sql.SQLException +import java.util.Properties +import java.util.concurrent.atomic.AtomicReference +import java.util.concurrent.locks.ReentrantLock +import java.util.concurrent.{Executors, ScheduledExecutorService, TimeUnit} +import scala.collection.JavaConverters +import scala.util.control.Breaks.{break, breakable} + +case class TiAuthorization private (parameters: Map[String, String], tiConf: TiConfiguration) { + + private var jdbcClient: JDBCClient = _ + + private val scheduler: ScheduledExecutorService = + Executors.newScheduledThreadPool(1) + + val globalPrivs: AtomicReference[List[MySQLPriv.Value]] = + new AtomicReference(List.empty) + + val databasePrivs: AtomicReference[Map[String, List[MySQLPriv.Value]]] = + new AtomicReference(Map.empty) + + val tablePrivs: AtomicReference[Map[String, Map[String, List[MySQLPriv.Value]]]] = + new AtomicReference(Map.empty) + + val task: Runnable = () => { + val privs = getPrivileges + globalPrivs.set(privs.globalPriv) + databasePrivs.set(privs.databasePrivs) + tablePrivs.set(privs.tablePrivs) + } + + /** + * Initialization start + */ + TiAuthorization.dbPrefix = tiConf.getDBPrefix + val option = new TiDBOptions(parameters) + try { + this.jdbcClient = new JDBCClient(option.url, new Properties()) + } catch { + case e: Throwable => { + // Failed to create jdbcClient renders authentication impossible. Log and throw exception to shutdown spark session. + logger.error(f"Failed to create tidb jdbc client with url ${option.url}", e) + throw e + } + } + + val user: String = jdbcClient.getCurrentUser + + task.run() + // Periodically update privileges from TiDB + scheduler.scheduleWithFixedDelay( + task, + refreshIntervalSecond, + refreshIntervalSecond, + TimeUnit.SECONDS) + + /** + * Initialization end + */ + + def getPrivileges: PrivilegeObject = { + var input = JavaConverters.asScalaBuffer(jdbcClient.showGrants).toList + + /** TODO: role-based privilege + * + * Show grants using more than two roles return incorrect result + * https://github.com/pingcap/tidb/issues/30855 + * + * val roles = extractRoles(input) + * input = + * if (roles.nonEmpty) + * JavaConverters + * .asScalaBuffer( + * jdbcClient.showGrantsUsingRole(roles.asJava) + * ).toList + * else input + */ + + parsePrivilegeFromRow(input) + } + + def getPDAddress(): String = { + try { + jdbcClient.getPDAddress + } catch { + case e: Throwable => + throw new IllegalArgumentException( + "Failed to get pd addresses from TiDB, please make sure user has `PROCESS` privilege on `INFORMATION_SCHEMA`.`CLUSTER_INFO`", + e) + } + } + + /** + * globalPrivs stores privileges of global dimension for the current user. + * List($globalPrivileges) + */ + private def checkGlobalPiv(priv: MySQLPriv.Value): Boolean = { + val privs = globalPrivs.get() + privs.contains(MySQLPriv.AllPriv) || privs.contains(priv) + } + + /** + * databasePrivs stores privileges of database dimension for the current user. + * Map($databaseName -> List($databasePrivileges)) + */ + private def checkDatabasePiv(db: String, priv: MySQLPriv.Value): Boolean = { + val privs = databasePrivs.get().getOrElse(db, List.empty) + privs.contains(MySQLPriv.AllPriv) || privs.contains(priv) + } + + /** + * tablePrivs stores privileges of table dimension for the current user. + * Map($databaseName -> Map($tableName -> List($tablePrivileges))) + */ + private def checkTablePiv(db: String, table: String, priv: MySQLPriv.Value): Boolean = { + // If tablePrivs not contains the table, it will return an empty privilegeList for the table + val privs = + tablePrivs.get().getOrElse(db.trim, Map.empty).getOrElse(table.trim, List.empty) + privs.contains(MySQLPriv.AllPriv) || privs.contains(priv) + } + + /** + * Check whether user has the required privilege of database/table + * + * @param db the name of database + * @param table the name of table, is empty when check for privilege of database + * @param requiredPriv + * @return If the check not passes, throw @SQLException + */ + def checkPrivs( + db: String, + table: String, + requiredPriv: MySQLPriv.Value, + commandName: String): Unit = { + if (!checkGlobalPiv(requiredPriv) && !checkDatabasePiv(db, requiredPriv) && !checkTablePiv( + db, + table, + requiredPriv)) { + if (table.isEmpty) { + throw new SQLException(f"$commandName command denied to user $user for database $db") + } else { + throw new SQLException(f"$commandName command denied to user $user for table $db.$table") + } + } + } + + /** + * Check whether the database/table be visible for the user or not + * + * @param db the name of database + * @param table the name of table, is empty when check for privilege of database + * @return + */ + def visible(db: String, table: String): Boolean = { + // Account who has ShowDBPriv is able to see all databases and tables regardless of revokes. + if (globalPrivs.get().contains(MySQLPriv.AllPriv) || globalPrivs + .get() + .contains(MySQLPriv.ShowDBPriv)) { + return true + } + + // Account who has any Priv of the database/table can see the database/table + if (table.isEmpty) { + databasePrivs.get().contains(db) || tablePrivs + .get() + .contains(db) + } else { + databasePrivs.get().contains(db) || tablePrivs + .get() + .getOrElse(db, Map.empty) + .contains(table) + } + + } +} + +case class PrivilegeObject( + globalPriv: List[MySQLPriv.Value], + databasePrivs: Map[String, List[MySQLPriv.Value]], + tablePrivs: Map[String, Map[String, List[MySQLPriv.Value]]]) {} + +object TiAuthorization { + private final val logger = LoggerFactory.getLogger(getClass.getName) + private final val defaultInterval = 10 + private final val intervalUpperBound = 3600 + private final val intervalLowerBound = 5 + + /** + * the required conf for initialization. + * Must be set before the initialization. + */ + var sqlConf: SQLConf = _ + var tiConf: TiConfiguration = _ + + /** + * lazy global singleton for Authorization + * Use initTiAuthorization() to init singleton + */ + private[this] var _tiAuthorization: TiAuthorization = _ + @volatile private var initialized = false + private final val lock = new ReentrantLock() + + def tiAuthorization: Option[TiAuthorization] = { + if (!enableAuth) { + return Option.empty + } + if (!initialized) { + try { + lock.lock() + if (!initialized) { + _tiAuthorization = new TiAuthorization( + Map( + "tidb.addr" -> sqlConf.getConfString("spark.sql.tidb.addr"), + "tidb.port" -> sqlConf.getConfString("spark.sql.tidb.port"), + "tidb.user" -> sqlConf.getConfString("spark.sql.tidb.user"), + "tidb.password" -> sqlConf.getConfString("spark.sql.tidb.password"), + "multiTables" -> "true"), + tiConf) + initialized = true + Option(_tiAuthorization) + } else { + Option(_tiAuthorization) + } + } finally { + lock.unlock() + } + } else { + Option(_tiAuthorization) + } + } + + lazy val refreshIntervalSecond: Int = sqlConf + .getConfString("spark.sql.tidb.auth.refreshInterval", defaultInterval.toString) + .toInt + .max(intervalLowerBound) + .min(intervalUpperBound) + + var enableAuth: Boolean = false + + // Compatible with feature `spark.tispark.db_prefix` + var dbPrefix: String = "" + + /** Currently, There are 2 kinds of grant output format in TiDB: + * - GRANT [grants] ON [db.table] TO [user] + * - GRANT [roles] TO [user] + * Examples: + * - GRANT PROCESS,SHOW DATABASES,CONFIG ON *.* TO 'dashboardAdmin'@'%' + * - GRANT 'app_read'@'%' TO 'test'@'%' + * + * In order to get role's privilege: + * > SHOW GRANTS FOR ${user} USING ${role}; + */ + private val userGrantPattern = + "GRANT\\s+(.+)\\s+ON\\s+(\\S+\\.\\S+)\\s+TO.+".r + + def parsePrivilegeFromRow(privStrings: List[String]): PrivilegeObject = { + var globalPriv: List[MySQLPriv.Value] = List() + var databasePrivs: Map[String, List[MySQLPriv.Value]] = CaseInsensitiveMap(Map()) + var tablePrivs: Map[String, Map[String, List[MySQLPriv.Value]]] = CaseInsensitiveMap(Map()) + + for (elem <- privStrings) { + breakable { + val matchResult = userGrantPattern findFirstMatchIn elem + if (matchResult.isEmpty) { + break + } + + // use regex to parse [GRANTS](group1) and [db.table](group2) + val privs: List[MySQLPriv.Value] = matchResult.get + .group(1) + .split(",") + .map(m => { + MySQLPriv.Str2Priv(m.trim) + }) + .toList + val database: String = matchResult.get.group(2).split("\\.").head + val table: String = matchResult.get.group(2).split("\\.").last + + // generate privileges store objects + if (database == "*" && table == "*") { + globalPriv ++= privs + } else if (table == "*") { + databasePrivs += (f"$dbPrefix$database" -> privs) + } else { + val prevTable = + tablePrivs.getOrElse(f"$dbPrefix$database", CaseInsensitiveMap(Map())) + tablePrivs += (f"$dbPrefix$database" -> (prevTable + (table -> privs))) + } + } + } + + PrivilegeObject(globalPriv, databasePrivs, tablePrivs) + } + + private val roleGrantPattern = "GRANT\\s+('\\w+'@.+)+TO.+".r + private val rolePattern = "'(\\w+)'@.+".r + + def extractRoles(privStrings: List[String]): List[String] = { + for { + elem: String <- privStrings + matchResult = roleGrantPattern findFirstMatchIn elem + if matchResult.isDefined + roles = matchResult.get.group(1); + rawRole <- roles.split(",") + roleMatch = rolePattern findFirstMatchIn rawRole + if roleMatch.isDefined + role = roleMatch.get.group(1) + if role.trim.nonEmpty + } yield role.trim + } + + /** + * Authorization for statement + */ + def authorizeForSelect( + table: String, + database: String, + tiAuth: Option[TiAuthorization]): Unit = { + if (enableAuth) { + tiAuth.get.checkPrivs(database, table, MySQLPriv.SelectPriv, "SELECT") + } + } + + def authorizeForCreateTableLike( + targetDb: String, + targetTable: String, + sourceDb: String, + sourceTable: String, + tiAuth: Option[TiAuthorization]) = { + if (enableAuth) { + tiAuth.get.checkPrivs(targetDb, targetTable, MySQLPriv.CreatePriv, "CREATE") + tiAuth.get.checkPrivs(sourceDb, sourceTable, MySQLPriv.SelectPriv, "SELECT") + } + } + + def authorizeForSetDatabase(database: String, tiAuth: Option[TiAuthorization]) = { + if (enableAuth && !tiAuth.get.visible(database, "")) { + throw new SQLException(f"Access denied for user ${tiAuth.get.user} to database ${database}") + } + } + + def authorizeForDescribeTable( + table: String, + database: String, + tiAuth: Option[TiAuthorization]) = { + if (enableAuth && !tiAuth.get.visible(database, table)) + throw new SQLException( + f"SELECT command denied to user ${tiAuth.get.user} for table $database.$table") + } + + def checkVisible(db: String, table: String, tiAuth: Option[TiAuthorization]): Boolean = { + !enableAuth || tiAuth.get.visible(db, table) + } +} diff --git a/core/src/main/scala/com/pingcap/tispark/examples/OneJarTest.scala b/core/src/main/scala/com/pingcap/tispark/examples/OneJarTest.scala index 8e20cafb4a..16392d54a6 100644 --- a/core/src/main/scala/com/pingcap/tispark/examples/OneJarTest.scala +++ b/core/src/main/scala/com/pingcap/tispark/examples/OneJarTest.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/handler/CacheInvalidateEventHandler.scala b/core/src/main/scala/com/pingcap/tispark/handler/CacheInvalidateEventHandler.scala index 3284d125bf..f7f16e9334 100644 --- a/core/src/main/scala/com/pingcap/tispark/handler/CacheInvalidateEventHandler.scala +++ b/core/src/main/scala/com/pingcap/tispark/handler/CacheInvalidateEventHandler.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/main/scala/com/pingcap/tispark/listener/CacheInvalidateListener.scala b/core/src/main/scala/com/pingcap/tispark/listener/CacheInvalidateListener.scala index 6976e38541..4b97d90b45 100644 --- a/core/src/main/scala/com/pingcap/tispark/listener/CacheInvalidateListener.scala +++ b/core/src/main/scala/com/pingcap/tispark/listener/CacheInvalidateListener.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/main/scala/com/pingcap/tispark/listener/PDCacheInvalidateListener.scala b/core/src/main/scala/com/pingcap/tispark/listener/PDCacheInvalidateListener.scala index 87354447f3..60ed6d3a49 100644 --- a/core/src/main/scala/com/pingcap/tispark/listener/PDCacheInvalidateListener.scala +++ b/core/src/main/scala/com/pingcap/tispark/listener/PDCacheInvalidateListener.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/main/scala/com/pingcap/tispark/statistics/StatisticsHelper.scala b/core/src/main/scala/com/pingcap/tispark/statistics/StatisticsHelper.scala index 13e98eacfa..11843e2ef2 100644 --- a/core/src/main/scala/com/pingcap/tispark/statistics/StatisticsHelper.scala +++ b/core/src/main/scala/com/pingcap/tispark/statistics/StatisticsHelper.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/main/scala/com/pingcap/tispark/statistics/StatisticsManager.scala b/core/src/main/scala/com/pingcap/tispark/statistics/StatisticsManager.scala index 9ef807b25d..20bf82368c 100644 --- a/core/src/main/scala/com/pingcap/tispark/statistics/StatisticsManager.scala +++ b/core/src/main/scala/com/pingcap/tispark/statistics/StatisticsManager.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/main/scala/com/pingcap/tispark/statistics/estimate/TableSizeEstimator.scala b/core/src/main/scala/com/pingcap/tispark/statistics/estimate/TableSizeEstimator.scala index 6134a6cdee..0f316b712b 100644 --- a/core/src/main/scala/com/pingcap/tispark/statistics/estimate/TableSizeEstimator.scala +++ b/core/src/main/scala/com/pingcap/tispark/statistics/estimate/TableSizeEstimator.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/main/scala/com/pingcap/tispark/utils/ReflectionUtil.scala b/core/src/main/scala/com/pingcap/tispark/utils/ReflectionUtil.scala index 136915c994..f83aed5a5a 100644 --- a/core/src/main/scala/com/pingcap/tispark/utils/ReflectionUtil.scala +++ b/core/src/main/scala/com/pingcap/tispark/utils/ReflectionUtil.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/utils/TiUtil.scala b/core/src/main/scala/com/pingcap/tispark/utils/TiUtil.scala index e0f6d9737f..71b62f1cc2 100644 --- a/core/src/main/scala/com/pingcap/tispark/utils/TiUtil.scala +++ b/core/src/main/scala/com/pingcap/tispark/utils/TiUtil.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/v2/TiDBTable.scala b/core/src/main/scala/com/pingcap/tispark/v2/TiDBTable.scala new file mode 100644 index 0000000000..c145f5c72a --- /dev/null +++ b/core/src/main/scala/com/pingcap/tispark/v2/TiDBTable.scala @@ -0,0 +1,202 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.pingcap.tispark.v2 + +import com.pingcap.tikv.TiSession +import com.pingcap.tikv.exception.TiBatchWriteException +import com.pingcap.tikv.key.Handle +import com.pingcap.tikv.meta.{TiDAGRequest, TiTableInfo, TiTimestamp} +import com.pingcap.tispark.utils.TiUtil +import com.pingcap.tispark.v2.TiDBTable.{getDagRequestToRegionTaskExec, getLogicalPlanToRDD} +import com.pingcap.tispark.v2.sink.TiDBWriterBuilder +import com.pingcap.tispark.write.TiDBOptions +import com.pingcap.tispark.TiTableReference +import org.apache.spark.sql.catalyst.expressions.{Attribute, AttributeReference} +import org.apache.spark.sql.connector.catalog.{SupportsRead, SupportsWrite, TableCapability} +import org.apache.spark.sql.connector.read.ScanBuilder +import org.apache.spark.sql.connector.write.{LogicalWriteInfo, WriteBuilder} +import org.apache.spark.sql.execution.{ColumnarCoprocessorRDD, SparkPlan} +import org.apache.spark.sql.tispark.{TiHandleRDD, TiRowRDD} +import org.apache.spark.sql.types._ +import org.apache.spark.sql.util.CaseInsensitiveStringMap +import org.apache.spark.sql.{SQLContext, execution} + +import java.util +import java.util.Collections +import scala.collection.mutable.ListBuffer +import collection.JavaConverters._ + +case class TiDBTable( + session: TiSession, + tableRef: TiTableReference, + table: TiTableInfo, + var ts: TiTimestamp = null, + options: Option[TiDBOptions] = None)(@transient val sqlContext: SQLContext) + extends SupportsRead + with SupportsWrite { + + implicit class IdentifierHelper(identifier: TiTableReference) { + def quoted: String = { + Seq(identifier.databaseName, identifier.tableName).map(quote).mkString(".") + } + private def quote(part: String): String = { + if (part.contains(".") || part.contains("`")) { + s"`${part.replace("`", "``")}`" + } else { + part + } + } + } + + override lazy val schema: StructType = TiUtil.getSchemaFromTable(table) + + override lazy val properties: util.Map[String, String] = { + if (options.isEmpty) { + Collections.emptyMap() + } else { + options.get.parameters.toMap.asJava + } + } + + lazy val isTiFlashReplicaAvailable: Boolean = { + // Note: + // - INFORMATION_SCHEMA.TIFLASH_REPLICA is not present in TiKV or PD, + // it is calculated in TiDB and stored in memory. + // - In order to get those helpful information we have to read them from + // either TiKV or PD and keep them in memory as well. + // + // select * from INFORMATION_SCHEMA.TIFLASH_REPLICA where table_id = $id + // TABLE_SCHEMA, TABLE_NAME, TABLE_ID, REPLICA_COUNT, LOCATION_LABELS, AVAILABLE, PROGRESS + table.getTiflashReplicaInfo != null && table.getTiflashReplicaInfo.isAvailable + } + + def databaseName: String = tableRef.databaseName + def tableName: String = tableRef.tableName + + override def newScanBuilder(options: CaseInsensitiveStringMap): ScanBuilder = + () => () => schema + + override def name(): String = tableRef.quoted + + override def capabilities(): util.Set[TableCapability] = { + val capabilities = new util.HashSet[TableCapability] + capabilities.add(TableCapability.BATCH_READ) + capabilities.add(TableCapability.V1_BATCH_WRITE) + capabilities + } + + override def toString: String = s"TiDBTable($name)" + + def dagRequestToRegionTaskExec(dagRequest: TiDAGRequest, output: Seq[Attribute]): SparkPlan = { + getDagRequestToRegionTaskExec(dagRequest, output, session, sqlContext, tableRef) + } + + def logicalPlanToRDD(dagRequest: TiDAGRequest, output: Seq[Attribute]): List[TiRowRDD] = { + getLogicalPlanToRDD(dagRequest, output, session, sqlContext, tableRef) + } + + override def newWriteBuilder(info: LogicalWriteInfo): WriteBuilder = { + var scalaMap = info.options().asScala.toMap + // TODO https://github.com/pingcap/tispark/issues/2269 we need to move TiDB dependencies which will block insert SQL. + // if we don't support it before release, insert SQL should throw exception in catalyst + if (scalaMap.isEmpty) { + throw new TiBatchWriteException("tidbOption is neccessary.") + } + // Support df.writeto: need add db and table for write + if (!scalaMap.contains("database")) { + scalaMap += ("database" -> databaseName) + } + if (!scalaMap.contains("table")) { + scalaMap += ("table" -> tableName) + } + // Get TiDBOptions + val tiDBOptions = new TiDBOptions(scalaMap) + TiDBWriterBuilder(info, tiDBOptions, sqlContext) + } +} + +object TiDBTable { + + private def getDagRequestToRegionTaskExec( + dagRequest: TiDAGRequest, + output: Seq[Attribute], + session: TiSession, + sqlContext: SQLContext, + tableRef: TiTableReference): SparkPlan = { + import scala.collection.JavaConverters._ + val ids = dagRequest.getPrunedPhysicalIds.asScala + val tiHandleRDDs = new ListBuffer[TiHandleRDD]() + lazy val attributeRef = Seq( + AttributeReference("RegionId", LongType, nullable = false, Metadata.empty)(), + AttributeReference( + "Handles", + ArrayType(ObjectType(classOf[Handle]), containsNull = false), + nullable = false, + Metadata.empty)()) + val tiConf = session.getConf + tiConf.setPartitionPerSplit(TiUtil.getPartitionPerSplit(sqlContext)) + ids.foreach(id => { + tiHandleRDDs += + new TiHandleRDD( + dagRequest, + id, + attributeRef, + tiConf, + tableRef, + session, + sqlContext.sparkSession) + }) + + // TODO: we may optimize by partitioning the result by region. + // https://github.com/pingcap/tispark/issues/1200 + val handlePlan = ColumnarCoprocessorRDD(attributeRef, tiHandleRDDs.toList, fetchHandle = true) + execution.ColumnarRegionTaskExec( + handlePlan, + output, + TiUtil.getChunkBatchSize(sqlContext), + dagRequest, + session.getConf, + session.getTimestamp, + session, + sqlContext.sparkSession) + } + + private def getLogicalPlanToRDD( + dagRequest: TiDAGRequest, + output: Seq[Attribute], + session: TiSession, + sqlContext: SQLContext, + tableRef: TiTableReference): List[TiRowRDD] = { + import scala.collection.JavaConverters._ + val ids = dagRequest.getPrunedPhysicalIds.asScala + val tiRDDs = new ListBuffer[TiRowRDD] + val tiConf = session.getConf + tiConf.setPartitionPerSplit(TiUtil.getPartitionPerSplit(sqlContext)) + ids.foreach(id => { + tiRDDs += new TiRowRDD( + dagRequest.copyReqWithPhysicalId(id), + id, + TiUtil.getChunkBatchSize(sqlContext), + tiConf, + output, + tableRef, + session, + sqlContext.sparkSession) + }) + tiRDDs.toList + } +} diff --git a/core/src/main/scala/com/pingcap/tispark/v2/TiDBTableProvider.scala b/core/src/main/scala/com/pingcap/tispark/v2/TiDBTableProvider.scala new file mode 100644 index 0000000000..26872e2ac9 --- /dev/null +++ b/core/src/main/scala/com/pingcap/tispark/v2/TiDBTableProvider.scala @@ -0,0 +1,87 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.pingcap.tispark.v2 + +import com.pingcap.tikv.exception.TiBatchWriteException +import com.pingcap.tispark.TiDBRelation +import com.pingcap.tispark.write.{TiDBOptions, TiDBWriter} +import org.apache.spark.sql.catalyst.analysis.NoSuchTableException +import org.apache.spark.sql.{DataFrame, SQLContext, SaveMode, SparkSession, TiExtensions} +import org.apache.spark.sql.connector.catalog.{Identifier, Table, TableProvider} +import org.apache.spark.sql.connector.expressions.Transform +import org.apache.spark.sql.sources.{BaseRelation, CreatableRelationProvider, DataSourceRegister} +import org.apache.spark.sql.types.StructType +import org.apache.spark.sql.util.CaseInsensitiveStringMap + +import java.util +import scala.collection.JavaConverters._ + +class TiDBTableProvider + extends TableProvider + with DataSourceRegister + with CreatableRelationProvider { + override def inferSchema(options: CaseInsensitiveStringMap): StructType = { + getTable(null, Array.empty[Transform], options.asCaseSensitiveMap()).schema() + } + + override def getTable( + schema: StructType, + partitioning: Array[Transform], + properties: util.Map[String, String]): Table = { + + val scalaMap = properties.asScala.toMap + val mergeOptions = new TiDBOptions(scalaMap) + val sparkSession = SparkSession.active + + TiExtensions.getTiContext(sparkSession) match { + case Some(tiContext) => + val ts = tiContext.tiSession.getTimestamp + val tiTableRef = mergeOptions.getTiTableRef(tiContext.tiConf) + val table = tiContext.meta + .getTable(tiTableRef.databaseName, tiTableRef.tableName) + .getOrElse( + throw new NoSuchTableException(tiTableRef.databaseName, tiTableRef.tableName)) + TiDBTable(tiContext.tiSession, tiTableRef, table, ts, Some(mergeOptions))( + sparkSession.sqlContext) + case None => throw new TiBatchWriteException("TiExtensions is disable!") + } + } + + override def shortName(): String = "tidb" + + def extractIdentifier(options: CaseInsensitiveStringMap): Identifier = { + require(options.get("database") != null, "Option 'database' is required.") + require(options.get("table") != null, "Option 'table' is required.") + Identifier.of(Array(options.get("database")), options.get("table")) + } + + def extractCatalog(options: CaseInsensitiveStringMap): String = { + "tidb_catalog" + } + + // DF.write still go v1 path now + // Because v2 path will go through catalyst, which may block something like datatype convert. + override def createRelation( + sqlContext: SQLContext, + mode: SaveMode, + parameters: Map[String, String], + data: DataFrame): BaseRelation = { + val options = new TiDBOptions(parameters) + TiDBWriter.write(data, sqlContext, mode, options) + TiDBRelation(sqlContext) + } +} diff --git a/core/src/main/scala/com/pingcap/tispark/v2/sink/TiDBBatchWrite.scala b/core/src/main/scala/com/pingcap/tispark/v2/sink/TiDBBatchWrite.scala new file mode 100644 index 0000000000..8c8f481ddd --- /dev/null +++ b/core/src/main/scala/com/pingcap/tispark/v2/sink/TiDBBatchWrite.scala @@ -0,0 +1,35 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.pingcap.tispark.v2.sink + +import com.pingcap.tispark.write.TiDBOptions +import org.apache.spark.sql.TiContext +import org.apache.spark.sql.connector.write._ + +/** + * Use V1WriteBuilder before turn to v2 + */ +case class TiDBBatchWrite(logicalInfo: LogicalWriteInfo, tiDBOptions: TiDBOptions)( + @transient val tiContext: TiContext) + extends BatchWrite { + override def createBatchWriterFactory(info: PhysicalWriteInfo): DataWriterFactory = + TiDBDataWriterFactory(logicalInfo.schema(), tiDBOptions, tiContext.tiConf) + + override def commit(messages: Array[WriterCommitMessage]): Unit = ??? + + override def abort(messages: Array[WriterCommitMessage]): Unit = ??? +} diff --git a/core/src/main/scala/com/pingcap/tispark/v2/sink/TiDBDataWrite.scala b/core/src/main/scala/com/pingcap/tispark/v2/sink/TiDBDataWrite.scala new file mode 100644 index 0000000000..e05ba25ed6 --- /dev/null +++ b/core/src/main/scala/com/pingcap/tispark/v2/sink/TiDBDataWrite.scala @@ -0,0 +1,49 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.pingcap.tispark.v2.sink + +import com.pingcap.tikv.TiConfiguration +import com.pingcap.tispark.write.TiDBOptions +import org.apache.spark.sql.Row +import org.apache.spark.sql.catalyst.InternalRow +import org.apache.spark.sql.connector.write.{DataWriter, WriterCommitMessage} +import org.apache.spark.sql.types.StructType + +/** + * Use V1WriteBuilder before turn to v2 + */ +case class TiDBDataWrite( + partitionId: Int, + taskId: Long, + schema: StructType, + tiDBOptions: TiDBOptions, + ticonf: TiConfiguration) + extends DataWriter[InternalRow] { + + override def write(record: InternalRow): Unit = { + val row = Row.fromSeq(record.toSeq(schema)) + ??? + } + + override def commit(): WriterCommitMessage = ??? + + override def abort(): Unit = {} + + override def close(): Unit = {} +} + +object WriteSucceeded extends WriterCommitMessage diff --git a/core/src/main/scala/com/pingcap/tispark/v2/sink/TiDBDataWriterFactory.scala b/core/src/main/scala/com/pingcap/tispark/v2/sink/TiDBDataWriterFactory.scala new file mode 100644 index 0000000000..ecbe10c0d8 --- /dev/null +++ b/core/src/main/scala/com/pingcap/tispark/v2/sink/TiDBDataWriterFactory.scala @@ -0,0 +1,36 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.pingcap.tispark.v2.sink + +import com.pingcap.tikv.TiConfiguration +import com.pingcap.tispark.write.TiDBOptions +import org.apache.spark.sql.catalyst.InternalRow +import org.apache.spark.sql.connector.write.{DataWriter, DataWriterFactory} +import org.apache.spark.sql.types.StructType + +/** + * Use V1WriteBuilder before turn to v2 + */ +case class TiDBDataWriterFactory( + schema: StructType, + tiDBOptions: TiDBOptions, + ticonf: TiConfiguration) + extends DataWriterFactory { + + override def createWriter(partitionId: Int, taskId: Long): DataWriter[InternalRow] = + TiDBDataWrite(partitionId, taskId, schema, tiDBOptions, ticonf) +} diff --git a/core/src/main/scala/com/pingcap/tispark/v2/sink/TiDBWriterBuilder.scala b/core/src/main/scala/com/pingcap/tispark/v2/sink/TiDBWriterBuilder.scala new file mode 100644 index 0000000000..bb488b086f --- /dev/null +++ b/core/src/main/scala/com/pingcap/tispark/v2/sink/TiDBWriterBuilder.scala @@ -0,0 +1,42 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.pingcap.tispark.v2.sink + +import com.pingcap.tispark.write.{TiDBOptions, TiDBWriter} +import org.apache.spark.sql.{DataFrame, SQLContext, SaveMode} +import org.apache.spark.sql.connector.write.{LogicalWriteInfo, V1WriteBuilder} +import org.apache.spark.sql.sources.InsertableRelation + +case class TiDBWriterBuilder( + info: LogicalWriteInfo, + tiDBOptions: TiDBOptions, + sqlContext: SQLContext) + extends V1WriteBuilder { + + // Use V1WriteBuilder before turn to v2 + override def buildForV1Write(): InsertableRelation = { (data: DataFrame, overwrite: Boolean) => + { + val saveMode = if (overwrite) { + SaveMode.Overwrite + } else { + SaveMode.Append + } + TiDBWriter.write(data, sqlContext, saveMode, tiDBOptions) + } + } + +} diff --git a/core/src/main/scala/com/pingcap/tispark/write/DBTable.scala b/core/src/main/scala/com/pingcap/tispark/write/DBTable.scala index aeadc4b5e0..74b040ea1e 100644 --- a/core/src/main/scala/com/pingcap/tispark/write/DBTable.scala +++ b/core/src/main/scala/com/pingcap/tispark/write/DBTable.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/write/EncodedKVPair.scala b/core/src/main/scala/com/pingcap/tispark/write/EncodedKVPair.scala index 1cee845f56..459461f9be 100644 --- a/core/src/main/scala/com/pingcap/tispark/write/EncodedKVPair.scala +++ b/core/src/main/scala/com/pingcap/tispark/write/EncodedKVPair.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/write/SerializableKey.scala b/core/src/main/scala/com/pingcap/tispark/write/SerializableKey.scala index 4c868d7b7e..6ae4674161 100644 --- a/core/src/main/scala/com/pingcap/tispark/write/SerializableKey.scala +++ b/core/src/main/scala/com/pingcap/tispark/write/SerializableKey.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/write/TiBatchWrite.scala b/core/src/main/scala/com/pingcap/tispark/write/TiBatchWrite.scala index 332ac6291b..e402b363d1 100644 --- a/core/src/main/scala/com/pingcap/tispark/write/TiBatchWrite.scala +++ b/core/src/main/scala/com/pingcap/tispark/write/TiBatchWrite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/write/TiBatchWriteTable.scala b/core/src/main/scala/com/pingcap/tispark/write/TiBatchWriteTable.scala index 16fe748168..86f781ee76 100644 --- a/core/src/main/scala/com/pingcap/tispark/write/TiBatchWriteTable.scala +++ b/core/src/main/scala/com/pingcap/tispark/write/TiBatchWriteTable.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/write/TiDBOptions.scala b/core/src/main/scala/com/pingcap/tispark/write/TiDBOptions.scala index 1c75543f5f..a3a11c3251 100644 --- a/core/src/main/scala/com/pingcap/tispark/write/TiDBOptions.scala +++ b/core/src/main/scala/com/pingcap/tispark/write/TiDBOptions.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/write/TiDBWriter.scala b/core/src/main/scala/com/pingcap/tispark/write/TiDBWriter.scala index 3216d75445..aaa0e42f8e 100644 --- a/core/src/main/scala/com/pingcap/tispark/write/TiDBWriter.scala +++ b/core/src/main/scala/com/pingcap/tispark/write/TiDBWriter.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/write/TiReginSplitPartitioner.scala b/core/src/main/scala/com/pingcap/tispark/write/TiReginSplitPartitioner.scala index f7ddd96e40..d5b7e6bd3e 100644 --- a/core/src/main/scala/com/pingcap/tispark/write/TiReginSplitPartitioner.scala +++ b/core/src/main/scala/com/pingcap/tispark/write/TiReginSplitPartitioner.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/write/WrappedEncodedRow.scala b/core/src/main/scala/com/pingcap/tispark/write/WrappedEncodedRow.scala index 42c4e37a7a..3c715ec5ef 100644 --- a/core/src/main/scala/com/pingcap/tispark/write/WrappedEncodedRow.scala +++ b/core/src/main/scala/com/pingcap/tispark/write/WrappedEncodedRow.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/com/pingcap/tispark/write/WrappedRow.scala b/core/src/main/scala/com/pingcap/tispark/write/WrappedRow.scala index c6430c8b02..603b28c696 100644 --- a/core/src/main/scala/com/pingcap/tispark/write/WrappedRow.scala +++ b/core/src/main/scala/com/pingcap/tispark/write/WrappedRow.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/org/apache/spark/sql/TiAggregation.scala b/core/src/main/scala/org/apache/spark/sql/TiAggregation.scala index b7f265c56c..5bb1388e16 100644 --- a/core/src/main/scala/org/apache/spark/sql/TiAggregation.scala +++ b/core/src/main/scala/org/apache/spark/sql/TiAggregation.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/org/apache/spark/sql/TiContext.scala b/core/src/main/scala/org/apache/spark/sql/TiContext.scala index b765b468e6..df2f0eee41 100644 --- a/core/src/main/scala/org/apache/spark/sql/TiContext.scala +++ b/core/src/main/scala/org/apache/spark/sql/TiContext.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/org/apache/spark/sql/TiExtensions.scala b/core/src/main/scala/org/apache/spark/sql/TiExtensions.scala index 25c5a05956..3f2dc5db4d 100644 --- a/core/src/main/scala/org/apache/spark/sql/TiExtensions.scala +++ b/core/src/main/scala/org/apache/spark/sql/TiExtensions.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/org/apache/spark/sql/TiStrategy.scala b/core/src/main/scala/org/apache/spark/sql/TiStrategy.scala index 9d49a25bc9..572661a221 100644 --- a/core/src/main/scala/org/apache/spark/sql/TiStrategy.scala +++ b/core/src/main/scala/org/apache/spark/sql/TiStrategy.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/org/apache/spark/sql/catalyst/analyzer/TiAuthRuleFactory.scala b/core/src/main/scala/org/apache/spark/sql/catalyst/analyzer/TiAuthRuleFactory.scala new file mode 100644 index 0000000000..a818176eef --- /dev/null +++ b/core/src/main/scala/org/apache/spark/sql/catalyst/analyzer/TiAuthRuleFactory.scala @@ -0,0 +1,42 @@ +/* + * Copyright 2018 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.spark.sql.catalyst.analyzer + +import com.pingcap.tikv.TiConfiguration +import com.pingcap.tispark.auth.TiAuthorization +import com.pingcap.tispark.utils.TiUtil +import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan +import org.apache.spark.sql.catalyst.rules.Rule +import org.apache.spark.sql.{SparkSession, TiContext, TiExtensions} +import org.slf4j.LoggerFactory + +class TiAuthRuleFactory(getOrCreateTiContext: SparkSession => TiContext) + extends (SparkSession => Rule[LogicalPlan]) { + private val logger = LoggerFactory.getLogger(getClass.getName) + override def apply(sparkSession: SparkSession): Rule[LogicalPlan] = { + TiExtensions.validateCatalog(sparkSession) + if (TiExtensions.authEnable(sparkSession)) { + logger.info("TiSpark running in auth mode") + TiAuthorization.enableAuth = true + TiAuthorization.sqlConf = sparkSession.sqlContext.conf + TiAuthorization.tiConf = + TiUtil.sparkConfToTiConfWithoutPD(sparkSession.sparkContext.conf, new TiConfiguration()) + } else { + TiAuthorization.enableAuth = false + } + TiAuthorizationRule(getOrCreateTiContext)(sparkSession) + } +} \ No newline at end of file diff --git a/core/src/main/scala/org/apache/spark/sql/catalyst/analyzer/TiAuthorizationRule.scala b/core/src/main/scala/org/apache/spark/sql/catalyst/analyzer/TiAuthorizationRule.scala new file mode 100644 index 0000000000..0fdf23b739 --- /dev/null +++ b/core/src/main/scala/org/apache/spark/sql/catalyst/analyzer/TiAuthorizationRule.scala @@ -0,0 +1,65 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark.sql.catalyst.analyzer + +import com.pingcap.tispark.MetaManager +import com.pingcap.tispark.auth.TiAuthorization +import org.apache.spark.sql.catalyst.plans.logical.{ + LogicalPlan, + SetCatalogAndNamespace, + SubqueryAlias +} +import org.apache.spark.sql.catalyst.rules.Rule +import org.apache.spark.sql.{SparkSession, TiContext} +import org.slf4j.LoggerFactory + +/** + * Only work for table v2(catalog plugin) + */ +case class TiAuthorizationRule(getOrCreateTiContext: SparkSession => TiContext)( + sparkSession: SparkSession) + extends Rule[LogicalPlan] { + + protected lazy val meta: MetaManager = tiContext.meta + protected val tiContext: TiContext = getOrCreateTiContext(sparkSession) + private lazy val tiAuthorization: Option[TiAuthorization] = tiContext.tiAuthorization + private val logger = LoggerFactory.getLogger(getClass.getName) + + protected def checkForAuth: PartialFunction[LogicalPlan, LogicalPlan] = { + case sa @ SubqueryAlias(identifier, child) => + if (identifier.qualifier.nonEmpty) { + TiAuthorization.authorizeForSelect( + identifier.name, + identifier.qualifier.last, + tiAuthorization) + } + sa + case sd @ SetCatalogAndNamespace(catalogManager, catalogName, namespace) => + if (namespace.isDefined) { + namespace.get + .foreach(TiAuthorization.authorizeForSetDatabase(_, tiAuthorization)) + } + sd + } + + override def apply(plan: LogicalPlan): LogicalPlan = + if (TiAuthorization.enableAuth) { + plan transformUp checkForAuth + } else { + plan + } +} diff --git a/core/src/main/scala/org/apache/spark/sql/catalyst/catalog/TiCatalog.scala b/core/src/main/scala/org/apache/spark/sql/catalyst/catalog/TiCatalog.scala new file mode 100644 index 0000000000..56acb7dc75 --- /dev/null +++ b/core/src/main/scala/org/apache/spark/sql/catalyst/catalog/TiCatalog.scala @@ -0,0 +1,176 @@ +/* + * Copyright 2020 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark.sql.catalyst.catalog + +import com.pingcap.tikv.{TiConfiguration, TiSession} +import com.pingcap.tispark.{MetaManager, TiTableReference} +import com.pingcap.tispark.auth.TiAuthorization +import com.pingcap.tispark.v2.TiDBTable +import org.apache.spark.sql.SparkSession +import org.apache.spark.sql.catalyst.analysis.{NoSuchNamespaceException, NoSuchTableException} +import org.apache.spark.sql.connector.catalog._ +import org.apache.spark.sql.connector.expressions.Transform +import org.apache.spark.sql.types.StructType +import org.apache.spark.sql.util.CaseInsensitiveStringMap +import org.slf4j.LoggerFactory + +import java.util + +object TiCatalog { + val className = { + val fullname = getClass.getName + fullname.substring(0, fullname.length - 1) + } +} + +class TiCatalog extends TableCatalog with SupportsNamespaces { + private var tiSession: Option[TiSession] = None + private var meta: Option[MetaManager] = None + private var _name: Option[String] = None + private var _current_namespace: Option[Array[String]] = None + private val logger = LoggerFactory.getLogger(getClass.getName) + private lazy final val tiAuthorization: Option[TiAuthorization] = + TiAuthorization.tiAuthorization + def setCurrentNamespace(namespace: Option[Array[String]]): Unit = + synchronized { + _current_namespace = namespace + } + + override def initialize(name: String, options: CaseInsensitiveStringMap): Unit = { + _name = Some(name) + + val pdAddress: String = + if (TiAuthorization.enableAuth) { + tiAuthorization.get.getPDAddress() + } else { + if (!options.containsKey("pd.addresses") && !options.containsKey("pd.address")) { + throw new Exception("missing configuration spark.sql.catalog.tidb_catalog.pd.addresses") + } + options.getOrDefault("pd.addresses", options.get("pd.address")) + } + + logger.info(s"Initialize TiCatalog with name: $name, pd address: $pdAddress") + val conf = TiConfiguration.createDefault(pdAddress) + val session = TiSession.getInstance(conf) + meta = Some(new MetaManager(session.getCatalog)) + tiSession = Some(session) + } + + override def name(): String = _name.get + + override def namespaceExists(namespace: Array[String]): Boolean = + namespace match { + case Array(db) => + meta.get.getDatabase(db).isDefined + case _ => + false + } + + override def listNamespaces(): Array[Array[String]] = + meta.get.getDatabases + .filter(db => TiAuthorization.checkVisible(db.getName, "", tiAuthorization)) + .map(dbInfo => Array(dbInfo.getName)) + .toArray + + override def listNamespaces(namespace: Array[String]): Array[Array[String]] = { + namespace match { + case Array() => + listNamespaces() + case Array(db) if meta.get.getDatabase(db).isDefined => + Array() + case _ => + throw new NoSuchNamespaceException(namespace) + } + } + + override def loadNamespaceMetadata(namespace: Array[String]): util.Map[String, String] = { + namespace match { + case Array(db) => + if (meta.get.getDatabase(db).isDefined) { + new util.HashMap[String, String]() + } else { + throw new NoSuchNamespaceException(namespace) + } + case _ => + throw new NoSuchNamespaceException(namespace) + } + } + + override def loadTable(ident: Identifier): Table = { + val currentNS = + ident.namespace() match { + case Array(_) => ident.namespace() + case _ => + _current_namespace.getOrElse(this.defaultNamespace()) + } + + val dbName = + currentNS match { + case Array(db) => db + case _ => throw new NoSuchTableException(ident) + } + + TiAuthorization.authorizeForDescribeTable(ident.name, dbName, tiAuthorization) + + val table = meta.get + .getTable(dbName, ident.name) + .getOrElse(throw new NoSuchTableException(dbName, ident.name)) + + TiDBTable(tiSession.get, TiTableReference(dbName, ident.name), table)( + SparkSession.active.sqlContext) + } + + override def listTables(namespace: Array[String]): Array[Identifier] = { + namespace match { + case Array(db) => + meta.get + .getTables(meta.get.getDatabase(db).getOrElse(throw new NoSuchNamespaceException(db))) + .filter(tbl => TiAuthorization.checkVisible(db, tbl.getName, tiAuthorization)) + .map(tbl => Identifier.of(Array(db), tbl.getName)) + .toArray + case _ => + throw new NoSuchNamespaceException(namespace) + } + } + + // todo add table cache and invalidate the cached table + override def invalidateTable(ident: Identifier): Unit = super.invalidateTable(ident) + + override def toString: String = s"TiCatalog($name)" + + // Following are unimplemented. + override def createTable( + ident: Identifier, + schema: StructType, + partitions: Array[Transform], + properties: java.util.Map[String, String]): Table = ??? + + override def alterTable(ident: Identifier, changes: TableChange*): Table = ??? + + override def dropTable(ident: Identifier): Boolean = ??? + + override def renameTable(oldIdent: Identifier, newIdent: Identifier): Unit = ??? + + override def dropNamespace(namespace: Array[String]): Boolean = ??? + + override def createNamespace( + namespace: Array[String], + metadata: util.Map[String, String]): Unit = + ??? + + override def alterNamespace(namespace: Array[String], changes: NamespaceChange*): Unit = ??? +} diff --git a/core/src/main/scala/org/apache/spark/sql/catalyst/expressions/BasicExpression.scala b/core/src/main/scala/org/apache/spark/sql/catalyst/expressions/BasicExpression.scala index 68bef935fc..e579a3e726 100644 --- a/core/src/main/scala/org/apache/spark/sql/catalyst/expressions/BasicExpression.scala +++ b/core/src/main/scala/org/apache/spark/sql/catalyst/expressions/BasicExpression.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/main/scala/org/apache/spark/sql/catalyst/expressions/TiExprUtils.scala b/core/src/main/scala/org/apache/spark/sql/catalyst/expressions/TiExprUtils.scala index 8f4a0af889..159c89eb24 100644 --- a/core/src/main/scala/org/apache/spark/sql/catalyst/expressions/TiExprUtils.scala +++ b/core/src/main/scala/org/apache/spark/sql/catalyst/expressions/TiExprUtils.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/SpecialSum.scala b/core/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/SpecialSum.scala index 5fd0fd2822..9a525afaf5 100644 --- a/core/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/SpecialSum.scala +++ b/core/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/SpecialSum.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/org/apache/spark/sql/catalyst/planner/TiAggregation.scala b/core/src/main/scala/org/apache/spark/sql/catalyst/planner/TiAggregation.scala new file mode 100644 index 0000000000..15d477f9d0 --- /dev/null +++ b/core/src/main/scala/org/apache/spark/sql/catalyst/planner/TiAggregation.scala @@ -0,0 +1,28 @@ +/* + * Copyright 2022 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark.sql.catalyst.planner + +import org.apache.spark.sql.catalyst.expressions.NamedExpression +import org.apache.spark.sql.catalyst.expressions.aggregate.AggregateExpression +import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan + +object TiAggregation { + type ReturnType = + (Seq[NamedExpression], Seq[AggregateExpression], Seq[NamedExpression], LogicalPlan) + + def unapply(plan: LogicalPlan): Option[ReturnType] = TiAggregationImpl.unapply(plan) +} diff --git a/core/src/main/scala/org/apache/spark/sql/catalyst/planner/TiStrategyFactory.scala b/core/src/main/scala/org/apache/spark/sql/catalyst/planner/TiStrategyFactory.scala new file mode 100644 index 0000000000..b47b05cacf --- /dev/null +++ b/core/src/main/scala/org/apache/spark/sql/catalyst/planner/TiStrategyFactory.scala @@ -0,0 +1,32 @@ +/* + * Copyright 2022 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark.sql.catalyst.planner + +import com.pingcap.tispark.utils.ReflectionUtil +import org.apache.spark.sql.{SparkSession, Strategy, TiContext, TiExtensions} + +/** + * The logical plan DataSourceV2ScanRelation is different in spark 3.0 and 3.1 + * @param getOrCreateTiContext + */ +class TiStrategyFactory(getOrCreateTiContext: SparkSession => TiContext) + extends (SparkSession => Strategy) { + override def apply(sparkSession: SparkSession): Strategy = { + TiExtensions.validateCatalog(sparkSession) + ReflectionUtil.newTiStrategy(getOrCreateTiContext, sparkSession) + } +} diff --git a/core/src/main/scala/org/apache/spark/sql/execution/CoprocessorRDD.scala b/core/src/main/scala/org/apache/spark/sql/execution/CoprocessorRDD.scala index e00d769459..ca9f15174f 100644 --- a/core/src/main/scala/org/apache/spark/sql/execution/CoprocessorRDD.scala +++ b/core/src/main/scala/org/apache/spark/sql/execution/CoprocessorRDD.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/org/apache/spark/sql/execution/TiConverter.scala b/core/src/main/scala/org/apache/spark/sql/execution/TiConverter.scala index 575207c440..fa77cf3cea 100644 --- a/core/src/main/scala/org/apache/spark/sql/execution/TiConverter.scala +++ b/core/src/main/scala/org/apache/spark/sql/execution/TiConverter.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/org/apache/spark/sql/tispark/TiHandleRDD.scala b/core/src/main/scala/org/apache/spark/sql/tispark/TiHandleRDD.scala index ab569521d5..8bb9b2037c 100644 --- a/core/src/main/scala/org/apache/spark/sql/tispark/TiHandleRDD.scala +++ b/core/src/main/scala/org/apache/spark/sql/tispark/TiHandleRDD.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/org/apache/spark/sql/tispark/TiRDD.scala b/core/src/main/scala/org/apache/spark/sql/tispark/TiRDD.scala index 2c17ef8ed2..61084ef805 100644 --- a/core/src/main/scala/org/apache/spark/sql/tispark/TiRDD.scala +++ b/core/src/main/scala/org/apache/spark/sql/tispark/TiRDD.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/main/scala/org/apache/spark/sql/tispark/TiRowRDD.scala b/core/src/main/scala/org/apache/spark/sql/tispark/TiRowRDD.scala index f2435236ff..ded6469929 100644 --- a/core/src/main/scala/org/apache/spark/sql/tispark/TiRowRDD.scala +++ b/core/src/main/scala/org/apache/spark/sql/tispark/TiRowRDD.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/BatchWriteIssueSuite.scala b/core/src/test/scala/com/pingcap/tispark/BatchWriteIssueSuite.scala index ce89f36981..b244440fd4 100644 --- a/core/src/test/scala/com/pingcap/tispark/BatchWriteIssueSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/BatchWriteIssueSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/TiBatchWriteSuite.scala b/core/src/test/scala/com/pingcap/tispark/TiBatchWriteSuite.scala index d77522cbf7..25354bed04 100644 --- a/core/src/test/scala/com/pingcap/tispark/TiBatchWriteSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/TiBatchWriteSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/auth/TiAuthIntegrationSuite.scala b/core/src/test/scala/com/pingcap/tispark/auth/TiAuthIntegrationSuite.scala new file mode 100644 index 0000000000..407d23e285 --- /dev/null +++ b/core/src/test/scala/com/pingcap/tispark/auth/TiAuthIntegrationSuite.scala @@ -0,0 +1,167 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.pingcap.tispark.auth + +import org.apache.spark.sql.AnalysisException +import org.apache.spark.sql.test.SharedSQLContext +import org.scalatest.Matchers.{ + an, + be, + contain, + convertToAnyShouldWrapper, + have, + noException, + not, + the +} + +import java.sql.SQLException + +class TiAuthIntegrationSuite extends SharedSQLContext { + val table = "test_auth_basic" + val database = "tispark_test_auth" + val invisibleTable = "test_auth_basic_invisible" + val dbtable = f"$database.$table" + val databaseWithPrefix = f"$dbPrefix$database" + val dummyDatabase = "tispark_test_auth_dummy" + val user = "tispark_unit_test_user" + + override def beforeAll(): Unit = { + _isAuthEnabled = true + super.beforeAll() + + // set sql conf + spark.sqlContext.setConf("spark.sql.tidb.addr", "127.0.0.1") + spark.sqlContext.setConf("spark.sql.tidb.port", "4000") + spark.sqlContext.setConf("spark.sql.tidb.user", user) + spark.sqlContext.setConf("spark.sql.tidb.password", "") + + // create database + tidbStmt.execute(s"CREATE DATABASE IF NOT EXISTS `$database`") + tidbStmt.execute(s"CREATE DATABASE IF NOT EXISTS `$dummyDatabase`") + + // create table + tidbStmt.execute( + s"create table IF NOT EXISTS $database.$invisibleTable(i int, s varchar(128))") + tidbStmt.execute(s"create table IF NOT EXISTS $dbtable(i int, s varchar(128))") + tidbStmt.execute(s"insert into $dbtable values(null, 'Hello'), (2, 'TiDB')") + + // create user + tidbStmt.execute(f"CREATE USER IF NOT EXISTS '$user' IDENTIFIED BY ''") + + // grant user + tidbStmt.execute(f"GRANT CREATE ON $dummyDatabase.* TO '$user'@'%%'") + tidbStmt.execute(f"GRANT PROCESS ON *.* TO '$user'@'%%'") + + spark.sql(s"use tidb_catalog.$dbPrefix$dummyDatabase") + + } + + override def afterAll(): Unit = { + tidbStmt.execute(f"DROP USER IF EXISTS '$user'") + tidbStmt.execute(s"DROP TABLE IF EXISTS `$database`.`$table`") + tidbStmt.execute(s"DROP DATABASE IF EXISTS `$database`") + tidbStmt.execute(s"DROP DATABASE IF EXISTS `$dummyDatabase`") + super.afterAll() + _isAuthEnabled = false + TiAuthorization.enableAuth = false + } + + test("Use catalog should success") { + spark.sql(s"use tidb_catalog") + spark.sql(s"use $dbPrefix$dummyDatabase") + } + + test("Select without privilege should not be passed") { + the[SQLException] thrownBy { + spark.sql(s"select * from `$databaseWithPrefix`.`$table`") + } should have message s"SELECT command denied to user $user@% for table $databaseWithPrefix.$table" + } + + test("Get PD address from TiDB should be correct") { + ti.tiAuthorization.get.getPDAddress() should be(pdAddresses) + } + + test("Use database and select without privilege should not be passed") { + the[SQLException] thrownBy spark.sql( + f"use $databaseWithPrefix") should have message s"Access denied for user $user@% to database ${databaseWithPrefix}" + + val caught = intercept[AnalysisException] { + spark.sql(s"select * from $table") + } + // validateCatalog has been set namespace with "use tidb_catalog.$dbPrefix$dummyDatabase" in beforeAll() method + assert(caught.getMessage.contains(s"Table or view not found: $table")) + } + + test(f"Show databases without privilege should not contains db") { + val databases = spark + .sql(s"show databases") + .collect() + .map(row => row.toString()) + .toList + databases should not contain (f"[$databaseWithPrefix]") + } + + test("Give privilege") { + tidbStmt.execute(f"GRANT UPDATE,SELECT on `$database`.`$table` TO '$user'@'%%';") + + Thread.sleep((TiAuthorization.refreshIntervalSecond + 5) * 1000) + } + + test("Select with privilege should be passed") { + noException should be thrownBy spark.sql(s"select * from `$databaseWithPrefix`.`$table`") + } + + test("Select case insensitive with privilege should be passed") { + noException should be thrownBy spark.sql( + s"select * from `$databaseWithPrefix`.`${table.toUpperCase()}`") + } + + test("Use database and select with privilege should be passed") { + noException should be thrownBy spark.sql(s"use $databaseWithPrefix") + noException should be thrownBy spark.sql(s"select * from $table") + } + + test(f"Show databases with privilege should contains db") { + val databases = spark + .sql(s"show databases") + .collect() + .map(row => row.toString()) + .toList + databases should contain(f"[$databaseWithPrefix]") + } + + test(f"Show tables should not contain invisible table") { + noException should be thrownBy spark.sql(s"use $databaseWithPrefix") + + val tables = spark + .sql(s"show tables") + .collect() + .map(row => row.toString()) + .toList + if (validateCatalog) { + tables should contain(f"[$databaseWithPrefix,$table]") + tables should not contain (f"[$databaseWithPrefix,$invisibleTable]") + } + } + + test(f"Describe tables should not success with invisible table") { + noException should be thrownBy spark.sql(s"DESCRIBE TABLE `$databaseWithPrefix`.`$table`") + the[SQLException] thrownBy spark.sql( + s"DESCRIBE `$databaseWithPrefix`.`$invisibleTable`") should have message s"SELECT command denied to user $user@% for table $databaseWithPrefix.$invisibleTable" + } +} diff --git a/core/src/test/scala/com/pingcap/tispark/auth/TiAuthSuite.scala b/core/src/test/scala/com/pingcap/tispark/auth/TiAuthSuite.scala new file mode 100644 index 0000000000..89b598cc47 --- /dev/null +++ b/core/src/test/scala/com/pingcap/tispark/auth/TiAuthSuite.scala @@ -0,0 +1,55 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.pingcap.tispark.auth + +import com.pingcap.tispark.UnitSuite + +class TiAuthSuite extends UnitSuite { + + test("parse privilege from jdbc result should be correct") { + val result = TiAuthorization.parsePrivilegeFromRow( + "GRANT DELETE ON test.user TO 'root'@'%' WITH GRANT OPTION" :: + "GRANT DELETE ON test.table TO 'root'@'%' WITH GRANT OPTION" :: + "GRANT CREATE,UPDATE ON mysql.* TO 'root'@'%' WITH GRANT OPTION" :: + "GRANT CREATE TABLESPACE,SELECT ON *.* TO 'root'@'%' WITH GRANT OPTION" :: + "GRANT INSERT,UPDATE,DELETE ON tpch_test.* TO 'root'@'%'" :: + "GRANT 'app_write'@'%' TO 'dev1'@'%'" :: Nil) + result.globalPriv should equal(List(MySQLPriv.CreateTablespacePriv, MySQLPriv.SelectPriv)) + result.databasePrivs should equal( + Map( + "mysql" -> List(MySQLPriv.CreatePriv, MySQLPriv.UpdatePriv), + "tpch_test" -> List(MySQLPriv.InsertPriv, MySQLPriv.UpdatePriv, MySQLPriv.DeletePriv))) + result.tablePrivs should equal(Map( + "test" -> Map("table" -> List(MySQLPriv.DeletePriv), "user" -> List(MySQLPriv.DeletePriv)))) + } + + test("Extract role from jdbc result should be correct") { + val roles: List[String] = TiAuthorization.extractRoles( + "GRANT DELETE ON test.user TO 'root'@'%' WITH GRANT OPTION" :: + "GRANT DELETE ON test.table TO 'root'@'%' WITH GRANT OPTION" :: + "GRANT CREATE,UPDATE ON mysql.* TO 'root'@'%' WITH GRANT OPTION" :: + "GRANT CREATE TABLESPACE,SELECT ON *.* TO 'root'@'%' WITH GRANT OPTION" :: + "GRANT INSERT,UPDATE,DELETE ON tpch_test.* TO 'root'@'%'" :: + "GRANT 'app_read'@'%','app_write'@'%' TO 'rw_user1'@'localhost'" :: Nil) + roles should equal(List("app_read", "app_write")) + } + + test("priv map should be case-insensitive") { + MySQLPriv.Str2Priv.get("Process") shouldEqual Some(MySQLPriv.ProcessPriv) + MySQLPriv.Str2Priv.get("ProCess") shouldEqual Some(MySQLPriv.ProcessPriv) + } +} diff --git a/core/src/test/scala/com/pingcap/tispark/concurrency/ConcurrencyTest.scala b/core/src/test/scala/com/pingcap/tispark/concurrency/ConcurrencyTest.scala index 01e4a57f98..40e7848bce 100644 --- a/core/src/test/scala/com/pingcap/tispark/concurrency/ConcurrencyTest.scala +++ b/core/src/test/scala/com/pingcap/tispark/concurrency/ConcurrencyTest.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/concurrency/WriteDDLConflictSuite.scala b/core/src/test/scala/com/pingcap/tispark/concurrency/WriteDDLConflictSuite.scala index 29fb02912f..7ae8e631c7 100644 --- a/core/src/test/scala/com/pingcap/tispark/concurrency/WriteDDLConflictSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/concurrency/WriteDDLConflictSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/concurrency/WriteDDLNotConflictSuite.scala b/core/src/test/scala/com/pingcap/tispark/concurrency/WriteDDLNotConflictSuite.scala index e396728f86..0f2f5d3faa 100644 --- a/core/src/test/scala/com/pingcap/tispark/concurrency/WriteDDLNotConflictSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/concurrency/WriteDDLNotConflictSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/concurrency/WriteReadSuite.scala b/core/src/test/scala/com/pingcap/tispark/concurrency/WriteReadSuite.scala index adb7c8d5e3..51c55d5d87 100644 --- a/core/src/test/scala/com/pingcap/tispark/concurrency/WriteReadSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/concurrency/WriteReadSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/concurrency/WriteWriteConflictSuite.scala b/core/src/test/scala/com/pingcap/tispark/concurrency/WriteWriteConflictSuite.scala index 10def9ddef..a782a1a0b3 100644 --- a/core/src/test/scala/com/pingcap/tispark/concurrency/WriteWriteConflictSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/concurrency/WriteWriteConflictSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/convert/ToBitSuite.scala b/core/src/test/scala/com/pingcap/tispark/convert/ToBitSuite.scala index 268deac892..e2c11427a1 100644 --- a/core/src/test/scala/com/pingcap/tispark/convert/ToBitSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/convert/ToBitSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/convert/ToBytesSuite.scala b/core/src/test/scala/com/pingcap/tispark/convert/ToBytesSuite.scala index 14094c39b4..8c1e204ea8 100644 --- a/core/src/test/scala/com/pingcap/tispark/convert/ToBytesSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/convert/ToBytesSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/convert/ToDateSuite.scala b/core/src/test/scala/com/pingcap/tispark/convert/ToDateSuite.scala index eb0c88869e..32ff0033aa 100644 --- a/core/src/test/scala/com/pingcap/tispark/convert/ToDateSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/convert/ToDateSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/convert/ToDateTimeSuite.scala b/core/src/test/scala/com/pingcap/tispark/convert/ToDateTimeSuite.scala index cb571bf532..b160a9f8d9 100644 --- a/core/src/test/scala/com/pingcap/tispark/convert/ToDateTimeSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/convert/ToDateTimeSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/convert/ToDecimalSuite.scala b/core/src/test/scala/com/pingcap/tispark/convert/ToDecimalSuite.scala index 85c8f130f3..6f08de9028 100644 --- a/core/src/test/scala/com/pingcap/tispark/convert/ToDecimalSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/convert/ToDecimalSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/convert/ToEnumSuite.scala b/core/src/test/scala/com/pingcap/tispark/convert/ToEnumSuite.scala index c84cfb1130..02d5cac284 100644 --- a/core/src/test/scala/com/pingcap/tispark/convert/ToEnumSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/convert/ToEnumSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/convert/ToRealSuite.scala b/core/src/test/scala/com/pingcap/tispark/convert/ToRealSuite.scala index cd19093015..77217acf49 100644 --- a/core/src/test/scala/com/pingcap/tispark/convert/ToRealSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/convert/ToRealSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/convert/ToSignedSuite.scala b/core/src/test/scala/com/pingcap/tispark/convert/ToSignedSuite.scala index b87fd0ea95..ce88ce6bef 100644 --- a/core/src/test/scala/com/pingcap/tispark/convert/ToSignedSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/convert/ToSignedSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/convert/ToStringSuite.scala b/core/src/test/scala/com/pingcap/tispark/convert/ToStringSuite.scala index 3f9cbec114..8a2ee383c5 100644 --- a/core/src/test/scala/com/pingcap/tispark/convert/ToStringSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/convert/ToStringSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/convert/ToTimestampSuite.scala b/core/src/test/scala/com/pingcap/tispark/convert/ToTimestampSuite.scala index 10b0ed9d7f..82b149b8d7 100644 --- a/core/src/test/scala/com/pingcap/tispark/convert/ToTimestampSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/convert/ToTimestampSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/convert/ToUnsignedSuite.scala b/core/src/test/scala/com/pingcap/tispark/convert/ToUnsignedSuite.scala index fbcc586c4c..a2350ded03 100644 --- a/core/src/test/scala/com/pingcap/tispark/convert/ToUnsignedSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/convert/ToUnsignedSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/AddingIndexInsertSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/AddingIndexInsertSuite.scala index 9ab7fcd91b..05329fd0b1 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/AddingIndexInsertSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/AddingIndexInsertSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/AddingIndexReplaceSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/AddingIndexReplaceSuite.scala index 45fc86f843..cceadca812 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/AddingIndexReplaceSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/AddingIndexReplaceSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/AutoIncrementSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/AutoIncrementSuite.scala index 612ff965aa..ceb3c45f97 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/AutoIncrementSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/AutoIncrementSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/AutoRandomSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/AutoRandomSuite.scala index 47db3ea124..30fa67c669 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/AutoRandomSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/AutoRandomSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/BaseBatchWriteTest.scala b/core/src/test/scala/com/pingcap/tispark/datasource/BaseBatchWriteTest.scala index 38b114bd70..7ef53ff8a5 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/BaseBatchWriteTest.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/BaseBatchWriteTest.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/BaseBatchWriteWithoutDropTableTest.scala b/core/src/test/scala/com/pingcap/tispark/datasource/BaseBatchWriteWithoutDropTableTest.scala index ab20c746e1..080b7e69c5 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/BaseBatchWriteWithoutDropTableTest.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/BaseBatchWriteWithoutDropTableTest.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/BaseDataSourceTest.scala b/core/src/test/scala/com/pingcap/tispark/datasource/BaseDataSourceTest.scala index 386eee3da5..1fe986a79d 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/BaseDataSourceTest.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/BaseDataSourceTest.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/BasicBatchWriteSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/BasicBatchWriteSuite.scala index 34419191d6..6e7cb89465 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/BasicBatchWriteSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/BasicBatchWriteSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/BasicSQLSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/BasicSQLSuite.scala index 4fcc31de45..d0856babaf 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/BasicSQLSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/BasicSQLSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/CheckUnsupportedSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/CheckUnsupportedSuite.scala index 8cacd752e5..5c215ec25d 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/CheckUnsupportedSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/CheckUnsupportedSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/ColumnMappingSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/ColumnMappingSuite.scala index ddadb22603..450bcfd1ad 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/ColumnMappingSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/ColumnMappingSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/EdgeConditionSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/EdgeConditionSuite.scala index 078fb21c22..125104f968 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/EdgeConditionSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/EdgeConditionSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/ExceptionTestSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/ExceptionTestSuite.scala index 72a91bc0de..ebb1380743 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/ExceptionTestSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/ExceptionTestSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/FilterPushdownSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/FilterPushdownSuite.scala index 596fb069b8..b31f1e4d61 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/FilterPushdownSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/FilterPushdownSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/InsertSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/InsertSuite.scala index ceb167e10a..890f09d668 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/InsertSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/InsertSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/MissingParameterSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/MissingParameterSuite.scala index 62a7c01067..616b8003cb 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/MissingParameterSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/MissingParameterSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/OnlyOnePkSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/OnlyOnePkSuite.scala index 98f85d992e..83973b3052 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/OnlyOnePkSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/OnlyOnePkSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/RowIDAllocatorSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/RowIDAllocatorSuite.scala index 197b3a49df..adc93e168b 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/RowIDAllocatorSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/RowIDAllocatorSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/ShardRowIDBitsSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/ShardRowIDBitsSuite.scala index 110bca5763..1ce796abcf 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/ShardRowIDBitsSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/ShardRowIDBitsSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/TiSparkTypeSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/TiSparkTypeSuite.scala index 8fe24b41c4..178d178fb6 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/TiSparkTypeSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/TiSparkTypeSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datasource/UpperCaseColumnNameSuite.scala b/core/src/test/scala/com/pingcap/tispark/datasource/UpperCaseColumnNameSuite.scala index f4722e2f41..e4b54c3dfa 100644 --- a/core/src/test/scala/com/pingcap/tispark/datasource/UpperCaseColumnNameSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datasource/UpperCaseColumnNameSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datatype/BatchWriteDataTypeSuite.scala b/core/src/test/scala/com/pingcap/tispark/datatype/BatchWriteDataTypeSuite.scala index a599a30eae..59abc24eb7 100644 --- a/core/src/test/scala/com/pingcap/tispark/datatype/BatchWriteDataTypeSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datatype/BatchWriteDataTypeSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/datatype/DecimalTypeSuite.scala b/core/src/test/scala/com/pingcap/tispark/datatype/DecimalTypeSuite.scala index 43ce937f26..17254e609d 100644 --- a/core/src/test/scala/com/pingcap/tispark/datatype/DecimalTypeSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/datatype/DecimalTypeSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/index/LineItemSuite.scala b/core/src/test/scala/com/pingcap/tispark/index/LineItemSuite.scala index 72c3f0be6c..36d300316c 100644 --- a/core/src/test/scala/com/pingcap/tispark/index/LineItemSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/index/LineItemSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/multitable/MultiTableWriteSuite.scala b/core/src/test/scala/com/pingcap/tispark/multitable/MultiTableWriteSuite.scala index 652b33077b..54370ce977 100644 --- a/core/src/test/scala/com/pingcap/tispark/multitable/MultiTableWriteSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/multitable/MultiTableWriteSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/overflow/BitOverflowSuite.scala b/core/src/test/scala/com/pingcap/tispark/overflow/BitOverflowSuite.scala index 6587cf52c1..53ba769fc8 100644 --- a/core/src/test/scala/com/pingcap/tispark/overflow/BitOverflowSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/overflow/BitOverflowSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/overflow/BytesOverflowSuite.scala b/core/src/test/scala/com/pingcap/tispark/overflow/BytesOverflowSuite.scala index 45c56494b2..18d0f85b29 100644 --- a/core/src/test/scala/com/pingcap/tispark/overflow/BytesOverflowSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/overflow/BytesOverflowSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/overflow/DateOverflowSuite.scala b/core/src/test/scala/com/pingcap/tispark/overflow/DateOverflowSuite.scala index d67eaad3b4..938decea7c 100644 --- a/core/src/test/scala/com/pingcap/tispark/overflow/DateOverflowSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/overflow/DateOverflowSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/overflow/DateTimeOverflowSuite.scala b/core/src/test/scala/com/pingcap/tispark/overflow/DateTimeOverflowSuite.scala index fcbe4d6a0c..31c1901def 100644 --- a/core/src/test/scala/com/pingcap/tispark/overflow/DateTimeOverflowSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/overflow/DateTimeOverflowSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/overflow/DecimalOverflowSuite.scala b/core/src/test/scala/com/pingcap/tispark/overflow/DecimalOverflowSuite.scala index 484988fcee..71b8e2130d 100644 --- a/core/src/test/scala/com/pingcap/tispark/overflow/DecimalOverflowSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/overflow/DecimalOverflowSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/overflow/EnumOverflowSuite.scala b/core/src/test/scala/com/pingcap/tispark/overflow/EnumOverflowSuite.scala index 6e5c74cdf9..eaa33ee0a7 100644 --- a/core/src/test/scala/com/pingcap/tispark/overflow/EnumOverflowSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/overflow/EnumOverflowSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/overflow/SignedOverflowSuite.scala b/core/src/test/scala/com/pingcap/tispark/overflow/SignedOverflowSuite.scala index 7ac05305e9..f1ef6802d7 100644 --- a/core/src/test/scala/com/pingcap/tispark/overflow/SignedOverflowSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/overflow/SignedOverflowSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/overflow/StringOverflowSuite.scala b/core/src/test/scala/com/pingcap/tispark/overflow/StringOverflowSuite.scala index 13638749c3..c79fedc804 100644 --- a/core/src/test/scala/com/pingcap/tispark/overflow/StringOverflowSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/overflow/StringOverflowSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/overflow/UnsignedOverflowSuite.scala b/core/src/test/scala/com/pingcap/tispark/overflow/UnsignedOverflowSuite.scala index 18fef1fe10..1926c3d305 100644 --- a/core/src/test/scala/com/pingcap/tispark/overflow/UnsignedOverflowSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/overflow/UnsignedOverflowSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/tablelock/TableLockSuite.scala b/core/src/test/scala/com/pingcap/tispark/tablelock/TableLockSuite.scala index eca5101c00..006c5971b3 100644 --- a/core/src/test/scala/com/pingcap/tispark/tablelock/TableLockSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/tablelock/TableLockSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/tiflash/TiFlashSuite.scala b/core/src/test/scala/com/pingcap/tispark/tiflash/TiFlashSuite.scala index 9e11c46aec..d164de1141 100644 --- a/core/src/test/scala/com/pingcap/tispark/tiflash/TiFlashSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/tiflash/TiFlashSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/ttl/InitialTTLExpiredSuite.scala b/core/src/test/scala/com/pingcap/tispark/ttl/InitialTTLExpiredSuite.scala index 7534e20bfe..871941a75d 100644 --- a/core/src/test/scala/com/pingcap/tispark/ttl/InitialTTLExpiredSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/ttl/InitialTTLExpiredSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/com/pingcap/tispark/ttl/LockTimeoutSuite.scala b/core/src/test/scala/com/pingcap/tispark/ttl/LockTimeoutSuite.scala index 7ed8a1ffd6..e71d89cc9b 100644 --- a/core/src/test/scala/com/pingcap/tispark/ttl/LockTimeoutSuite.scala +++ b/core/src/test/scala/com/pingcap/tispark/ttl/LockTimeoutSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/SharedSparkContext.scala b/core/src/test/scala/org/apache/spark/SharedSparkContext.scala index 15929f2e9e..4f53f9fbbf 100644 --- a/core/src/test/scala/org/apache/spark/SharedSparkContext.scala +++ b/core/src/test/scala/org/apache/spark/SharedSparkContext.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/SparkFunSuite.scala b/core/src/test/scala/org/apache/spark/SparkFunSuite.scala index 2ed00e8bd7..4b714b7cb0 100644 --- a/core/src/test/scala/org/apache/spark/SparkFunSuite.scala +++ b/core/src/test/scala/org/apache/spark/SparkFunSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/AlterTableTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/AlterTableTestSuite.scala index 58a5ec446e..9584b93c79 100644 --- a/core/src/test/scala/org/apache/spark/sql/AlterTableTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/AlterTableTestSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/BaseInitialOnceTest.scala b/core/src/test/scala/org/apache/spark/sql/BaseInitialOnceTest.scala index e8456d3f89..1b30daece5 100644 --- a/core/src/test/scala/org/apache/spark/sql/BaseInitialOnceTest.scala +++ b/core/src/test/scala/org/apache/spark/sql/BaseInitialOnceTest.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/BaseTestGenerationSpec.scala b/core/src/test/scala/org/apache/spark/sql/BaseTestGenerationSpec.scala index 82d873176f..1c18f599a2 100644 --- a/core/src/test/scala/org/apache/spark/sql/BaseTestGenerationSpec.scala +++ b/core/src/test/scala/org/apache/spark/sql/BaseTestGenerationSpec.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/BaseTiSparkEnableBatchWriteTest.scala b/core/src/test/scala/org/apache/spark/sql/BaseTiSparkEnableBatchWriteTest.scala index 6ab7aaab26..38486599a1 100644 --- a/core/src/test/scala/org/apache/spark/sql/BaseTiSparkEnableBatchWriteTest.scala +++ b/core/src/test/scala/org/apache/spark/sql/BaseTiSparkEnableBatchWriteTest.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/BaseTiSparkTest.scala b/core/src/test/scala/org/apache/spark/sql/BaseTiSparkTest.scala index bb0889f05b..7cf566ed11 100644 --- a/core/src/test/scala/org/apache/spark/sql/BaseTiSparkTest.scala +++ b/core/src/test/scala/org/apache/spark/sql/BaseTiSparkTest.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/ExpressionIndexSuite.scala b/core/src/test/scala/org/apache/spark/sql/ExpressionIndexSuite.scala index 878eb1d2a7..e47003ebd2 100644 --- a/core/src/test/scala/org/apache/spark/sql/ExpressionIndexSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/ExpressionIndexSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/InvisibleIndexSuite.scala b/core/src/test/scala/org/apache/spark/sql/InvisibleIndexSuite.scala index 94430ef48b..3dd22e42c4 100644 --- a/core/src/test/scala/org/apache/spark/sql/InvisibleIndexSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/InvisibleIndexSuite.scala @@ -1,3 +1,19 @@ +/* + * Copyright 2022 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.spark.sql import org.apache.spark.sql.catalyst.plans.BasePlanTest diff --git a/core/src/test/scala/org/apache/spark/sql/IssueTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/IssueTestSuite.scala index e655489f47..e376146dcc 100644 --- a/core/src/test/scala/org/apache/spark/sql/IssueTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/IssueTestSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/MultipleSparkSessionTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/MultipleSparkSessionTestSuite.scala index a1f51bac17..3e048c7261 100644 --- a/core/src/test/scala/org/apache/spark/sql/MultipleSparkSessionTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/MultipleSparkSessionTestSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/MysqlDataTypeSuite.scala b/core/src/test/scala/org/apache/spark/sql/MysqlDataTypeSuite.scala index 8cb8f7246d..cb1131827b 100644 --- a/core/src/test/scala/org/apache/spark/sql/MysqlDataTypeSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/MysqlDataTypeSuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/OutputOffsetsSuite.scala b/core/src/test/scala/org/apache/spark/sql/OutputOffsetsSuite.scala index dc4b9f5a32..a5315e8b1c 100644 --- a/core/src/test/scala/org/apache/spark/sql/OutputOffsetsSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/OutputOffsetsSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/PartitionTableSuite.scala b/core/src/test/scala/org/apache/spark/sql/PartitionTableSuite.scala index 32e28b53e9..804f0ec840 100644 --- a/core/src/test/scala/org/apache/spark/sql/PartitionTableSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/PartitionTableSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/QueryTest.scala b/core/src/test/scala/org/apache/spark/sql/QueryTest.scala index 3a4bf27cb7..1c48280a20 100644 --- a/core/src/test/scala/org/apache/spark/sql/QueryTest.scala +++ b/core/src/test/scala/org/apache/spark/sql/QueryTest.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/SequenceTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/SequenceTestSuite.scala index 3ab1dfb492..70cc305af7 100644 --- a/core/src/test/scala/org/apache/spark/sql/SequenceTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/SequenceTestSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/SparkDataTypeTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/SparkDataTypeTestSuite.scala index 91174375a4..23cae5a0d4 100644 --- a/core/src/test/scala/org/apache/spark/sql/SparkDataTypeTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/SparkDataTypeTestSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/TiDBMapDatabaseSuite.scala b/core/src/test/scala/org/apache/spark/sql/TiDBMapDatabaseSuite.scala index 2e25e24770..3d8949f641 100644 --- a/core/src/test/scala/org/apache/spark/sql/TiDBMapDatabaseSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/TiDBMapDatabaseSuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/TiSparkTestSpec.scala b/core/src/test/scala/org/apache/spark/sql/TiSparkTestSpec.scala index f4f9d195b3..c76eea6a5e 100644 --- a/core/src/test/scala/org/apache/spark/sql/TiSparkTestSpec.scala +++ b/core/src/test/scala/org/apache/spark/sql/TiSparkTestSpec.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/TimezoneTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/TimezoneTestSuite.scala index 4d4a1ed0ea..1f5c32e608 100644 --- a/core/src/test/scala/org/apache/spark/sql/TimezoneTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/TimezoneTestSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/ViewTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/ViewTestSuite.scala index e3bea484dd..edf1853eac 100644 --- a/core/src/test/scala/org/apache/spark/sql/ViewTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/ViewTestSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/benchmark/TPCDSQuerySuite.scala b/core/src/test/scala/org/apache/spark/sql/benchmark/TPCDSQuerySuite.scala index f369958982..fbad9fd960 100644 --- a/core/src/test/scala/org/apache/spark/sql/benchmark/TPCDSQuerySuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/benchmark/TPCDSQuerySuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/benchmark/TPCHQuerySuite.scala b/core/src/test/scala/org/apache/spark/sql/benchmark/TPCHQuerySuite.scala index c7766ee682..66092e58d1 100644 --- a/core/src/test/scala/org/apache/spark/sql/benchmark/TPCHQuerySuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/benchmark/TPCHQuerySuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/catalyst/catalog/CatalogTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/catalyst/catalog/CatalogTestSuite.scala index 24bece8a11..e0b7fcdf11 100644 --- a/core/src/test/scala/org/apache/spark/sql/catalyst/catalog/CatalogTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/catalyst/catalog/CatalogTestSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/catalyst/plans/BasePlanTest.scala b/core/src/test/scala/org/apache/spark/sql/catalyst/plans/BasePlanTest.scala index 707b45fdf5..8ead33a7fb 100644 --- a/core/src/test/scala/org/apache/spark/sql/catalyst/plans/BasePlanTest.scala +++ b/core/src/test/scala/org/apache/spark/sql/catalyst/plans/BasePlanTest.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlanTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlanTestSuite.scala index 53410d35b9..afefc93768 100644 --- a/core/src/test/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlanTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlanTestSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/catalyst/plans/statistics/StatisticsTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/catalyst/plans/statistics/StatisticsTestSuite.scala index ba6b045ca1..7b0c12866e 100644 --- a/core/src/test/scala/org/apache/spark/sql/catalyst/plans/statistics/StatisticsTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/catalyst/plans/statistics/StatisticsTestSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/clustered/ClusteredIndexTest.scala b/core/src/test/scala/org/apache/spark/sql/clustered/ClusteredIndexTest.scala index a036800bb7..8f6ab302b6 100644 --- a/core/src/test/scala/org/apache/spark/sql/clustered/ClusteredIndexTest.scala +++ b/core/src/test/scala/org/apache/spark/sql/clustered/ClusteredIndexTest.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/clustered/IndexScan0Suite.scala b/core/src/test/scala/org/apache/spark/sql/clustered/IndexScan0Suite.scala index 755311a954..b52b68eb56 100644 --- a/core/src/test/scala/org/apache/spark/sql/clustered/IndexScan0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/clustered/IndexScan0Suite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/clustered/IndexScan1Suite.scala b/core/src/test/scala/org/apache/spark/sql/clustered/IndexScan1Suite.scala index ede4b6757f..8f3271d2af 100644 --- a/core/src/test/scala/org/apache/spark/sql/clustered/IndexScan1Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/clustered/IndexScan1Suite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/clustered/TableScan0Suite.scala b/core/src/test/scala/org/apache/spark/sql/clustered/TableScan0Suite.scala index 1d1a8b6f83..58f3496ff5 100644 --- a/core/src/test/scala/org/apache/spark/sql/clustered/TableScan0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/clustered/TableScan0Suite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/clustered/TableScan1Suite.scala b/core/src/test/scala/org/apache/spark/sql/clustered/TableScan1Suite.scala index c412724864..e5b165b59b 100644 --- a/core/src/test/scala/org/apache/spark/sql/clustered/TableScan1Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/clustered/TableScan1Suite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/expression/Aggregate0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/Aggregate0Suite.scala index 1bc3ccbdc2..077e070519 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/Aggregate0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/Aggregate0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticAgg0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticAgg0Suite.scala index 02a75bfc9a..77ba3f4380 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticAgg0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticAgg0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticTest0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticTest0Suite.scala index 0a600e43f3..0db7fcc285 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticTest0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticTest0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticTest1Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticTest1Suite.scala index 17bf53199e..2859ef10ca 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticTest1Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticTest1Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticTest2Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticTest2Suite.scala index 92ca4ab364..8199cc2f4d 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticTest2Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/ArithmeticTest2Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/Between0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/Between0Suite.scala index 7c2644aa3c..bdc8b1a968 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/Between0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/Between0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/ComplexAggregateSuite.scala b/core/src/test/scala/org/apache/spark/sql/expression/ComplexAggregateSuite.scala index a37d91f03e..53583a6694 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/ComplexAggregateSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/ComplexAggregateSuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/ComplexGroupBySuite.scala b/core/src/test/scala/org/apache/spark/sql/expression/ComplexGroupBySuite.scala index 5f9dfc452d..ee7980a406 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/ComplexGroupBySuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/ComplexGroupBySuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/Count0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/Count0Suite.scala index 0f6bb4031f..719b6e7335 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/Count0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/Count0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/Distinct0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/Distinct0Suite.scala index aa1f180271..eeecf1b2c5 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/Distinct0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/Distinct0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/FirstLast0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/FirstLast0Suite.scala index ffd6831e3a..4e0f50a460 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/FirstLast0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/FirstLast0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/Having0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/Having0Suite.scala index 0242100348..1c76b4cd5e 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/Having0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/Having0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/InTest0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/InTest0Suite.scala index d277764741..bf46e58768 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/InTest0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/InTest0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/LikeTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/expression/LikeTestSuite.scala index 91734f060c..ac4ab567fb 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/LikeTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/LikeTestSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/expression/OtherTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/expression/OtherTestSuite.scala index e47407f82c..21fb65f465 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/OtherTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/OtherTestSuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/Union0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/Union0Suite.scala index 72844fc3dc..f6a1c50105 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/Union0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/Union0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/index/Between0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/index/Between0Suite.scala index 6014315527..b074ab0be9 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/index/Between0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/index/Between0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/index/ComprehensiveSuite.scala b/core/src/test/scala/org/apache/spark/sql/expression/index/ComprehensiveSuite.scala index 4b526f1896..23bddbd2b3 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/index/ComprehensiveSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/index/ComprehensiveSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/expression/index/CoveringIndex0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/index/CoveringIndex0Suite.scala index 412ae1d621..30f1e98a27 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/index/CoveringIndex0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/index/CoveringIndex0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/index/InTest0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/index/InTest0Suite.scala index 7c97e8b596..d98fc5e72c 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/index/InTest0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/index/InTest0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/index/Join0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/index/Join0Suite.scala index 3919aa4a24..c33df40364 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/index/Join0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/index/Join0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/index/PrefixIndexTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/expression/index/PrefixIndexTestSuite.scala index 01b0ed4f4a..e7db2d0fcd 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/index/PrefixIndexTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/index/PrefixIndexTestSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/expression/index/Special0Suite.scala b/core/src/test/scala/org/apache/spark/sql/expression/index/Special0Suite.scala index 5ea3970ac4..5e257e9499 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/index/Special0Suite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/index/Special0Suite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/expression/index/UnsignedTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/expression/index/UnsignedTestSuite.scala index 12a212da24..c9a52fc035 100644 --- a/core/src/test/scala/org/apache/spark/sql/expression/index/UnsignedTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/expression/index/UnsignedTestSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/insertion/BatchWritePKAndIndexSuite.scala b/core/src/test/scala/org/apache/spark/sql/insertion/BatchWritePKAndIndexSuite.scala index a4f353e3ba..9c42a2b920 100644 --- a/core/src/test/scala/org/apache/spark/sql/insertion/BatchWritePKAndIndexSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/insertion/BatchWritePKAndIndexSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/insertion/BatchWritePkSuite.scala b/core/src/test/scala/org/apache/spark/sql/insertion/BatchWritePkSuite.scala index e4ac4c4151..533e3096c5 100644 --- a/core/src/test/scala/org/apache/spark/sql/insertion/BatchWritePkSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/insertion/BatchWritePkSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/insertion/BatchWriteUniqueIndexSuite.scala b/core/src/test/scala/org/apache/spark/sql/insertion/BatchWriteUniqueIndexSuite.scala index d79f5a33d5..42db568bc9 100644 --- a/core/src/test/scala/org/apache/spark/sql/insertion/BatchWriteUniqueIndexSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/insertion/BatchWriteUniqueIndexSuite.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/statistics/StatisticsManagerSuite.scala b/core/src/test/scala/org/apache/spark/sql/statistics/StatisticsManagerSuite.scala index 2bdbb33df8..c3597a2060 100644 --- a/core/src/test/scala/org/apache/spark/sql/statistics/StatisticsManagerSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/statistics/StatisticsManagerSuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/test/SharedSQLContext.scala b/core/src/test/scala/org/apache/spark/sql/test/SharedSQLContext.scala index 5fa2cbffe1..5097a2d1d1 100644 --- a/core/src/test/scala/org/apache/spark/sql/test/SharedSQLContext.scala +++ b/core/src/test/scala/org/apache/spark/sql/test/SharedSQLContext.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/test/TestConstants.scala b/core/src/test/scala/org/apache/spark/sql/test/TestConstants.scala index b9a2208de9..b4c05cc6d4 100644 --- a/core/src/test/scala/org/apache/spark/sql/test/TestConstants.scala +++ b/core/src/test/scala/org/apache/spark/sql/test/TestConstants.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/test/TestSparkSession.scala b/core/src/test/scala/org/apache/spark/sql/test/TestSparkSession.scala index 1fd595265c..3e6a5b3b8d 100644 --- a/core/src/test/scala/org/apache/spark/sql/test/TestSparkSession.scala +++ b/core/src/test/scala/org/apache/spark/sql/test/TestSparkSession.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/test/Utils.scala b/core/src/test/scala/org/apache/spark/sql/test/Utils.scala index f8b7665867..0634a3d6ef 100644 --- a/core/src/test/scala/org/apache/spark/sql/test/Utils.scala +++ b/core/src/test/scala/org/apache/spark/sql/test/Utils.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/core/src/test/scala/org/apache/spark/sql/txn/TxnTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/txn/TxnTestSuite.scala index f74fee96ad..f1e5c8bc78 100644 --- a/core/src/test/scala/org/apache/spark/sql/txn/TxnTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/txn/TxnTestSuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/BaseRandomDataTypeTest.scala b/core/src/test/scala/org/apache/spark/sql/types/BaseRandomDataTypeTest.scala index 4a98fa8541..c68afac76e 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/BaseRandomDataTypeTest.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/BaseRandomDataTypeTest.scala @@ -1,3 +1,19 @@ +/* + * Copyright 2022 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.spark.sql.types import com.pingcap.tikv.row.ObjectRowImpl diff --git a/core/src/test/scala/org/apache/spark/sql/types/DataTypeNormalSuite.scala b/core/src/test/scala/org/apache/spark/sql/types/DataTypeNormalSuite.scala index 3080d9bffa..a195ba6480 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/DataTypeNormalSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/DataTypeNormalSuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/MultiColumnDataTypeSuite.scala b/core/src/test/scala/org/apache/spark/sql/types/MultiColumnDataTypeSuite.scala index 332e5d7f12..d4bcffc582 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/MultiColumnDataTypeSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/MultiColumnDataTypeSuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/SpecialTiDBTypeTestSuite.scala b/core/src/test/scala/org/apache/spark/sql/types/SpecialTiDBTypeTestSuite.scala index ecb2ef785f..c0cdaccbce 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/SpecialTiDBTypeTestSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/SpecialTiDBTypeTestSuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/DataTypePKSuite.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/DataTypePKSuite.scala index 7662c1b523..62b0621d65 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/DataTypePKSuite.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/DataTypePKSuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite00.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite00.scala index adff37ea40..125827dc7c 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite00.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite00.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite01.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite01.scala index 506b7edf4c..35d43a0baa 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite01.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite01.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite02.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite02.scala index 7960bf6038..8fec9242b3 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite02.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite02.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite03.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite03.scala index 63c291718d..768de5a81c 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite03.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite03.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite04.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite04.scala index fdb87a0d38..e6bd25c011 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite04.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite04.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite05.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite05.scala index 69da5822a8..835b52cc8c 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite05.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite05.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite06.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite06.scala index df6e0f47f4..5da46d06b6 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite06.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite06.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite07.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite07.scala index bf583c2e08..5c67e09bb2 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite07.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite07.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite08.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite08.scala index 4a105e32a9..d0f53cd7bf 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite08.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite08.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite09.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite09.scala index b74153640f..c32f508441 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite09.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite09.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite10.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite10.scala index 212ee7d1b4..120da5aaae 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite10.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite10.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite11.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite11.scala index 01ea10e128..b741fa1209 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite11.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite11.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite12.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite12.scala index c263df7cea..1a4fa07816 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite12.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite12.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite13.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite13.scala index 3144a479aa..675094d3a9 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite13.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite13.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite14.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite14.scala index d052bfca7d..9cda24348c 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite14.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite14.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite15.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite15.scala index 1c99d53ce2..e3116940ed 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite15.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite15.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite16.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite16.scala index 46c218919f..41969f9482 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite16.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite16.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite17.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite17.scala index 4ee3142a75..73c0a87f05 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite17.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite17.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite18.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite18.scala index 087196bd51..ea6e94e234 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite18.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite18.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite19.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite19.scala index 473c1f2f3c..eacfc5e4dd 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite19.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite19.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite20.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite20.scala index 2125c9ad2b..b2dbc9c206 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite20.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite20.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite21.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite21.scala index c6d279db2f..39e174d889 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite21.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite21.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite22.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite22.scala index 07226e77a7..676e767acd 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite22.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite22.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite23.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite23.scala index fa6e6d71d2..09420bd284 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite23.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite23.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite24.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite24.scala index 19c9dd1f4a..7d747268f7 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite24.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite24.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite25.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite25.scala index ecd7b4e331..c980e6b955 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite25.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite25.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite26.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite26.scala index 530abd3092..220ced0bec 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite26.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite26.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite27.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite27.scala index 9a0309ae57..fe6e2e7619 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite27.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite27.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite28.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite28.scala index 62e534a410..7e12a0ccca 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite28.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite28.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite29.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite29.scala index 48fedca14e..15cd2f503d 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite29.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite29.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite30.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite30.scala index 74a159d0c5..320612425a 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite30.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite30.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite31.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite31.scala index 2a2b9ec07d..713380873d 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite31.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite31.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite32.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite32.scala index ca6188da4a..d9f16f8bed 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite32.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite32.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite33.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite33.scala index 6cbae4407d..445b5be9db 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite33.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite33.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite34.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite34.scala index 86b3353e29..4aedfc6f59 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite34.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite34.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite35.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite35.scala index 84663375f1..935483e959 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite35.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuite35.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuites.scala b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuites.scala index edea96eddb..a6b4b7c8e8 100644 --- a/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuites.scala +++ b/core/src/test/scala/org/apache/spark/sql/types/pk/MultiColumnPKDataTypeSuites.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/db-random-test/src/main/scala/com/pingcap/tispark/test/RandomTest.scala b/db-random-test/src/main/scala/com/pingcap/tispark/test/RandomTest.scala index 9f3e74554e..d58971126c 100644 --- a/db-random-test/src/main/scala/com/pingcap/tispark/test/RandomTest.scala +++ b/db-random-test/src/main/scala/com/pingcap/tispark/test/RandomTest.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/ColumnValueGenerator.scala b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/ColumnValueGenerator.scala index a630a617c9..a8278f81b9 100644 --- a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/ColumnValueGenerator.scala +++ b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/ColumnValueGenerator.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/DataGenerator.scala b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/DataGenerator.scala index 72bb321813..b900e67486 100644 --- a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/DataGenerator.scala +++ b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/DataGenerator.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/DataType.scala b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/DataType.scala index e5d2bf7fdc..1e972ca181 100644 --- a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/DataType.scala +++ b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/DataType.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/GeneratorUtils.scala b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/GeneratorUtils.scala index 2004054dd6..108595cf78 100644 --- a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/GeneratorUtils.scala +++ b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/GeneratorUtils.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/Index.scala b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/Index.scala index 9cbfec5b90..26aae4fcb3 100644 --- a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/Index.scala +++ b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/Index.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/IndexColumn.scala b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/IndexColumn.scala index 596b38e972..37d7be62f2 100644 --- a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/IndexColumn.scala +++ b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/IndexColumn.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/NullableType.scala b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/NullableType.scala index 3b7582d6b1..fffb56acf0 100644 --- a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/NullableType.scala +++ b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/NullableType.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/Schema.scala b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/Schema.scala index 4a1de216fc..1b7d82bb68 100644 --- a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/Schema.scala +++ b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/Schema.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/SchemaAndData.scala b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/SchemaAndData.scala index dc52b4f531..6080806775 100644 --- a/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/SchemaAndData.scala +++ b/db-random-test/src/main/scala/com/pingcap/tispark/test/generator/SchemaAndData.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/db-random-test/src/test/scala/com/pingcap/tispark/test/RandomTestSuite.scala b/db-random-test/src/test/scala/com/pingcap/tispark/test/RandomTestSuite.scala index cd5c751e4c..24ab2fb38f 100644 --- a/db-random-test/src/test/scala/com/pingcap/tispark/test/RandomTestSuite.scala +++ b/db-random-test/src/test/scala/com/pingcap/tispark/test/RandomTestSuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/db-random-test/src/test/scala/com/pingcap/tispark/test/generator/DataGeneratorSuite.scala b/db-random-test/src/test/scala/com/pingcap/tispark/test/generator/DataGeneratorSuite.scala index 0db794c878..88a5141be1 100644 --- a/db-random-test/src/test/scala/com/pingcap/tispark/test/generator/DataGeneratorSuite.scala +++ b/db-random-test/src/test/scala/com/pingcap/tispark/test/generator/DataGeneratorSuite.scala @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/python/resources/spark-2.3/session.py b/python/resources/spark-2.3/session.py index 1a3b1df577..5e776409da 100644 --- a/python/resources/spark-2.3/session.py +++ b/python/resources/spark-2.3/session.py @@ -1,19 +1,18 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# +/* +* Copyright 2022 PingCAP, Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ from __future__ import print_function import sys diff --git a/spark-wrapper/spark-2.4/src/main/scala/org/apache/spark/sql/TiAggregationImpl.scala b/spark-wrapper/spark-2.4/src/main/scala/org/apache/spark/sql/TiAggregationImpl.scala index 9dcd697d13..dee556b1a1 100644 --- a/spark-wrapper/spark-2.4/src/main/scala/org/apache/spark/sql/TiAggregationImpl.scala +++ b/spark-wrapper/spark-2.4/src/main/scala/org/apache/spark/sql/TiAggregationImpl.scala @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/spark-wrapper/spark-3.0/src/main/scala/com/pingcap/tispark/SparkWrapper.scala b/spark-wrapper/spark-3.0/src/main/scala/com/pingcap/tispark/SparkWrapper.scala new file mode 100644 index 0000000000..b97f9e1be9 --- /dev/null +++ b/spark-wrapper/spark-3.0/src/main/scala/com/pingcap/tispark/SparkWrapper.scala @@ -0,0 +1,42 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.pingcap.tispark + +import org.apache.spark.sql.catalyst.analysis.CleanupAliases +import org.apache.spark.sql.catalyst.expressions.{Alias, ExprId, Expression, SortOrder} + +object SparkWrapper { + def getVersion: String = { + "SparkWrapper-3.0" + } + + def newAlias(child: Expression, name: String): Alias = { + Alias(child, name)() + } + + def newAlias(child: Expression, name: String, exprId: ExprId): Alias = { + Alias(child, name)(exprId = exprId) + } + + def trimNonTopLevelAliases(e: Expression): Expression = { + CleanupAliases.trimNonTopLevelAliases(e) + } + + def copySortOrder(sortOrder: SortOrder, child: Expression): SortOrder = { + sortOrder.copy(child = child) + } +} diff --git a/spark-wrapper/spark-3.0/src/main/scala/org/apache/spark/sql/catalyst/expressions/TiBasicExpression.scala b/spark-wrapper/spark-3.0/src/main/scala/org/apache/spark/sql/catalyst/expressions/TiBasicExpression.scala new file mode 100644 index 0000000000..84d7300b47 --- /dev/null +++ b/spark-wrapper/spark-3.0/src/main/scala/org/apache/spark/sql/catalyst/expressions/TiBasicExpression.scala @@ -0,0 +1,133 @@ +/* + * + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.spark.sql.catalyst.expressions + +import com.pingcap.tikv.expression.{ + ArithmeticBinaryExpression, + ColumnRef, + ComparisonBinaryExpression, + Constant, + LogicalBinaryExpression, + StringRegExpression +} +import org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute +import org.apache.spark.sql.catalyst.expressions.BasicExpression.{ + TiExpression, + TiIsNull, + TiNot, + convertLiteral +} +import org.apache.spark.sql.execution.TiConverter +import org.apache.spark.sql.types.DecimalType + +object TiBasicExpression { + + def convertToTiExpr(expr: Expression): Option[TiExpression] = + expr match { + case Literal(value, dataType) => + Some( + Constant.create(convertLiteral(value, dataType), TiConverter.fromSparkType(dataType))) + + case Add(BasicExpression(lhs), BasicExpression(rhs)) => + Some(ArithmeticBinaryExpression.plus(lhs, rhs)) + + case Subtract(BasicExpression(lhs), BasicExpression(rhs)) => + Some(ArithmeticBinaryExpression.minus(lhs, rhs)) + + case e @ Multiply(BasicExpression(lhs), BasicExpression(rhs)) => + Some(ArithmeticBinaryExpression.multiply(TiConverter.fromSparkType(e.dataType), lhs, rhs)) + + case d @ Divide(BasicExpression(lhs), BasicExpression(rhs)) => + Some(ArithmeticBinaryExpression.divide(TiConverter.fromSparkType(d.dataType), lhs, rhs)) + + case And(BasicExpression(lhs), BasicExpression(rhs)) => + Some(LogicalBinaryExpression.and(lhs, rhs)) + + case Or(BasicExpression(lhs), BasicExpression(rhs)) => + Some(LogicalBinaryExpression.or(lhs, rhs)) + + case Alias(BasicExpression(child), _) => + Some(child) + + case IsNull(BasicExpression(child)) => + Some(new TiIsNull(child)) + + case IsNotNull(BasicExpression(child)) => + Some(new TiNot(new TiIsNull(child))) + + case GreaterThan(BasicExpression(lhs), BasicExpression(rhs)) => + Some(ComparisonBinaryExpression.greaterThan(lhs, rhs)) + + case GreaterThanOrEqual(BasicExpression(lhs), BasicExpression(rhs)) => + Some(ComparisonBinaryExpression.greaterEqual(lhs, rhs)) + + case LessThan(BasicExpression(lhs), BasicExpression(rhs)) => + Some(ComparisonBinaryExpression.lessThan(lhs, rhs)) + + case LessThanOrEqual(BasicExpression(lhs), BasicExpression(rhs)) => + Some(ComparisonBinaryExpression.lessEqual(lhs, rhs)) + + case EqualTo(BasicExpression(lhs), BasicExpression(rhs)) => + Some(ComparisonBinaryExpression.equal(lhs, rhs)) + + case Not(EqualTo(BasicExpression(lhs), BasicExpression(rhs))) => + Some(ComparisonBinaryExpression.notEqual(lhs, rhs)) + + case Not(BasicExpression(child)) => + Some(new TiNot(child)) + + case StartsWith(BasicExpression(lhs), BasicExpression(rhs)) => + Some(StringRegExpression.startsWith(lhs, rhs)) + + case Contains(BasicExpression(lhs), BasicExpression(rhs)) => + Some(StringRegExpression.contains(lhs, rhs)) + + case EndsWith(BasicExpression(lhs), BasicExpression(rhs)) => + Some(StringRegExpression.endsWith(lhs, rhs)) + + case Like(BasicExpression(lhs), BasicExpression(rhs), _) => + Some(StringRegExpression.like(lhs, rhs)) + + // Coprocessor has its own behavior of type promoting and overflow check + // so we simply remove it from expression and let cop handle it + case CheckOverflow(BasicExpression(expr), dec: DecimalType, _) => + expr.setDataType(TiConverter.fromSparkType(dec)) + Some(expr) + + case PromotePrecision(BasicExpression(expr)) => + Some(expr) + + case PromotePrecision(Cast(BasicExpression(expr), dec: DecimalType, _)) => + expr.setDataType(TiConverter.fromSparkType(dec)) + Some(expr) + + case PromotePrecision(BasicExpression(expr)) => + Some(expr) + + // TODO: Are all AttributeReference column reference in such context? + case attr: AttributeReference => + Some(ColumnRef.create(attr.name, TiConverter.fromSparkType(attr.dataType))) + + case uAttr: UnresolvedAttribute => + Some(ColumnRef.create(uAttr.name, TiConverter.fromSparkType(uAttr.dataType))) + + // TODO: Remove it and let it fail once done all translation + case _ => Option.empty[TiExpression] + } +} diff --git a/spark-wrapper/spark-3.1/src/main/scala/com/pingcap/tispark/SparkWrapper.scala b/spark-wrapper/spark-3.1/src/main/scala/com/pingcap/tispark/SparkWrapper.scala new file mode 100644 index 0000000000..d54d1f17e9 --- /dev/null +++ b/spark-wrapper/spark-3.1/src/main/scala/com/pingcap/tispark/SparkWrapper.scala @@ -0,0 +1,53 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.pingcap.tispark + +import org.apache.spark.sql.catalyst.expressions.{ + Alias, + AliasHelper, + ExprId, + Expression, + SortOrder +} + +object SparkWrapper { + def getVersion: String = { + "SparkWrapper-3.1" + } + + def newAlias(child: Expression, name: String): Alias = { + Alias(child, name)() + } + + def newAlias(child: Expression, name: String, exprId: ExprId): Alias = { + Alias(child, name)(exprId = exprId) + } + + def trimNonTopLevelAliases(e: Expression): Expression = { + TiCleanupAliases.trimNonTopLevelAliases2(e) + } + + def copySortOrder(sortOrder: SortOrder, child: Expression): SortOrder = { + sortOrder.copy(child = child) + } +} + +object TiCleanupAliases extends AliasHelper { + def trimNonTopLevelAliases2[T <: Expression](e: T): T = { + super.trimNonTopLevelAliases(e) + } +} diff --git a/spark-wrapper/spark-3.1/src/main/scala/org/apache/spark/sql/catalyst/expressions/TiBasicExpression.scala b/spark-wrapper/spark-3.1/src/main/scala/org/apache/spark/sql/catalyst/expressions/TiBasicExpression.scala new file mode 100644 index 0000000000..0b083a5c79 --- /dev/null +++ b/spark-wrapper/spark-3.1/src/main/scala/org/apache/spark/sql/catalyst/expressions/TiBasicExpression.scala @@ -0,0 +1,133 @@ +/* + * + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.spark.sql.catalyst.expressions + +import com.pingcap.tikv.expression.{ + ArithmeticBinaryExpression, + ColumnRef, + ComparisonBinaryExpression, + Constant, + LogicalBinaryExpression, + StringRegExpression +} +import org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute +import org.apache.spark.sql.catalyst.expressions.BasicExpression.{ + TiExpression, + TiIsNull, + TiNot, + convertLiteral +} +import org.apache.spark.sql.execution.TiConverter +import org.apache.spark.sql.types.DecimalType + +object TiBasicExpression { + + def convertToTiExpr(expr: Expression): Option[TiExpression] = + expr match { + case Literal(value, dataType) => + Some( + Constant.create(convertLiteral(value, dataType), TiConverter.fromSparkType(dataType))) + + case Add(BasicExpression(lhs), BasicExpression(rhs), _) => + Some(ArithmeticBinaryExpression.plus(lhs, rhs)) + + case Subtract(BasicExpression(lhs), BasicExpression(rhs), _) => + Some(ArithmeticBinaryExpression.minus(lhs, rhs)) + + case e @ Multiply(BasicExpression(lhs), BasicExpression(rhs), _) => + Some(ArithmeticBinaryExpression.multiply(TiConverter.fromSparkType(e.dataType), lhs, rhs)) + + case d @ Divide(BasicExpression(lhs), BasicExpression(rhs), _) => + Some(ArithmeticBinaryExpression.divide(TiConverter.fromSparkType(d.dataType), lhs, rhs)) + + case And(BasicExpression(lhs), BasicExpression(rhs)) => + Some(LogicalBinaryExpression.and(lhs, rhs)) + + case Or(BasicExpression(lhs), BasicExpression(rhs)) => + Some(LogicalBinaryExpression.or(lhs, rhs)) + + case Alias(BasicExpression(child), _) => + Some(child) + + case IsNull(BasicExpression(child)) => + Some(new TiIsNull(child)) + + case IsNotNull(BasicExpression(child)) => + Some(new TiNot(new TiIsNull(child))) + + case GreaterThan(BasicExpression(lhs), BasicExpression(rhs)) => + Some(ComparisonBinaryExpression.greaterThan(lhs, rhs)) + + case GreaterThanOrEqual(BasicExpression(lhs), BasicExpression(rhs)) => + Some(ComparisonBinaryExpression.greaterEqual(lhs, rhs)) + + case LessThan(BasicExpression(lhs), BasicExpression(rhs)) => + Some(ComparisonBinaryExpression.lessThan(lhs, rhs)) + + case LessThanOrEqual(BasicExpression(lhs), BasicExpression(rhs)) => + Some(ComparisonBinaryExpression.lessEqual(lhs, rhs)) + + case EqualTo(BasicExpression(lhs), BasicExpression(rhs)) => + Some(ComparisonBinaryExpression.equal(lhs, rhs)) + + case Not(EqualTo(BasicExpression(lhs), BasicExpression(rhs))) => + Some(ComparisonBinaryExpression.notEqual(lhs, rhs)) + + case Not(BasicExpression(child)) => + Some(new TiNot(child)) + + case StartsWith(BasicExpression(lhs), BasicExpression(rhs)) => + Some(StringRegExpression.startsWith(lhs, rhs)) + + case Contains(BasicExpression(lhs), BasicExpression(rhs)) => + Some(StringRegExpression.contains(lhs, rhs)) + + case EndsWith(BasicExpression(lhs), BasicExpression(rhs)) => + Some(StringRegExpression.endsWith(lhs, rhs)) + + case Like(BasicExpression(lhs), BasicExpression(rhs), _) => + Some(StringRegExpression.like(lhs, rhs)) + + // Coprocessor has its own behavior of type promoting and overflow check + // so we simply remove it from expression and let cop handle it + case CheckOverflow(BasicExpression(expr), dec: DecimalType, _) => + expr.setDataType(TiConverter.fromSparkType(dec)) + Some(expr) + + case PromotePrecision(BasicExpression(expr)) => + Some(expr) + + case PromotePrecision(Cast(BasicExpression(expr), dec: DecimalType, _)) => + expr.setDataType(TiConverter.fromSparkType(dec)) + Some(expr) + + case PromotePrecision(BasicExpression(expr)) => + Some(expr) + + // TODO: Are all AttributeReference column reference in such context? + case attr: AttributeReference => + Some(ColumnRef.create(attr.name, TiConverter.fromSparkType(attr.dataType))) + + case uAttr: UnresolvedAttribute => + Some(ColumnRef.create(uAttr.name, TiConverter.fromSparkType(uAttr.dataType))) + + // TODO: Remove it and let it fail once done all translation + case _ => Option.empty[TiExpression] + } +} diff --git a/spark-wrapper/spark-3.1/src/main/scala/org/apache/spark/sql/extensions/TiAggregationProjectionV2.scala b/spark-wrapper/spark-3.1/src/main/scala/org/apache/spark/sql/extensions/TiAggregationProjectionV2.scala new file mode 100644 index 0000000000..3603f9c6ae --- /dev/null +++ b/spark-wrapper/spark-3.1/src/main/scala/org/apache/spark/sql/extensions/TiAggregationProjectionV2.scala @@ -0,0 +1,49 @@ +/* + * Copyright 2022 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark.sql.extensions + +import com.pingcap.tispark.v2.TiDBTable +import org.apache.spark.sql.catalyst.expressions.{Attribute, Expression, NamedExpression} +import org.apache.spark.sql.catalyst.planning.PhysicalOperation +import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan +import org.apache.spark.sql.execution.datasources.v2.{ + DataSourceV2Relation, + DataSourceV2ScanRelation +} + +/** + * I'm afraid that the same name with the object under the spark-wrapper/spark3.0 will lead to some problems. + * Although the same name will pass the itegration test + */ +object TiAggregationProjectionV2 { + type ReturnType = (Seq[Expression], LogicalPlan, TiDBTable, Seq[NamedExpression]) + + def unapply(plan: LogicalPlan): Option[ReturnType] = + plan match { + // Only push down aggregates projection when all filters can be applied and + // all projection expressions are column references + case PhysicalOperation( + projects, + filters, + rel @ DataSourceV2ScanRelation( + DataSourceV2Relation(source: TiDBTable, _, _, _, _), + _, + _)) if projects.forall(_.isInstanceOf[Attribute]) => + Some((filters, rel, source, projects)) + case _ => Option.empty[ReturnType] + } +} diff --git a/spark-wrapper/spark-3.1/src/main/scala/org/apache/spark/sql/extensions/TiStrategy.scala b/spark-wrapper/spark-3.1/src/main/scala/org/apache/spark/sql/extensions/TiStrategy.scala new file mode 100644 index 0000000000..4a38471829 --- /dev/null +++ b/spark-wrapper/spark-3.1/src/main/scala/org/apache/spark/sql/extensions/TiStrategy.scala @@ -0,0 +1,640 @@ +/* + * Copyright 2022 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark.sql.extensions + +import com.pingcap.tidb.tipb.EncodeType +import com.pingcap.tikv.exception.IgnoreUnsupportedTypeException +import com.pingcap.tikv.expression._ +import com.pingcap.tikv.meta.TiDAGRequest.PushDownType +import com.pingcap.tikv.meta.{TiDAGRequest, TiTimestamp} +import com.pingcap.tikv.predicates.{PredicateUtils, TiKVScanAnalyzer} +import com.pingcap.tikv.region.TiStoreType +import com.pingcap.tikv.statistics.TableStatistics +import com.pingcap.tispark.TiConfigConst +import com.pingcap.tispark.statistics.StatisticsManager +import com.pingcap.tispark.utils.{ReflectionUtil, TiUtil} +import com.pingcap.tispark.v2.TiDBTable +import org.apache.spark.internal.Logging +import org.apache.spark.sql._ +import org.apache.spark.sql.catalyst.expressions.aggregate._ +import org.apache.spark.sql.catalyst.expressions.{ + Alias, + Ascending, + Attribute, + AttributeMap, + AttributeSet, + Descending, + Expression, + IntegerLiteral, + IsNull, + NamedExpression, + NullsFirst, + NullsLast, + SortOrder, + SubqueryExpression, + TiExprUtils +} +import org.apache.spark.sql.catalyst.planner.TiAggregation +import org.apache.spark.sql.catalyst.planning.PhysicalOperation +import org.apache.spark.sql.catalyst.plans.logical +import org.apache.spark.sql.catalyst.plans.logical._ +import org.apache.spark.sql.execution._ +import org.apache.spark.sql.execution.datasources.v2.{ + DataSourceV2Relation, + DataSourceV2ScanRelation +} +import org.apache.spark.sql.internal.SQLConf +import org.joda.time.{DateTime, DateTimeZone} + +import java.util.concurrent.TimeUnit +import scala.collection.JavaConverters._ +import scala.collection.mutable + +object TiStrategy { + private val assignedTSPlanCache = new mutable.WeakHashMap[LogicalPlan, Boolean]() + + private def hasTSAssigned(plan: LogicalPlan): Boolean = { + assignedTSPlanCache.contains(plan) + } + + private def markTSAssigned(plan: LogicalPlan): Unit = { + plan foreachUp { p => + assignedTSPlanCache.put(p, true) + } + } +} + +/** + * CHECK Spark [[org.apache.spark.sql.Strategy]] + * + * TODO: Too many hacks here since we hijack the planning + * but we don't have full control over planning stage + * We cannot pass context around during planning so + * a re-extract needed for push-down since + * a plan tree might contain Join which causes a single tree + * have multiple plans to push-down + */ +case class TiStrategy(getOrCreateTiContext: SparkSession => TiContext)(sparkSession: SparkSession) + extends Strategy + with Logging { + type TiExpression = com.pingcap.tikv.expression.Expression + type TiColumnRef = com.pingcap.tikv.expression.ColumnRef + private lazy val tiContext: TiContext = getOrCreateTiContext(sparkSession) + private lazy val sqlContext = tiContext.sqlContext + private lazy val sqlConf: SQLConf = sqlContext.conf + + def typeBlockList: TypeBlocklist = { + val blocklistString = + sqlConf.getConfString(TiConfigConst.UNSUPPORTED_TYPES, "") + new TypeBlocklist(blocklistString) + } + + override def apply(plan: LogicalPlan): Seq[SparkPlan] = { + TiExtensions.validateCatalog(sparkSession) + val ts = tiContext.tiSession.getTimestamp + + if (plan.isStreaming) { + // We should use a new timestamp for next batch execution. + // Otherwise Spark Structure Streaming will not see new data in TiDB. + if (!TiStrategy.hasTSAssigned(plan)) { + plan foreachUp applyStartTs(ts, forceUpdate = true) + TiStrategy.markTSAssigned(plan) + } + } else { + plan foreachUp applyStartTs(ts) + } + + plan + .collectFirst { + case DataSourceV2ScanRelation(DataSourceV2Relation(table: TiDBTable, _, _, _, _), _, _) => + doPlan(table, plan) + } + .toSeq + .flatten + } + + def referencedTiColumns(expression: TiExpression): Seq[TiColumnRef] = + PredicateUtils.extractColumnRefFromExpression(expression).asScala.toSeq + + /** + * build a Seq of used TiColumnRef from AttributeSet and bound them to source table + * + * @param attributeSet AttributeSet containing projects w/ or w/o filters + * @param source source TiDBRelation + * @return a Seq of TiColumnRef extracted + */ + def buildTiColumnRefFromColumnSeq( + attributeSet: AttributeSet, + source: TiDBTable): Seq[TiColumnRef] = { + val tiColumnSeq: Seq[TiExpression] = attributeSet.toSeq.map { expr => + TiExprUtils.transformAttrToColRef(expr, source.table) + } + var tiColumns: mutable.HashSet[TiColumnRef] = mutable.HashSet.empty[TiColumnRef] + for (expression <- tiColumnSeq) { + val colSetPerExpr = PredicateUtils.extractColumnRefFromExpression(expression) + colSetPerExpr.asScala.foreach { + tiColumns += _ + } + } + tiColumns.toSeq + } + + // apply StartTs to every logical plan in Spark Planning stage + protected def applyStartTs( + ts: TiTimestamp, + forceUpdate: Boolean = false): PartialFunction[LogicalPlan, Unit] = { + case DataSourceV2ScanRelation( + DataSourceV2Relation(r @ TiDBTable(_, _, _, timestamp, _), _, _, _, _), + _, + _) => + if (timestamp == null || forceUpdate) { + r.ts = ts + } + case logicalPlan => + logicalPlan transformExpressionsUp { + case s: SubqueryExpression => + s.plan.foreachUp(applyStartTs(ts)) + s + } + } + + private def blocklist: ExpressionBlocklist = { + val blocklistString = sqlConf.getConfString(TiConfigConst.UNSUPPORTED_PUSHDOWN_EXPR, "") + new ExpressionBlocklist(blocklistString) + } + + private def allowAggregationPushDown(): Boolean = + sqlConf.getConfString(TiConfigConst.ALLOW_AGG_PUSHDOWN, "true").toLowerCase.toBoolean + + private def useIndexScanFirst(): Boolean = + sqlConf.getConfString(TiConfigConst.USE_INDEX_SCAN_FIRST, "false").toLowerCase.toBoolean + + private def allowIndexRead(): Boolean = + sqlConf.getConfString(TiConfigConst.ALLOW_INDEX_READ, "true").toLowerCase.toBoolean + + private def useStreamingProcess: Boolean = + sqlConf.getConfString(TiConfigConst.COPROCESS_STREAMING, "false").toLowerCase.toBoolean + + private def getCodecFormat: EncodeType = { + // FIXME: Should use default codec format "chblock", change it back after fix. + val codecFormatStr = + sqlConf + .getConfString(TiConfigConst.CODEC_FORMAT, TiConfigConst.DEFAULT_CODEC_FORMAT) + .toLowerCase + + codecFormatStr match { + case TiConfigConst.CHUNK_CODEC_FORMAT => EncodeType.TypeChunk + case TiConfigConst.DEFAULT_CODEC_FORMAT => EncodeType.TypeCHBlock + case _ => EncodeType.TypeDefault + } + } + + private def eligibleStorageEngines(source: TiDBTable): List[TiStoreType] = + TiUtil.getIsolationReadEngines(sqlContext).filter { + case TiStoreType.TiKV => true + case TiStoreType.TiFlash => source.isTiFlashReplicaAvailable + case _ => false + } + + private def timeZoneOffsetInSeconds(): Int = { + val tz = DateTimeZone.getDefault + val instant = DateTime.now.getMillis + val offsetInMilliseconds = tz.getOffset(instant) + val hours = TimeUnit.MILLISECONDS.toHours(offsetInMilliseconds).toInt + val seconds = hours * 3600 + seconds + } + + private def newTiDAGRequest(): TiDAGRequest = { + val ts = timeZoneOffsetInSeconds() + if (useStreamingProcess) { + new TiDAGRequest(PushDownType.STREAMING, ts) + } else { + new TiDAGRequest(PushDownType.NORMAL, getCodecFormat, ts) + } + } + + private def toCoprocessorRDD( + source: TiDBTable, + output: Seq[Attribute], + dagRequest: TiDAGRequest): SparkPlan = { + dagRequest.setTableInfo(source.table) + dagRequest.setStartTs(source.ts) + + val notAllowPushDown = dagRequest.getFields.asScala + .map { + _.getDataType.getType + } + .exists { + typeBlockList.isUnsupportedType + } + + if (notAllowPushDown) { + throw new IgnoreUnsupportedTypeException( + "Unsupported type found in fields: " + typeBlockList) + } else { + if (dagRequest.isDoubleRead) { + source.dagRequestToRegionTaskExec(dagRequest, output) + } else { + ColumnarCoprocessorRDD( + output, + source.logicalPlanToRDD(dagRequest, output), + fetchHandle = false) + } + } + } + + private def aggregationToDAGRequest( + groupByList: Seq[NamedExpression], + aggregates: Seq[AggregateExpression], + source: TiDBTable, + dagRequest: TiDAGRequest): TiDAGRequest = { + aggregates + .map { + _.aggregateFunction + } + .foreach { expr => + TiExprUtils.transformAggExprToTiAgg(expr, source.table, dagRequest) + } + + groupByList.foreach { expr => + TiExprUtils.transformGroupingToTiGrouping(expr, source.table, dagRequest) + } + + dagRequest + } + + private def filterToDAGRequest( + tiColumns: Seq[TiColumnRef], + filters: Seq[Expression], + source: TiDBTable, + dagRequest: TiDAGRequest): TiDAGRequest = { + val tiFilters: Seq[TiExpression] = filters.map { + TiExprUtils.transformFilter(_, source.table, dagRequest) + } + + val scanBuilder: TiKVScanAnalyzer = new TiKVScanAnalyzer + + val tblStatistics: TableStatistics = StatisticsManager.getTableStatistics(source.table.getId) + + // engines that could be chosen. + val engines = eligibleStorageEngines(source) + + if (engines.isEmpty) { + throw new RuntimeException( + s"No eligible storage engines found for $source, " + + s"isolation_read_engines = ${TiUtil.getIsolationReadEngines(sqlContext)}") + } + + scanBuilder.buildTiDAGReq( + allowIndexRead(), + useIndexScanFirst(), + engines.contains(TiStoreType.TiKV), + engines.contains(TiStoreType.TiFlash), + tiColumns.map { colRef => + source.table.getColumn(colRef.getName) + }.asJava, + tiFilters.asJava, + source.table, + tblStatistics, + source.ts, + dagRequest) + } + + private def pruneTopNFilterProject( + limit: Int, + projectList: Seq[NamedExpression], + filterPredicates: Seq[Expression], + source: TiDBTable, + sortOrder: Seq[SortOrder]): SparkPlan = { + val request = newTiDAGRequest() + request.setLimit(limit) + TiExprUtils.transformSortOrderToTiOrderBy(request, sortOrder, source.table) + + pruneFilterProject(projectList, filterPredicates, source, request) + } + + private def collectLimit(limit: Int, child: LogicalPlan): SparkPlan = + child match { + case PhysicalOperation( + projectList, + filters, + DataSourceV2ScanRelation(DataSourceV2Relation(source: TiDBTable, _, _, _, _), _, _)) + if filters.forall(TiExprUtils.isSupportedFilter(_, source, blocklist)) => + pruneTopNFilterProject(limit, projectList, filters, source, Nil) + case _ => planLater(child) + } + + private def takeOrderedAndProject( + limit: Int, + sortOrder: Seq[SortOrder], + child: LogicalPlan, + project: Seq[NamedExpression]): SparkPlan = { + // If sortOrder is empty, limit must be greater than 0 + if (limit < 0 || (sortOrder.isEmpty && limit == 0)) { + return execution.TakeOrderedAndProjectExec(limit, sortOrder, project, planLater(child)) + } + + child match { + case PhysicalOperation( + projectList, + filters, + DataSourceV2ScanRelation(DataSourceV2Relation(source: TiDBTable, _, _, _, _), _, _)) + if filters.forall(TiExprUtils.isSupportedFilter(_, source, blocklist)) => + val refinedOrders = refineSortOrder(projectList, sortOrder, source) + if (refinedOrders.isEmpty) { + execution.TakeOrderedAndProjectExec(limit, sortOrder, project, planLater(child)) + } else { + execution.TakeOrderedAndProjectExec( + limit, + sortOrder, + project, + pruneTopNFilterProject(limit, projectList, filters, source, refinedOrders.get)) + } + case _ => execution.TakeOrderedAndProjectExec(limit, sortOrder, project, planLater(child)) + } + } + + // refine sort order + // 1. sort order expressions are all valid to be pushed + // 2. if any reference to projections are valid to be pushed + private def refineSortOrder( + projectList: Seq[NamedExpression], + sortOrders: Seq[SortOrder], + source: TiDBTable): Option[Seq[SortOrder]] = { + val aliases = AttributeMap(projectList.collect { + case a: Alias => a.toAttribute -> a + }) + // Order by desc/asc + nulls first/last + // + // 1. Order by asc + nulls first: + // order by col asc nulls first = order by col asc + // 2. Order by desc + nulls first: + // order by col desc nulls first = order by col is null desc, col desc + // 3. Order by asc + nulls last: + // order by col asc nulls last = order by col is null asc, col asc + // 4. Order by desc + nulls last: + // order by col desc nulls last = order by col desc + val refinedSortOrder = sortOrders.flatMap { sortOrder: SortOrder => + val newSortExpr = sortOrder.child.transformUp { + case a: Attribute => aliases.getOrElse(a, a) + } + val trimmedExpr = ReflectionUtil.trimNonTopLevelAliases(newSortExpr) + val trimmedSortOrder = ReflectionUtil.copySortOrder(sortOrder, trimmedExpr) + + (sortOrder.direction, sortOrder.nullOrdering) match { + case (_ @Ascending, _ @NullsLast) | (_ @Descending, _ @NullsFirst) => + ReflectionUtil.copySortOrder(sortOrder, IsNull(trimmedExpr)) :: trimmedSortOrder :: Nil + case _ => + trimmedSortOrder :: Nil + } + } + if (refinedSortOrder + .exists(order => !TiExprUtils.isSupportedOrderBy(order.child, source, blocklist))) { + Option.empty + } else { + Some(refinedSortOrder) + } + } + + private def pruneFilterProject( + projectList: Seq[NamedExpression], + filterPredicates: Seq[Expression], + source: TiDBTable, + dagRequest: TiDAGRequest): SparkPlan = { + + val projectSet = AttributeSet(projectList.flatMap(_.references)) + val filterSet = AttributeSet(filterPredicates.flatMap(_.references)) + + val (pushdownFilters: Seq[Expression], residualFilters: Seq[Expression]) = + filterPredicates.partition((expression: Expression) => + TiExprUtils.isSupportedFilter(expression, source, blocklist)) + + val residualFilter: Option[Expression] = + residualFilters.reduceLeftOption(catalyst.expressions.And) + + val tiColumns = buildTiColumnRefFromColumnSeq(projectSet ++ filterSet, source) + + filterToDAGRequest(tiColumns, pushdownFilters, source, dagRequest) + + if (tiColumns.isEmpty) { + // we cannot send a request with empty columns + if (dagRequest.hasIndex) { + // add the first index column so that the plan will contain at least one column. + val idxColumn = dagRequest.getIndexInfo.getIndexColumns.get(0) + dagRequest.addRequiredColumn(ColumnRef.create(idxColumn.getName, source.table)) + } else { + // add a random column so that the plan will contain at least one column. + // if the table contains a primary key then use the PK instead. + val column = source.table.getColumns.asScala + .collectFirst { + case e if e.isPrimaryKey => e + } + .getOrElse(source.table.getColumn(0)) + dagRequest.addRequiredColumn(ColumnRef.create(column.getName, source.table)) + } + } + + // Right now we still use a projection even if the only evaluation is applying an alias + // to a column. Since this is a no-op, it could be avoided. However, using this + // optimization with the current implementation would change the output schema. + // TODO: Decouple final output schema from expression evaluation so this copy can be + // avoided safely. + if (AttributeSet(projectList.map(_.toAttribute)) == projectSet && + filterSet.subsetOf(projectSet)) { + // When it is possible to just use column pruning to get the right projection and + // when the columns of this projection are enough to evaluate all filter conditions, + // just do a scan followed by a filter, with no extra project. + val projectSeq: Seq[Attribute] = projectList.asInstanceOf[Seq[Attribute]] + projectSeq.foreach( + attr => + dagRequest.addRequiredColumn( + ColumnRef.create(attr.name, source.table.getColumn(attr.name)))) + val scan = toCoprocessorRDD(source, projectSeq, dagRequest) + residualFilter.fold(scan)(FilterExec(_, scan)) + } else { + // for now all column used will be returned for old interface + // TODO: once switch to new interface we change this pruning logic + val projectSeq: Seq[Attribute] = (projectSet ++ filterSet).toSeq + projectSeq.foreach( + attr => + dagRequest.addRequiredColumn( + ColumnRef.create(attr.name, source.table.getColumn(attr.name)))) + val scan = toCoprocessorRDD(source, projectSeq, dagRequest) + ProjectExec(projectList, residualFilter.fold(scan)(FilterExec(_, scan))) + } + } + + private def groupAggregateProjection( + tiColumns: Seq[TiColumnRef], + groupingExpressions: Seq[NamedExpression], + aggregateExpressions: Seq[AggregateExpression], + resultExpressions: Seq[NamedExpression], + source: TiDBTable, + dagReq: TiDAGRequest): Seq[SparkPlan] = { + val deterministicAggAliases = aggregateExpressions.collect { + case e if e.deterministic => e.canonicalized -> ReflectionUtil.newAlias(e, e.toString()) + }.toMap + + def aliasPushedPartialResult(e: AggregateExpression): Alias = + deterministicAggAliases.getOrElse(e.canonicalized, ReflectionUtil.newAlias(e, e.toString())) + + val residualAggregateExpressions = aggregateExpressions.map { aggExpr => + // As `aggExpr` is being pushing down to TiKV, we need to replace the original Catalyst + // aggregate expressions with new ones that merges the partial aggregation results returned by + // TiKV. + // + // NOTE: Unlike simple aggregate functions (e.g., `Max`, `Min`, etc.), `Count` must be + // replaced with a `Sum` to sum up the partial counts returned by TiKV. + // + // NOTE: All `Average`s should have already been rewritten into `Sum`s and `Count`s by the + // `TiAggregation` pattern extractor. + + // An attribute referring to the partial aggregation results returned by TiKV. + val partialResultRef = aliasPushedPartialResult(aggExpr).toAttribute + + aggExpr.aggregateFunction match { + case e: Max => aggExpr.copy(aggregateFunction = e.copy(child = partialResultRef)) + case e: Min => aggExpr.copy(aggregateFunction = e.copy(child = partialResultRef)) + case e: Sum => aggExpr.copy(aggregateFunction = e.copy(child = partialResultRef)) + case e: SpecialSum => aggExpr.copy(aggregateFunction = e.copy(child = partialResultRef)) + case e: First => aggExpr.copy(aggregateFunction = e.copy(child = partialResultRef)) + case _: Count => + aggExpr.copy(aggregateFunction = SumNotNullable(partialResultRef)) + case _: Average => throw new IllegalStateException("All AVGs should have been rewritten.") + case _ => aggExpr + } + } + + tiColumns foreach { + dagReq.addRequiredColumn + } + + aggregationToDAGRequest(groupingExpressions, aggregateExpressions.distinct, source, dagReq) + + val aggregateAttributes = + aggregateExpressions.map(expr => aliasPushedPartialResult(expr).toAttribute) + val groupAttributes = groupingExpressions.map(_.toAttribute) + + // output of Coprocessor plan should contain all references within + // aggregates and group by expressions + val output = aggregateAttributes ++ groupAttributes + + val groupExpressionMap = + groupingExpressions.map(expr => expr.exprId -> expr.toAttribute).toMap + + // resultExpression might refer to some of the group by expressions + // Those expressions originally refer to table columns but now it refers to + // results of coprocessor. + // For example, select a + 1 from t group by a + 1 + // expression a + 1 has been pushed down to coprocessor + // and in turn a + 1 in projection should be replaced by + // reference of coprocessor output entirely + val rewrittenResultExpressions = resultExpressions.map { + _.transform { + case e: NamedExpression => groupExpressionMap.getOrElse(e.exprId, e) + }.asInstanceOf[NamedExpression] + } + + aggregate.AggUtils.planAggregateWithoutDistinct( + groupAttributes, + residualAggregateExpressions, + rewrittenResultExpressions, + toCoprocessorRDD(source, output, dagReq)) + } + + private def isValidAggregates( + groupingExpressions: Seq[NamedExpression], + aggregateExpressions: Seq[AggregateExpression], + filters: Seq[Expression], + source: TiDBTable): Boolean = + allowAggregationPushDown && + filters.forall(TiExprUtils.isSupportedFilter(_, source, blocklist)) && + groupingExpressions.forall(TiExprUtils.isSupportedGroupingExpr(_, source, blocklist)) && + aggregateExpressions.forall(TiExprUtils.isSupportedAggregate(_, source, blocklist)) && + !aggregateExpressions.exists(_.isDistinct) && + // TODO: This is a temporary fix for the issue: https://github.com/pingcap/tispark/issues/1039 + !groupingExpressions.exists(_.isInstanceOf[Alias]) + + // We do through similar logic with original Spark as in SparkStrategies.scala + // Difference is we need to test if a sub-plan can be consumed all together by TiKV + // and then we don't return (don't planLater) and plan the remaining all at once + // TODO: This test should be done once for all children + private def doPlan(source: TiDBTable, plan: LogicalPlan): Seq[SparkPlan] = + plan match { + case logical.ReturnAnswer(rootPlan) => + rootPlan match { + case logical.Limit(IntegerLiteral(limit), logical.Sort(order, true, child)) => + takeOrderedAndProject(limit, order, child, child.output) :: Nil + case logical.Limit( + IntegerLiteral(limit), + logical.Project(projectList, logical.Sort(order, true, child))) => + takeOrderedAndProject(limit, order, child, projectList) :: Nil + case logical.Limit(IntegerLiteral(limit), child) => + execution.CollectLimitExec(limit, collectLimit(limit, child)) :: Nil + case other => planLater(other) :: Nil + } + case logical.Limit(IntegerLiteral(limit), logical.Sort(order, true, child)) => + takeOrderedAndProject(limit, order, child, child.output) :: Nil + case logical.Limit( + IntegerLiteral(limit), + logical.Project(projectList, logical.Sort(order, true, child))) => + takeOrderedAndProject(limit, order, child, projectList) :: Nil + // Collapse filters and projections and push plan directly + case PhysicalOperation( + projectList, + filters, + DataSourceV2ScanRelation( + DataSourceV2Relation(source: TiDBTable, _, _, _, _), + _, + _)) => + pruneFilterProject(projectList, filters, source, newTiDAGRequest()) :: Nil + + // Basic logic of original Spark's aggregation plan is: + // PhysicalAggregation extractor will rewrite original aggregation + // into aggregateExpressions and resultExpressions. + // resultExpressions contains only references [[AttributeReference]] + // to the result of aggregation. resultExpressions might contain projections + // like Add(sumResult, 1). + // For a aggregate like agg(expr) + 1, the rewrite process is: rewrite agg(expr) -> + // 1. pushdown: agg(expr) as agg1, if avg then sum(expr), count(expr) + // 2. residual expr (for Spark itself): agg(agg1) as finalAgg1 the parameter is a + // reference to pushed plan's corresponding aggregation + // 3. resultExpressions: finalAgg1 + 1, the finalAgg1 is the reference to final result + // of the aggregation + case TiAggregation( + groupingExpressions, + aggregateExpressions, + resultExpressions, + TiAggregationProjectionV2(filters, _, `source`, projects)) + if isValidAggregates(groupingExpressions, aggregateExpressions, filters, source) => + val projectSet = AttributeSet((projects ++ filters).flatMap { + _.references + }) + val tiColumns = buildTiColumnRefFromColumnSeq(projectSet, source) + val dagReq: TiDAGRequest = + filterToDAGRequest(tiColumns, filters, source, newTiDAGRequest()) + groupAggregateProjection( + tiColumns, + groupingExpressions, + aggregateExpressions, + resultExpressions, + `source`, + dagReq) + case _ => Nil + } +} diff --git a/tikv-client/src/main/java/com/pingcap/tikv/AbstractGRPCClient.java b/tikv-client/src/main/java/com/pingcap/tikv/AbstractGRPCClient.java index b75e550e67..954d971f37 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/AbstractGRPCClient.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/AbstractGRPCClient.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/BytePairWrapper.java b/tikv-client/src/main/java/com/pingcap/tikv/BytePairWrapper.java index c19a82aa38..def4489eaf 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/BytePairWrapper.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/BytePairWrapper.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/ByteWrapper.java b/tikv-client/src/main/java/com/pingcap/tikv/ByteWrapper.java index 13e97119b5..93a90fc6ea 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/ByteWrapper.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/ByteWrapper.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/ExtendedDateTime.java b/tikv-client/src/main/java/com/pingcap/tikv/ExtendedDateTime.java index 26a26fef77..e998202f46 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/ExtendedDateTime.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/ExtendedDateTime.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/KVClient.java b/tikv-client/src/main/java/com/pingcap/tikv/KVClient.java index e36fe4b3f6..4f0823fb8e 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/KVClient.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/KVClient.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/Main.java b/tikv-client/src/main/java/com/pingcap/tikv/Main.java index 7f1d8c4e30..566ba07d35 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/Main.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/Main.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/PDClient.java b/tikv-client/src/main/java/com/pingcap/tikv/PDClient.java index 61eed95ab7..04d2643e2c 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/PDClient.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/PDClient.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/ReadOnlyPDClient.java b/tikv-client/src/main/java/com/pingcap/tikv/ReadOnlyPDClient.java index d9b620bcf1..14b6adff13 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/ReadOnlyPDClient.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/ReadOnlyPDClient.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/Snapshot.java b/tikv-client/src/main/java/com/pingcap/tikv/Snapshot.java index 14d5e38b34..640b9e2cab 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/Snapshot.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/Snapshot.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/StoreVersion.java b/tikv-client/src/main/java/com/pingcap/tikv/StoreVersion.java index 77c83f2dab..af43db6440 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/StoreVersion.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/StoreVersion.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/TTLManager.java b/tikv-client/src/main/java/com/pingcap/tikv/TTLManager.java index 510dd875ee..fb50efa48d 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/TTLManager.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/TTLManager.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/TiBatchWriteUtils.java b/tikv-client/src/main/java/com/pingcap/tikv/TiBatchWriteUtils.java index f3fb8db58c..b90d0716aa 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/TiBatchWriteUtils.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/TiBatchWriteUtils.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/TiConfiguration.java b/tikv-client/src/main/java/com/pingcap/tikv/TiConfiguration.java index f74a532206..c9ac2b81b5 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/TiConfiguration.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/TiConfiguration.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/TiDBJDBCClient.java b/tikv-client/src/main/java/com/pingcap/tikv/TiDBJDBCClient.java index bffa062ca0..afe2336c8c 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/TiDBJDBCClient.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/TiDBJDBCClient.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/TiSession.java b/tikv-client/src/main/java/com/pingcap/tikv/TiSession.java index 6582151469..139c4edbc0 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/TiSession.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/TiSession.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/TwoPhaseCommitter.java b/tikv-client/src/main/java/com/pingcap/tikv/TwoPhaseCommitter.java index 6a11f3b91d..b7206a94da 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/TwoPhaseCommitter.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/TwoPhaseCommitter.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/Utils.java b/tikv-client/src/main/java/com/pingcap/tikv/Utils.java index cac01cc6ed..527141c017 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/Utils.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/Utils.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/Version.java b/tikv-client/src/main/java/com/pingcap/tikv/Version.java index 569cf33a31..1ae6f6420b 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/Version.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/Version.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/allocator/RowIDAllocator.java b/tikv-client/src/main/java/com/pingcap/tikv/allocator/RowIDAllocator.java index 065e1af3e6..c4d6fe7557 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/allocator/RowIDAllocator.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/allocator/RowIDAllocator.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/catalog/Catalog.java b/tikv-client/src/main/java/com/pingcap/tikv/catalog/Catalog.java index aa3ca80681..723884f388 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/catalog/Catalog.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/catalog/Catalog.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/catalog/CatalogTransaction.java b/tikv-client/src/main/java/com/pingcap/tikv/catalog/CatalogTransaction.java index 9ad28bf5eb..5fff9a7bf0 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/catalog/CatalogTransaction.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/catalog/CatalogTransaction.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/codec/Codec.java b/tikv-client/src/main/java/com/pingcap/tikv/codec/Codec.java index dcf1a25047..4bcf389992 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/codec/Codec.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/codec/Codec.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataInput.java b/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataInput.java index fc14af198f..5873c28e52 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataInput.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataInput.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataInputLittleEndian.java b/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataInputLittleEndian.java index 9128d37c13..70fc4008a9 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataInputLittleEndian.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataInputLittleEndian.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataOutput.java b/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataOutput.java index 93246cecf7..16aec4ce69 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataOutput.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataOutput.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataOutputLittleEndian.java b/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataOutputLittleEndian.java index b15449b2a4..657990c3c5 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataOutputLittleEndian.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/codec/CodecDataOutputLittleEndian.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/codec/KeyUtils.java b/tikv-client/src/main/java/com/pingcap/tikv/codec/KeyUtils.java index 67da7d3a59..c3a585a3d9 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/codec/KeyUtils.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/codec/KeyUtils.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/codec/MetaCodec.java b/tikv-client/src/main/java/com/pingcap/tikv/codec/MetaCodec.java index e0c3b61446..943c5626c9 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/codec/MetaCodec.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/codec/MetaCodec.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/codec/MyDecimal.java b/tikv-client/src/main/java/com/pingcap/tikv/codec/MyDecimal.java index 8bdc546e42..f57d405824 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/codec/MyDecimal.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/codec/MyDecimal.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/codec/RowDecoderV2.java b/tikv-client/src/main/java/com/pingcap/tikv/codec/RowDecoderV2.java index 3fc0f63449..7f1b5d0e4f 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/codec/RowDecoderV2.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/codec/RowDecoderV2.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/codec/RowEncoderV2.java b/tikv-client/src/main/java/com/pingcap/tikv/codec/RowEncoderV2.java index 4680396b68..04d6ee6f42 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/codec/RowEncoderV2.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/codec/RowEncoderV2.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/codec/RowV2.java b/tikv-client/src/main/java/com/pingcap/tikv/codec/RowV2.java index 5a7c2856fd..0f6dda38c0 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/codec/RowV2.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/codec/RowV2.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/codec/TableCodec.java b/tikv-client/src/main/java/com/pingcap/tikv/codec/TableCodec.java index 75c7b18e45..77e111ecff 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/codec/TableCodec.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/codec/TableCodec.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/codec/TableCodecV1.java b/tikv-client/src/main/java/com/pingcap/tikv/codec/TableCodecV1.java index bf7a45ef78..762f148cc0 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/codec/TableCodecV1.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/codec/TableCodecV1.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/codec/TableCodecV2.java b/tikv-client/src/main/java/com/pingcap/tikv/codec/TableCodecV2.java index f00eb0cf62..997a353d37 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/codec/TableCodecV2.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/codec/TableCodecV2.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/BatchedTiChunkColumnVector.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/BatchedTiChunkColumnVector.java index e8437f2cfb..03b3ca3fa7 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/BatchedTiChunkColumnVector.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/BatchedTiChunkColumnVector.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiBlockColumnVector.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiBlockColumnVector.java index 9c35f55d74..c683776dcc 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiBlockColumnVector.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiBlockColumnVector.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiChunk.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiChunk.java index 9968b35c03..f0e7036729 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiChunk.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiChunk.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiChunkColumnVector.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiChunkColumnVector.java index 56b27fbc6f..a58090ee9a 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiChunkColumnVector.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiChunkColumnVector.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiColumnVector.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiColumnVector.java index c22b13aa41..eee0f5070c 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiColumnVector.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiColumnVector.java @@ -1,12 +1,11 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Copyright 2022 PingCAP, Inc. * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiCoreTime.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiCoreTime.java index b528bce73e..607a7105b7 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiCoreTime.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiCoreTime.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiRowColumnVector.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiRowColumnVector.java index d59e823294..2f9081b7f4 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiRowColumnVector.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/TiRowColumnVector.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/AutoGrowByteBuffer.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/AutoGrowByteBuffer.java index 936513ccfb..c6a372de58 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/AutoGrowByteBuffer.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/AutoGrowByteBuffer.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHType.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHType.java index 51cf420e69..9c03b6d000 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHType.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeDate.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeDate.java index d096153956..0ce8449c46 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeDate.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeDate.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeDateTime.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeDateTime.java index 48b278944e..7a15f1fd01 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeDateTime.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeDateTime.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeDecimal.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeDecimal.java index bada7bddca..c372831771 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeDecimal.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeDecimal.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeFixedString.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeFixedString.java index 779a134f39..0d6e17cfea 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeFixedString.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeFixedString.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeMyDate.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeMyDate.java index bf9b2c4ab7..24f00b7537 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeMyDate.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeMyDate.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeMyDateTime.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeMyDateTime.java index 3b6c9cee5d..f46a316016 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeMyDateTime.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeMyDateTime.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeNumber.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeNumber.java index cb34ccb4f3..7262c77b33 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeNumber.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeNumber.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeString.java b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeString.java index 9ce37cb77b..de8f4cda68 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeString.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/columnar/datatypes/CHTypeString.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/event/CacheInvalidateEvent.java b/tikv-client/src/main/java/com/pingcap/tikv/event/CacheInvalidateEvent.java index ff8db9c1a1..20284654cc 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/event/CacheInvalidateEvent.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/event/CacheInvalidateEvent.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/AllocateRowIDOverflowException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/AllocateRowIDOverflowException.java index 141eb5d989..ad2f9a4554 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/AllocateRowIDOverflowException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/AllocateRowIDOverflowException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/CastingException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/CastingException.java index 329dd192d5..ffd45e37e3 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/CastingException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/CastingException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/CodecException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/CodecException.java index 6e90174377..b7bcc7c31a 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/CodecException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/CodecException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/ConvertNotSupportException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/ConvertNotSupportException.java index 074e058c43..ca08dc2961 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/ConvertNotSupportException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/ConvertNotSupportException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/ConvertOverflowException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/ConvertOverflowException.java index 7db8664fda..f167f5641d 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/ConvertOverflowException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/ConvertOverflowException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/DAGRequestException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/DAGRequestException.java index 9d3bf7c0c6..184ba025a0 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/DAGRequestException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/DAGRequestException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/GrpcException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/GrpcException.java index 67e1a3cce6..05b252fa66 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/GrpcException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/GrpcException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/IgnoreUnsupportedTypeException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/IgnoreUnsupportedTypeException.java index 366869a1cb..6eed02d099 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/IgnoreUnsupportedTypeException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/IgnoreUnsupportedTypeException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/InvalidCodecFormatException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/InvalidCodecFormatException.java index 718da12675..741593251a 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/InvalidCodecFormatException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/InvalidCodecFormatException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/KeyException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/KeyException.java index bd8dbe8195..ead9cdaebd 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/KeyException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/KeyException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/LockException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/LockException.java index 02a7969d03..5cd4ccb6c4 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/LockException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/LockException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/RegionException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/RegionException.java index eee29376f6..60aff54781 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/RegionException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/RegionException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/RegionTaskException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/RegionTaskException.java index 4047b3f5a5..8bf9901f94 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/RegionTaskException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/RegionTaskException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/ResolveLockException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/ResolveLockException.java index 28d62d8fa3..393f42a163 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/ResolveLockException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/ResolveLockException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/SelectException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/SelectException.java index 0b5758bf4e..6b605d708a 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/SelectException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/SelectException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/TiBatchWriteException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/TiBatchWriteException.java index 957fe4320a..ad5de479d8 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/TiBatchWriteException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/TiBatchWriteException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/TiClientInternalException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/TiClientInternalException.java index 1c3b1e836c..0d6dcd96e1 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/TiClientInternalException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/TiClientInternalException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/TiDBConvertException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/TiDBConvertException.java index 5e47f47653..5a108d430a 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/TiDBConvertException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/TiDBConvertException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/TiExpressionException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/TiExpressionException.java index c9f7d9353c..4b5a3b9117 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/TiExpressionException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/TiExpressionException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/TiInternalException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/TiInternalException.java index 739c8c1148..cda4d8aae3 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/TiInternalException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/TiInternalException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/TiKVException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/TiKVException.java index 14b6e08e88..180b830122 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/TiKVException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/TiKVException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/TxnNotFoundException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/TxnNotFoundException.java index a19ed03484..353f3c6f93 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/TxnNotFoundException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/TxnNotFoundException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/TypeException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/TypeException.java index 8c4ecee700..ff402fb8d6 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/TypeException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/TypeException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/UnsupportedPartitionExprException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/UnsupportedPartitionExprException.java index 874f93696b..f8b79129c6 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/UnsupportedPartitionExprException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/UnsupportedPartitionExprException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/UnsupportedSyntaxException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/UnsupportedSyntaxException.java index f2f8dc1c82..aba93b4864 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/UnsupportedSyntaxException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/UnsupportedSyntaxException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/UnsupportedTypeException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/UnsupportedTypeException.java index 92a9a05c14..5dcde7971f 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/UnsupportedTypeException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/UnsupportedTypeException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/exception/WriteConflictException.java b/tikv-client/src/main/java/com/pingcap/tikv/exception/WriteConflictException.java index 113f94382d..fef401f688 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/exception/WriteConflictException.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/exception/WriteConflictException.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/AggregateFunction.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/AggregateFunction.java index 9961ff6924..0619be26b2 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/AggregateFunction.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/AggregateFunction.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/ArithmeticBinaryExpression.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/ArithmeticBinaryExpression.java index b4dee817e9..2be4529293 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/ArithmeticBinaryExpression.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/ArithmeticBinaryExpression.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/Blocklist.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/Blocklist.java index 4d965a5ccc..f8ccd9f3a9 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/Blocklist.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/Blocklist.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/ByItem.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/ByItem.java index 601de292c3..7d27477c6e 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/ByItem.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/ByItem.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/ColumnRef.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/ColumnRef.java index 8b53003a64..e3fbd75b9d 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/ColumnRef.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/ColumnRef.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/ComparisonBinaryExpression.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/ComparisonBinaryExpression.java index 203d8c2e12..137bb70bfb 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/ComparisonBinaryExpression.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/ComparisonBinaryExpression.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/Constant.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/Constant.java index 5dbe77e975..b04602d31a 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/Constant.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/Constant.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/Expression.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/Expression.java index c284d0e66c..edf21f8fe5 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/Expression.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/Expression.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/ExpressionBlocklist.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/ExpressionBlocklist.java index d49de656b9..0b76e0edaf 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/ExpressionBlocklist.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/ExpressionBlocklist.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/FuncCallExpr.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/FuncCallExpr.java index 40ffc84557..57689017d8 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/FuncCallExpr.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/FuncCallExpr.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/FuncCallExprEval.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/FuncCallExprEval.java index 5c312ebf06..83da83cb34 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/FuncCallExprEval.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/FuncCallExprEval.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/IsNull.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/IsNull.java index 19966b02d0..1959baa78a 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/IsNull.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/IsNull.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/LogicalBinaryExpression.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/LogicalBinaryExpression.java index 8661bacace..25a1dd8610 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/LogicalBinaryExpression.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/LogicalBinaryExpression.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/Not.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/Not.java index 490b75c5ab..1834a6eb6c 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/Not.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/Not.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/PartitionPruner.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/PartitionPruner.java index 3e0dd269d6..b071a711ff 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/PartitionPruner.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/PartitionPruner.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/RangeColumnPartitionPruner.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/RangeColumnPartitionPruner.java index 13d04d06a6..9d65a39ea8 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/RangeColumnPartitionPruner.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/RangeColumnPartitionPruner.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/RangePartitionPruner.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/RangePartitionPruner.java index ca1a41e8c4..60a8b94061 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/RangePartitionPruner.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/RangePartitionPruner.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/StringRegExpression.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/StringRegExpression.java index 425dd73826..2ab379e430 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/StringRegExpression.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/StringRegExpression.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/TypeBlocklist.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/TypeBlocklist.java index ddea2c378d..da4a8ec5cb 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/TypeBlocklist.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/TypeBlocklist.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/Visitor.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/Visitor.java index 48a29902e4..a6d214dfb5 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/Visitor.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/Visitor.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/ColumnMatcher.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/ColumnMatcher.java index e6d8bf6188..c25e148b5a 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/ColumnMatcher.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/ColumnMatcher.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/DefaultVisitor.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/DefaultVisitor.java index 26bad7a433..555ded9014 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/DefaultVisitor.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/DefaultVisitor.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/IndexMatcher.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/IndexMatcher.java index 654007cdec..fff012242a 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/IndexMatcher.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/IndexMatcher.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/IndexRangeSetBuilder.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/IndexRangeSetBuilder.java index 434dda9204..4ec39b2688 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/IndexRangeSetBuilder.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/IndexRangeSetBuilder.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/MetaResolver.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/MetaResolver.java index c7ad80f733..4de42fca58 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/MetaResolver.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/MetaResolver.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/PartAndFilterExprRewriter.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/PartAndFilterExprRewriter.java index 4555a7dc2e..db94cb0721 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/PartAndFilterExprRewriter.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/PartAndFilterExprRewriter.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/ProtoConverter.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/ProtoConverter.java index 2df77a3405..5cb9331273 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/ProtoConverter.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/ProtoConverter.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/PrunedPartitionBuilder.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/PrunedPartitionBuilder.java index 625f4468cd..39b9cceabf 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/PrunedPartitionBuilder.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/PrunedPartitionBuilder.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/PseudoCostCalculator.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/PseudoCostCalculator.java index eaaa6b5218..d014503a89 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/PseudoCostCalculator.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/PseudoCostCalculator.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/RangeSetBuilder.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/RangeSetBuilder.java index aae5376b6d..2e5f1b9697 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/RangeSetBuilder.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/RangeSetBuilder.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/SupportedExpressionValidator.java b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/SupportedExpressionValidator.java index fef0bc95d7..bfc99ee292 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/SupportedExpressionValidator.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/expression/visitor/SupportedExpressionValidator.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/jdbc/JDBCClient.java b/tikv-client/src/main/java/com/pingcap/tikv/jdbc/JDBCClient.java new file mode 100644 index 0000000000..6fa6f5a5da --- /dev/null +++ b/tikv-client/src/main/java/com/pingcap/tikv/jdbc/JDBCClient.java @@ -0,0 +1,130 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.pingcap.tikv.jdbc; + +import java.sql.Connection; +import java.sql.Driver; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Properties; +import lombok.SneakyThrows; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class JDBCClient { + + public static final String SQL_SHOW_GRANTS = "SHOW GRANTS"; + public static final String GET_PD_ADDRESS = + "SELECT `INSTANCE` FROM `INFORMATION_SCHEMA`.`CLUSTER_INFO` WHERE `TYPE` = 'pd'"; + private static final String MYSQL_DRIVER_NAME = "com.mysql.jdbc.Driver"; + private static final String SQL_SHOW_GRANTS_USING_ROLE = "SHOW GRANTS FOR CURRENT_USER USING "; + private static final String SELECT_CURRENT_USER = "SELECT CURRENT_USER()"; + private final Logger logger = LoggerFactory.getLogger(getClass().getName()); + + private final String url; + + private final Driver driver; + + private final Properties properties; + + public JDBCClient(String url, Properties properties) { + this.url = url; + this.properties = properties; + this.driver = createDriver(); + } + + public List showGrants() { + try { + return query(SQL_SHOW_GRANTS, (rs, rowNum) -> rs.getString(1)); + } catch (SQLException e) { + return Collections.emptyList(); + } + } + + public String getPDAddress() throws SQLException { + return queryForObject(GET_PD_ADDRESS, (rs, rowNum) -> rs.getString(1)); + } + + public String getCurrentUser() throws SQLException { + return queryForObject(SELECT_CURRENT_USER, (rs, rowNum) -> rs.getString(1)); + } + + public List showGrantsUsingRole(List roles) { + StringBuilder builder = new StringBuilder(SQL_SHOW_GRANTS_USING_ROLE); + for (int i = 0; i < roles.size(); i++) { + builder.append("?").append(","); + } + String statement = builder.deleteCharAt(builder.length() - 1).toString(); + + try (Connection connection = driver.connect(url, properties); + PreparedStatement tidbStmt = connection.prepareStatement(statement)) { + List result = new ArrayList<>(); + for (int i = 0; i < roles.size(); i++) { + tidbStmt.setString(i + 1, roles.get(i)); + } + ResultSet resultSet = tidbStmt.executeQuery(); + ResultSetMetaData rsMetaData = resultSet.getMetaData(); + + while (resultSet.next()) { + for (int i = 1; i <= rsMetaData.getColumnCount(); i++) { + result.add(resultSet.getString(i)); + } + } + return result; + } catch (SQLException e) { + logger.warn("Failed to show grants using role", e); + return Collections.emptyList(); + } + } + + private List query(String sql, RowMapper rowMapper) throws SQLException { + try (Connection connection = driver.connect(url, properties); + Statement tidbStmt = connection.createStatement(); + ResultSet resultSet = tidbStmt.executeQuery(sql)) { + return extractData(resultSet, rowMapper); + } + } + + private T queryForObject(String sql, RowMapper rowMapper) throws SQLException { + List result = query(sql, rowMapper); + if (result.size() != 1) { + throw new IllegalArgumentException( + "queryForObject() result size: expected 1, acctually " + result.size()); + } + return result.get(0); + } + + private List extractData(ResultSet rs, RowMapper rowMapper) throws SQLException { + List results = new ArrayList<>(); + int rowNum = 0; + while (rs.next()) { + results.add(rowMapper.mapRow(rs, rowNum++)); + } + return results; + } + + @SneakyThrows + private Driver createDriver() { + return (Driver) Class.forName(MYSQL_DRIVER_NAME).getDeclaredConstructor().newInstance(); + } +} diff --git a/tikv-client/src/main/java/com/pingcap/tikv/jdbc/RowMapper.java b/tikv-client/src/main/java/com/pingcap/tikv/jdbc/RowMapper.java new file mode 100644 index 0000000000..7996f20743 --- /dev/null +++ b/tikv-client/src/main/java/com/pingcap/tikv/jdbc/RowMapper.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.pingcap.tikv.jdbc; + +import java.sql.ResultSet; +import java.sql.SQLException; + +@FunctionalInterface +public interface RowMapper { + + /** + * Implementations must implement this method to map each row of data in the ResultSet. This + * method should not call {@code next()} on the ResultSet; it is only supposed to map values of + * the current row. + * + * @param rs the ResultSet to map (pre-initialized for the current row) + * @param rowNum the number of the current row + * @return the result object for the current row (may be {@code null}) + * @throws SQLException if an SQLException is encountered getting column values (that is, there's + * no need to catch SQLException) + */ + T mapRow(ResultSet rs, int rowNum) throws SQLException; +} diff --git a/tikv-client/src/main/java/com/pingcap/tikv/key/CommonHandle.java b/tikv-client/src/main/java/com/pingcap/tikv/key/CommonHandle.java index d197689cd3..b4693b8544 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/key/CommonHandle.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/key/CommonHandle.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/key/CompoundKey.java b/tikv-client/src/main/java/com/pingcap/tikv/key/CompoundKey.java index f2bb674728..c3aec286e0 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/key/CompoundKey.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/key/CompoundKey.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/key/Handle.java b/tikv-client/src/main/java/com/pingcap/tikv/key/Handle.java index dabe47217d..02700d3b55 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/key/Handle.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/key/Handle.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/key/IndexKey.java b/tikv-client/src/main/java/com/pingcap/tikv/key/IndexKey.java index 369a38bcd5..f077b2bc78 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/key/IndexKey.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/key/IndexKey.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/key/IndexScanKeyRangeBuilder.java b/tikv-client/src/main/java/com/pingcap/tikv/key/IndexScanKeyRangeBuilder.java index 50625f6801..63aba1fe0c 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/key/IndexScanKeyRangeBuilder.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/key/IndexScanKeyRangeBuilder.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/key/IntHandle.java b/tikv-client/src/main/java/com/pingcap/tikv/key/IntHandle.java index 29ca605cdc..7b37fb9bca 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/key/IntHandle.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/key/IntHandle.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/key/Key.java b/tikv-client/src/main/java/com/pingcap/tikv/key/Key.java index 667c02490a..710c9988a8 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/key/Key.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/key/Key.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/key/KeyRangeBuilder.java b/tikv-client/src/main/java/com/pingcap/tikv/key/KeyRangeBuilder.java index 22435559c1..85d51ed62d 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/key/KeyRangeBuilder.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/key/KeyRangeBuilder.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/key/RowKey.java b/tikv-client/src/main/java/com/pingcap/tikv/key/RowKey.java index fe9ced15cd..88f1516969 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/key/RowKey.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/key/RowKey.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/key/StatisticsKeyRangeBuilder.java b/tikv-client/src/main/java/com/pingcap/tikv/key/StatisticsKeyRangeBuilder.java index ffa2d308b0..38808bc7b0 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/key/StatisticsKeyRangeBuilder.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/key/StatisticsKeyRangeBuilder.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/key/TypedKey.java b/tikv-client/src/main/java/com/pingcap/tikv/key/TypedKey.java index a394b491c7..164b6a1437 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/key/TypedKey.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/key/TypedKey.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/CIStr.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/CIStr.java index b93af6e491..8233d49576 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/CIStr.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/CIStr.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/Collation.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/Collation.java index 5ea3173c32..e0bb7a7f68 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/Collation.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/Collation.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/IndexType.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/IndexType.java index 4587faad52..67c5aad7e2 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/IndexType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/IndexType.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/SchemaState.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/SchemaState.java index dbd0dfaa09..0140103dac 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/SchemaState.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/SchemaState.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiColumnInfo.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiColumnInfo.java index 7645f13d5b..0605f1480d 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiColumnInfo.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiColumnInfo.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiDAGRequest.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiDAGRequest.java index 5569074c6a..3bc15b437a 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiDAGRequest.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiDAGRequest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiDBInfo.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiDBInfo.java index 5c6a76806e..a57317290b 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiDBInfo.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiDBInfo.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiFlashReplicaInfo.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiFlashReplicaInfo.java index c740ba30db..83ace50d8f 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiFlashReplicaInfo.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiFlashReplicaInfo.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiIndexColumn.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiIndexColumn.java index 9c93bff633..65a964cb30 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiIndexColumn.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiIndexColumn.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiIndexInfo.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiIndexInfo.java index 5786ace74d..b8fec0f2e5 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiIndexInfo.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiIndexInfo.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiPartitionDef.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiPartitionDef.java index 88350a4267..9721d633be 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiPartitionDef.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiPartitionDef.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiPartitionExpr.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiPartitionExpr.java index 674d8045af..dd841ab621 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiPartitionExpr.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiPartitionExpr.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiPartitionInfo.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiPartitionInfo.java index 4164063d1f..cfc1e86e88 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiPartitionInfo.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiPartitionInfo.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiSequenceInfo.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiSequenceInfo.java index 69a54f33b8..10d128fae3 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiSequenceInfo.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiSequenceInfo.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiTableInfo.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiTableInfo.java index 142942b979..744712b82f 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiTableInfo.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiTableInfo.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiTimestamp.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiTimestamp.java index b10b803a83..021e36479f 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiTimestamp.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiTimestamp.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiUserIdentity.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiUserIdentity.java index 1b42e20145..d8a566bdb5 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiUserIdentity.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiUserIdentity.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiViewInfo.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiViewInfo.java index 6e2352efe8..548a257231 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiViewInfo.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiViewInfo.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/operation/ErrorHandler.java b/tikv-client/src/main/java/com/pingcap/tikv/operation/ErrorHandler.java index 835451935a..124ff6b8ad 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/operation/ErrorHandler.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/operation/ErrorHandler.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/operation/KVErrorHandler.java b/tikv-client/src/main/java/com/pingcap/tikv/operation/KVErrorHandler.java index 526e6056c2..c5eb1a4fca 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/operation/KVErrorHandler.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/operation/KVErrorHandler.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/operation/NoopHandler.java b/tikv-client/src/main/java/com/pingcap/tikv/operation/NoopHandler.java index 9014de7445..4a48631cf3 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/operation/NoopHandler.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/operation/NoopHandler.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/operation/PDErrorHandler.java b/tikv-client/src/main/java/com/pingcap/tikv/operation/PDErrorHandler.java index a352132b17..8eff3887f6 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/operation/PDErrorHandler.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/operation/PDErrorHandler.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/operation/SchemaInfer.java b/tikv-client/src/main/java/com/pingcap/tikv/operation/SchemaInfer.java index 97b4eaeb79..c434fa9279 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/operation/SchemaInfer.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/operation/SchemaInfer.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/ChunkIterator.java b/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/ChunkIterator.java index 9d4410704a..7cbeeff55b 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/ChunkIterator.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/ChunkIterator.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/ConcreteScanIterator.java b/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/ConcreteScanIterator.java index cfa6016087..b600afaeb0 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/ConcreteScanIterator.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/ConcreteScanIterator.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/CoprocessorIterator.java b/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/CoprocessorIterator.java index 346933476f..cccd7779a2 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/CoprocessorIterator.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/CoprocessorIterator.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/DAGIterator.java b/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/DAGIterator.java index 8d7ef19748..ef9bb63b83 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/DAGIterator.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/DAGIterator.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/IndexScanIterator.java b/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/IndexScanIterator.java index b67cd7a6a9..a92390b568 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/IndexScanIterator.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/IndexScanIterator.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/ScanIterator.java b/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/ScanIterator.java index 5d413ef002..0146acd55e 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/ScanIterator.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/operation/iterator/ScanIterator.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/parser/AstBuilder.java b/tikv-client/src/main/java/com/pingcap/tikv/parser/AstBuilder.java index d78b985737..a0e888d61a 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/parser/AstBuilder.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/parser/AstBuilder.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/parser/CaseChangingCharStream.java b/tikv-client/src/main/java/com/pingcap/tikv/parser/CaseChangingCharStream.java index dc0f55141a..00de334069 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/parser/CaseChangingCharStream.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/parser/CaseChangingCharStream.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/parser/TiParser.java b/tikv-client/src/main/java/com/pingcap/tikv/parser/TiParser.java index e3b1959d11..305a8bdfd3 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/parser/TiParser.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/parser/TiParser.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/pd/PDError.java b/tikv-client/src/main/java/com/pingcap/tikv/pd/PDError.java index 28909ddab6..7b792d87ad 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/pd/PDError.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/pd/PDError.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/pd/PDUtils.java b/tikv-client/src/main/java/com/pingcap/tikv/pd/PDUtils.java index f781e54eb5..ccfd2c84c9 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/pd/PDUtils.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/pd/PDUtils.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/policy/RetryMaxMs.java b/tikv-client/src/main/java/com/pingcap/tikv/policy/RetryMaxMs.java index 1f9fe2a2f7..89772f55f4 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/policy/RetryMaxMs.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/policy/RetryMaxMs.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/policy/RetryPolicy.java b/tikv-client/src/main/java/com/pingcap/tikv/policy/RetryPolicy.java index 51f0c09170..1a5f49da0a 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/policy/RetryPolicy.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/policy/RetryPolicy.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/predicates/IndexRange.java b/tikv-client/src/main/java/com/pingcap/tikv/predicates/IndexRange.java index 22d97cf5cb..07776719d5 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/predicates/IndexRange.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/predicates/IndexRange.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/predicates/PredicateUtils.java b/tikv-client/src/main/java/com/pingcap/tikv/predicates/PredicateUtils.java index aecf6386f0..c1a0fcf333 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/predicates/PredicateUtils.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/predicates/PredicateUtils.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/predicates/ScanSpec.java b/tikv-client/src/main/java/com/pingcap/tikv/predicates/ScanSpec.java index 42c7f4203c..d0b8391638 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/predicates/ScanSpec.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/predicates/ScanSpec.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/predicates/SelectivityCalculator.java b/tikv-client/src/main/java/com/pingcap/tikv/predicates/SelectivityCalculator.java index 790e092dba..fb6a7684a4 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/predicates/SelectivityCalculator.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/predicates/SelectivityCalculator.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/predicates/TiKVScanAnalyzer.java b/tikv-client/src/main/java/com/pingcap/tikv/predicates/TiKVScanAnalyzer.java index b6b6bd54a5..103d42c178 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/predicates/TiKVScanAnalyzer.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/predicates/TiKVScanAnalyzer.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/region/AbstractRegionStoreClient.java b/tikv-client/src/main/java/com/pingcap/tikv/region/AbstractRegionStoreClient.java index 5a637cd5fe..ef060dcddc 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/region/AbstractRegionStoreClient.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/region/AbstractRegionStoreClient.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/region/RegionErrorReceiver.java b/tikv-client/src/main/java/com/pingcap/tikv/region/RegionErrorReceiver.java index 3c7f97a93e..a71e4fe79c 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/region/RegionErrorReceiver.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/region/RegionErrorReceiver.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/region/RegionManager.java b/tikv-client/src/main/java/com/pingcap/tikv/region/RegionManager.java index 301adbd6b6..aaf0c8a277 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/region/RegionManager.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/region/RegionManager.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/region/RegionStoreClient.java b/tikv-client/src/main/java/com/pingcap/tikv/region/RegionStoreClient.java index 4ebf44e7f6..676ea242e7 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/region/RegionStoreClient.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/region/RegionStoreClient.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/region/TiRegion.java b/tikv-client/src/main/java/com/pingcap/tikv/region/TiRegion.java index a1c96935ee..7b154b943f 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/region/TiRegion.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/region/TiRegion.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/region/TiStoreType.java b/tikv-client/src/main/java/com/pingcap/tikv/region/TiStoreType.java index 2a6234d3ba..0048de0ad6 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/region/TiStoreType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/region/TiStoreType.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/row/DefaultRowReader.java b/tikv-client/src/main/java/com/pingcap/tikv/row/DefaultRowReader.java index 96178d135a..f527843d14 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/row/DefaultRowReader.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/row/DefaultRowReader.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/row/ObjectRowImpl.java b/tikv-client/src/main/java/com/pingcap/tikv/row/ObjectRowImpl.java index 5a3cfba3b4..11afc8bb93 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/row/ObjectRowImpl.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/row/ObjectRowImpl.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/row/Row.java b/tikv-client/src/main/java/com/pingcap/tikv/row/Row.java index 160d760c78..888093e68d 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/row/Row.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/row/Row.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/row/RowReader.java b/tikv-client/src/main/java/com/pingcap/tikv/row/RowReader.java index 6c37e37f18..22a982c308 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/row/RowReader.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/row/RowReader.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/row/RowReaderFactory.java b/tikv-client/src/main/java/com/pingcap/tikv/row/RowReaderFactory.java index bbf8b9af3e..604b57633c 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/row/RowReaderFactory.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/row/RowReaderFactory.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/statistics/Bucket.java b/tikv-client/src/main/java/com/pingcap/tikv/statistics/Bucket.java index 06ba7dc528..1cbbafef90 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/statistics/Bucket.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/statistics/Bucket.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/statistics/CMSketch.java b/tikv-client/src/main/java/com/pingcap/tikv/statistics/CMSketch.java index fcdb12198b..20a6d4ce07 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/statistics/CMSketch.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/statistics/CMSketch.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/statistics/ColumnStatistics.java b/tikv-client/src/main/java/com/pingcap/tikv/statistics/ColumnStatistics.java index fb96ec5aa1..e1a3b7ca99 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/statistics/ColumnStatistics.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/statistics/ColumnStatistics.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/statistics/Histogram.java b/tikv-client/src/main/java/com/pingcap/tikv/statistics/Histogram.java index ec8d8e5d23..7ab8e81ca2 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/statistics/Histogram.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/statistics/Histogram.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/statistics/IndexStatistics.java b/tikv-client/src/main/java/com/pingcap/tikv/statistics/IndexStatistics.java index ea14257015..3559aa004b 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/statistics/IndexStatistics.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/statistics/IndexStatistics.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/statistics/TableStatistics.java b/tikv-client/src/main/java/com/pingcap/tikv/statistics/TableStatistics.java index 130b6927cc..71a4f7921d 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/statistics/TableStatistics.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/statistics/TableStatistics.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/streaming/StreamingResponse.java b/tikv-client/src/main/java/com/pingcap/tikv/streaming/StreamingResponse.java index d5e63dea2d..92c22651a5 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/streaming/StreamingResponse.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/streaming/StreamingResponse.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/tools/RegionUtils.java b/tikv-client/src/main/java/com/pingcap/tikv/tools/RegionUtils.java index 81a2a7848a..157de44133 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/tools/RegionUtils.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/tools/RegionUtils.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/txn/AbstractLockResolverClient.java b/tikv-client/src/main/java/com/pingcap/tikv/txn/AbstractLockResolverClient.java index 1e242f3a27..0e8be6ddfc 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/txn/AbstractLockResolverClient.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/txn/AbstractLockResolverClient.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/txn/AsyncResolveData.java b/tikv-client/src/main/java/com/pingcap/tikv/txn/AsyncResolveData.java index a494fd6a63..afd246d949 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/txn/AsyncResolveData.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/txn/AsyncResolveData.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/txn/Lock.java b/tikv-client/src/main/java/com/pingcap/tikv/txn/Lock.java index 6244c6adf5..15889560f3 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/txn/Lock.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/txn/Lock.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/txn/LockResolverClientV2.java b/tikv-client/src/main/java/com/pingcap/tikv/txn/LockResolverClientV2.java index 3461370808..84efa39bbb 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/txn/LockResolverClientV2.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/txn/LockResolverClientV2.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/txn/LockResolverClientV3.java b/tikv-client/src/main/java/com/pingcap/tikv/txn/LockResolverClientV3.java index 924a3bede9..f9511393bf 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/txn/LockResolverClientV3.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/txn/LockResolverClientV3.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/txn/LockResolverClientV4.java b/tikv-client/src/main/java/com/pingcap/tikv/txn/LockResolverClientV4.java index 10a0dbe7a3..ca616c4256 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/txn/LockResolverClientV4.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/txn/LockResolverClientV4.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/txn/ResolveLockResult.java b/tikv-client/src/main/java/com/pingcap/tikv/txn/ResolveLockResult.java index eed4e034b8..59d6ed512d 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/txn/ResolveLockResult.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/txn/ResolveLockResult.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/txn/TxnExpireTime.java b/tikv-client/src/main/java/com/pingcap/tikv/txn/TxnExpireTime.java index 726c03c9ec..a868d54eaf 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/txn/TxnExpireTime.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/txn/TxnExpireTime.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/txn/TxnKVClient.java b/tikv-client/src/main/java/com/pingcap/tikv/txn/TxnKVClient.java index 7e4fffc40e..ddac25fb01 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/txn/TxnKVClient.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/txn/TxnKVClient.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/txn/TxnStatus.java b/tikv-client/src/main/java/com/pingcap/tikv/txn/TxnStatus.java index 00b92cb1bb..2cfa18a14b 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/txn/TxnStatus.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/txn/TxnStatus.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/txn/type/BatchKeys.java b/tikv-client/src/main/java/com/pingcap/tikv/txn/type/BatchKeys.java index f50f8a0cc9..d1bb13b835 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/txn/type/BatchKeys.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/txn/type/BatchKeys.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/txn/type/ClientRPCResult.java b/tikv-client/src/main/java/com/pingcap/tikv/txn/type/ClientRPCResult.java index 97233afb33..3a6c43413d 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/txn/type/ClientRPCResult.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/txn/type/ClientRPCResult.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/txn/type/GroupKeyResult.java b/tikv-client/src/main/java/com/pingcap/tikv/txn/type/GroupKeyResult.java index 645b60fa63..269c5a0131 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/txn/type/GroupKeyResult.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/txn/type/GroupKeyResult.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/AbstractDateTimeType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/AbstractDateTimeType.java index 4f6c605936..38383fa827 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/AbstractDateTimeType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/AbstractDateTimeType.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/BitType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/BitType.java index 79a34eb6da..9277cb99c7 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/BitType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/BitType.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/BytesType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/BytesType.java index 428207103e..d51e76fd24 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/BytesType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/BytesType.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/Charset.java b/tikv-client/src/main/java/com/pingcap/tikv/types/Charset.java index e9b8301217..4701fab744 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/Charset.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/Charset.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/Converter.java b/tikv-client/src/main/java/com/pingcap/tikv/types/Converter.java index ba04c88c8b..fc0239eec0 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/Converter.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/Converter.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/DataType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/DataType.java index c7cee3d2c1..ee12869d85 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/DataType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/DataType.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/DataTypeFactory.java b/tikv-client/src/main/java/com/pingcap/tikv/types/DataTypeFactory.java index 5c674c08a1..ecb9caefea 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/DataTypeFactory.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/DataTypeFactory.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/DateTimeType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/DateTimeType.java index d059f2c50e..a1da9739a7 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/DateTimeType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/DateTimeType.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/DateType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/DateType.java index e69f8e172b..c523b1d46b 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/DateType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/DateType.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/DecimalType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/DecimalType.java index 6607ec9da1..63c325a2e5 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/DecimalType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/DecimalType.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/EnumType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/EnumType.java index 0b8b23f911..903be5602d 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/EnumType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/EnumType.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/IntegerType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/IntegerType.java index 4c5efa9c9a..fbff7c3a54 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/IntegerType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/IntegerType.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/JsonType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/JsonType.java index 369c8bb8f8..dda2852d99 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/JsonType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/JsonType.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/MySQLType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/MySQLType.java index 7fb59adf37..d8eb4d2243 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/MySQLType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/MySQLType.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/RealType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/RealType.java index b4c8deb42b..3381465297 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/RealType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/RealType.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/SetType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/SetType.java index e756f1de6e..1584eb2533 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/SetType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/SetType.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/StringType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/StringType.java index 1a9b436900..8caf8515f5 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/StringType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/StringType.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/TimeType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/TimeType.java index b79ec86e83..3b5c22147c 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/TimeType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/TimeType.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/TimestampType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/TimestampType.java index ae33d3d5e7..3dee8684bc 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/TimestampType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/TimestampType.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/types/UninitializedType.java b/tikv-client/src/main/java/com/pingcap/tikv/types/UninitializedType.java index b50a35d3e5..420405d578 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/types/UninitializedType.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/types/UninitializedType.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/BackOffFunction.java b/tikv-client/src/main/java/com/pingcap/tikv/util/BackOffFunction.java index 5c48307ed0..ea55d4d1be 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/BackOffFunction.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/BackOffFunction.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/BackOffer.java b/tikv-client/src/main/java/com/pingcap/tikv/util/BackOffer.java index 57383d119a..bf87843e03 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/BackOffer.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/BackOffer.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/Batch.java b/tikv-client/src/main/java/com/pingcap/tikv/util/Batch.java index b825b13e09..54c06c5638 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/Batch.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/Batch.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/CHTypeMapping.java b/tikv-client/src/main/java/com/pingcap/tikv/util/CHTypeMapping.java index f26f45b152..9a7a06e027 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/CHTypeMapping.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/CHTypeMapping.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/ChannelFactory.java b/tikv-client/src/main/java/com/pingcap/tikv/util/ChannelFactory.java index ebf17817cc..0249366477 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/ChannelFactory.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/ChannelFactory.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/ClientUtils.java b/tikv-client/src/main/java/com/pingcap/tikv/util/ClientUtils.java index cf2c815101..1feafca203 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/ClientUtils.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/ClientUtils.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/ConcreteBackOffer.java b/tikv-client/src/main/java/com/pingcap/tikv/util/ConcreteBackOffer.java index 7a3de3726d..7946cace5f 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/ConcreteBackOffer.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/ConcreteBackOffer.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/FastByteComparisons.java b/tikv-client/src/main/java/com/pingcap/tikv/util/FastByteComparisons.java index 2af87d97df..302e335ced 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/FastByteComparisons.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/FastByteComparisons.java @@ -1,17 +1,19 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more contributor license - * agreements. See the NOTICE file distributed with this work for additional information regarding - * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. You may obtain a - * copy of the License at +/* + * Copyright 2022 PingCAP, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - *

http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - *

Unless required by applicable law or agreed to in writing, software distributed under the - * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing permissions and + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and * limitations under the License. */ + package com.pingcap.tikv.util; import com.google.common.primitives.Longs; diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/FutureObserver.java b/tikv-client/src/main/java/com/pingcap/tikv/util/FutureObserver.java index d3db516ba2..6ec0a0a407 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/FutureObserver.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/FutureObserver.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/JsonUtils.java b/tikv-client/src/main/java/com/pingcap/tikv/util/JsonUtils.java index b9830258bc..15b8a4725e 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/JsonUtils.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/JsonUtils.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/KeyRangeUtils.java b/tikv-client/src/main/java/com/pingcap/tikv/util/KeyRangeUtils.java index 7893eb5123..0b491f8d93 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/KeyRangeUtils.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/KeyRangeUtils.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/LogDesensitization.java b/tikv-client/src/main/java/com/pingcap/tikv/util/LogDesensitization.java index d966273fb7..0318557ca6 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/LogDesensitization.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/LogDesensitization.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/MemoryUtil.java b/tikv-client/src/main/java/com/pingcap/tikv/util/MemoryUtil.java index c8a7e72bbe..00307fdab6 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/MemoryUtil.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/MemoryUtil.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/Pair.java b/tikv-client/src/main/java/com/pingcap/tikv/util/Pair.java index c5ca21d31b..0ead4cd4e2 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/Pair.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/Pair.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/RangeSplitter.java b/tikv-client/src/main/java/com/pingcap/tikv/util/RangeSplitter.java index 3ac53fb957..cb6651d450 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/RangeSplitter.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/RangeSplitter.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/Timer.java b/tikv-client/src/main/java/com/pingcap/tikv/util/Timer.java index 5e97dda268..5d36ee1ba0 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/Timer.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/Timer.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/main/java/com/pingcap/tikv/util/TsoUtils.java b/tikv-client/src/main/java/com/pingcap/tikv/util/TsoUtils.java index ff92bf60b7..00852cb049 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/util/TsoUtils.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/util/TsoUtils.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/GrpcUtils.java b/tikv-client/src/test/java/com/pingcap/tikv/GrpcUtils.java index 4f6c05ddb9..e588cebf16 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/GrpcUtils.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/GrpcUtils.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/KVMockServer.java b/tikv-client/src/test/java/com/pingcap/tikv/KVMockServer.java index 3aef307162..afb02e16c8 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/KVMockServer.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/KVMockServer.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/MockServerTest.java b/tikv-client/src/test/java/com/pingcap/tikv/MockServerTest.java index ec1fc2552e..616a167a2b 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/MockServerTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/MockServerTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/PDClientTest.java b/tikv-client/src/test/java/com/pingcap/tikv/PDClientTest.java index 2526401041..7dc746032a 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/PDClientTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/PDClientTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/PDMockServer.java b/tikv-client/src/test/java/com/pingcap/tikv/PDMockServer.java index e79b2b14c7..5357ac2c13 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/PDMockServer.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/PDMockServer.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/PDMockServerTest.java b/tikv-client/src/test/java/com/pingcap/tikv/PDMockServerTest.java index f4d827d606..b19faeffbf 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/PDMockServerTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/PDMockServerTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/RegionManagerTest.java b/tikv-client/src/test/java/com/pingcap/tikv/RegionManagerTest.java index 13308d90f6..8a0b6f546d 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/RegionManagerTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/RegionManagerTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/RegionStoreClientTest.java b/tikv-client/src/test/java/com/pingcap/tikv/RegionStoreClientTest.java index 69dd6192db..273bd89049 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/RegionStoreClientTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/RegionStoreClientTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/TiConfigurationTest.java b/tikv-client/src/test/java/com/pingcap/tikv/TiConfigurationTest.java index 81b028ac3d..34b9648e22 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/TiConfigurationTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/TiConfigurationTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/allocator/RowIDAllocatorTest.java b/tikv-client/src/test/java/com/pingcap/tikv/allocator/RowIDAllocatorTest.java index 0fc4e03c76..eefb3d5787 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/allocator/RowIDAllocatorTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/allocator/RowIDAllocatorTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/catalog/CatalogTest.java b/tikv-client/src/test/java/com/pingcap/tikv/catalog/CatalogTest.java index 2307b037a4..3a520a2985 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/catalog/CatalogTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/catalog/CatalogTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/catalog/CatalogTransactionTest.java b/tikv-client/src/test/java/com/pingcap/tikv/catalog/CatalogTransactionTest.java index fff5acee40..3ddb8f6416 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/catalog/CatalogTransactionTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/catalog/CatalogTransactionTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/codec/CodecTest.java b/tikv-client/src/test/java/com/pingcap/tikv/codec/CodecTest.java index 8f26610987..db40def979 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/codec/CodecTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/codec/CodecTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/codec/KeyUtilsTest.java b/tikv-client/src/test/java/com/pingcap/tikv/codec/KeyUtilsTest.java index f0121b8868..a82bfff265 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/codec/KeyUtilsTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/codec/KeyUtilsTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/codec/MyDecimalTest.java b/tikv-client/src/test/java/com/pingcap/tikv/codec/MyDecimalTest.java index 3df1d93470..2719a17c4a 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/codec/MyDecimalTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/codec/MyDecimalTest.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/test/java/com/pingcap/tikv/codec/TableCodecTest.java b/tikv-client/src/test/java/com/pingcap/tikv/codec/TableCodecTest.java index 01f4978c0f..05d5441b49 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/codec/TableCodecTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/codec/TableCodecTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/codec/TableCodecV1Test.java b/tikv-client/src/test/java/com/pingcap/tikv/codec/TableCodecV1Test.java index d388c1ee0d..6099ca333b 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/codec/TableCodecV1Test.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/codec/TableCodecV1Test.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/codec/TableCodecV2Test.java b/tikv-client/src/test/java/com/pingcap/tikv/codec/TableCodecV2Test.java index 9490f3f3b5..244214a12f 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/codec/TableCodecV2Test.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/codec/TableCodecV2Test.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/expression/ComparisonBinaryExpressionTest.java b/tikv-client/src/test/java/com/pingcap/tikv/expression/ComparisonBinaryExpressionTest.java index 7629b4e19e..a4a60989f6 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/expression/ComparisonBinaryExpressionTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/expression/ComparisonBinaryExpressionTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/expression/visitor/PartAndFilterExprRewriterTest.java b/tikv-client/src/test/java/com/pingcap/tikv/expression/visitor/PartAndFilterExprRewriterTest.java index 653313f317..a05ecd549d 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/expression/visitor/PartAndFilterExprRewriterTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/expression/visitor/PartAndFilterExprRewriterTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/key/CompoundKeyTest.java b/tikv-client/src/test/java/com/pingcap/tikv/key/CompoundKeyTest.java index 9e5fa23903..1e7ac7f533 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/key/CompoundKeyTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/key/CompoundKeyTest.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/test/java/com/pingcap/tikv/key/IndexKeyTest.java b/tikv-client/src/test/java/com/pingcap/tikv/key/IndexKeyTest.java index de26fc81d3..4abbf6ea4e 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/key/IndexKeyTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/key/IndexKeyTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/key/KeyTest.java b/tikv-client/src/test/java/com/pingcap/tikv/key/KeyTest.java index a7250ae9ed..e7a58b110a 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/key/KeyTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/key/KeyTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/meta/DBInfoTest.java b/tikv-client/src/test/java/com/pingcap/tikv/meta/DBInfoTest.java index 75e26e007c..fe9ca5bbb4 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/meta/DBInfoTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/meta/DBInfoTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/meta/MetaUtils.java b/tikv-client/src/test/java/com/pingcap/tikv/meta/MetaUtils.java index 1909328c4c..338a7c8d35 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/meta/MetaUtils.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/meta/MetaUtils.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/meta/TiDAGRequestTest.java b/tikv-client/src/test/java/com/pingcap/tikv/meta/TiDAGRequestTest.java index 4d6e2a790d..517d28f11b 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/meta/TiDAGRequestTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/meta/TiDAGRequestTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/meta/TiTableInfoTest.java b/tikv-client/src/test/java/com/pingcap/tikv/meta/TiTableInfoTest.java index cd592f7125..2947e1c171 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/meta/TiTableInfoTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/meta/TiTableInfoTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/operation/ChunkIteratorTest.java b/tikv-client/src/test/java/com/pingcap/tikv/operation/ChunkIteratorTest.java index 68292a35ee..4cc02f3cf3 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/operation/ChunkIteratorTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/operation/ChunkIteratorTest.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/test/java/com/pingcap/tikv/operation/SchemaInferTest.java b/tikv-client/src/test/java/com/pingcap/tikv/operation/SchemaInferTest.java index 1eab377c0d..847ead4a14 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/operation/SchemaInferTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/operation/SchemaInferTest.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/test/java/com/pingcap/tikv/operation/iterator/DAGIteratorTest.java b/tikv-client/src/test/java/com/pingcap/tikv/operation/iterator/DAGIteratorTest.java index 03549be502..80bdec8389 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/operation/iterator/DAGIteratorTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/operation/iterator/DAGIteratorTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/parser/TiParserTest.java b/tikv-client/src/test/java/com/pingcap/tikv/parser/TiParserTest.java index 0f1db1908f..d2c95fce0b 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/parser/TiParserTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/parser/TiParserTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/predicates/IndexMatcherTest.java b/tikv-client/src/test/java/com/pingcap/tikv/predicates/IndexMatcherTest.java index 4511ba068f..e96dfd9425 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/predicates/IndexMatcherTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/predicates/IndexMatcherTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/predicates/PredicateUtilsTest.java b/tikv-client/src/test/java/com/pingcap/tikv/predicates/PredicateUtilsTest.java index 1d8b1bb6ab..97b5350a21 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/predicates/PredicateUtilsTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/predicates/PredicateUtilsTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/predicates/TiKVScanAnalyzerTest.java b/tikv-client/src/test/java/com/pingcap/tikv/predicates/TiKVScanAnalyzerTest.java index e10d7d7ca1..525b0fce52 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/predicates/TiKVScanAnalyzerTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/predicates/TiKVScanAnalyzerTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverAsyncCommitTest.java b/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverAsyncCommitTest.java index 4975bb4453..c4adc5ce8b 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverAsyncCommitTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverAsyncCommitTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSITest.java b/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSITest.java index 2f474d03f4..42c34bceaf 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSITest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSITest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV3OneRowTest.java b/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV3OneRowTest.java index 6d471ccde7..dce63f2822 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV3OneRowTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV3OneRowTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV3TwoRowTest.java b/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV3TwoRowTest.java index 5bba647eab..de4ff92981 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV3TwoRowTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV3TwoRowTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV4OneRowTest.java b/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV4OneRowTest.java index 21be10f1e1..2cbd3f183e 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV4OneRowTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV4OneRowTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV4TwoRowTest.java b/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV4TwoRowTest.java index 4ebd53632c..fb6b33db63 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV4TwoRowTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverSIV4TwoRowTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverTest.java b/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverTest.java index e0529efa11..f30178b00c 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/txn/LockResolverTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/types/ConverterTest.java b/tikv-client/src/test/java/com/pingcap/tikv/types/ConverterTest.java index fee933ecfe..588d8dbe2c 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/types/ConverterTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/types/ConverterTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/types/DataTypeFactoryTest.java b/tikv-client/src/test/java/com/pingcap/tikv/types/DataTypeFactoryTest.java index 5859b0ce50..6d4978cbc9 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/types/DataTypeFactoryTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/types/DataTypeFactoryTest.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/test/java/com/pingcap/tikv/types/DecimalTypeTest.java b/tikv-client/src/test/java/com/pingcap/tikv/types/DecimalTypeTest.java index f5e3f41b36..2f094757b0 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/types/DecimalTypeTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/types/DecimalTypeTest.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/test/java/com/pingcap/tikv/types/IntegerTypeTest.java b/tikv-client/src/test/java/com/pingcap/tikv/types/IntegerTypeTest.java index f078d71f7f..5746bec777 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/types/IntegerTypeTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/types/IntegerTypeTest.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/test/java/com/pingcap/tikv/types/RealTypeTest.java b/tikv-client/src/test/java/com/pingcap/tikv/types/RealTypeTest.java index 3e0ff02443..b3781a3bdd 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/types/RealTypeTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/types/RealTypeTest.java @@ -10,6 +10,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * diff --git a/tikv-client/src/test/java/com/pingcap/tikv/util/ConcreteBackOffTest.java b/tikv-client/src/test/java/com/pingcap/tikv/util/ConcreteBackOffTest.java index 581109a8ca..8f8aee2708 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/util/ConcreteBackOffTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/util/ConcreteBackOffTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/util/RangeSplitterTest.java b/tikv-client/src/test/java/com/pingcap/tikv/util/RangeSplitterTest.java index 12e510ca5e..fd1a93cd6b 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/util/RangeSplitterTest.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/util/RangeSplitterTest.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/tikv-client/src/test/java/com/pingcap/tikv/util/ReflectionWrapper.java b/tikv-client/src/test/java/com/pingcap/tikv/util/ReflectionWrapper.java index cbd65f2031..1bc5922cd1 100644 --- a/tikv-client/src/test/java/com/pingcap/tikv/util/ReflectionWrapper.java +++ b/tikv-client/src/test/java/com/pingcap/tikv/util/ReflectionWrapper.java @@ -9,6 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */