Skip to content

Commit 840f6b5

Browse files
authored
Merge branch 'release-3.1' into cherry-pick-2675-to-release-3.1
2 parents ae86d21 + eeca35a commit 840f6b5

File tree

18 files changed

+54
-31
lines changed

18 files changed

+54
-31
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,11 @@ jobs:
6060

6161
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6262
# If this step fails, then you should remove it and run the build manually (see below)
63-
- name: Autobuild
64-
uses: github/codeql-action/autobuild@v1
63+
# - name: Autobuild
64+
# uses: github/codeql-action/autobuild@v1
65+
- name: build
66+
run: |
67+
mvn clean package -Dmaven.test.skip=true -B
6568
6669
# ℹ️ Command-line programs to run using the OS shell.
6770
# 📚 https://git.io/JvXDl

assembly/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.pingcap.tispark</groupId>
77
<artifactId>tispark-parent</artifactId>
8-
<version>3.1.2</version>
8+
<version>3.1.3</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

core-test/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.pingcap.tispark</groupId>
77
<artifactId>tispark-parent</artifactId>
8-
<version>3.1.2</version>
8+
<version>3.1.3</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.pingcap.tispark</groupId>
77
<artifactId>tispark-parent</artifactId>
8-
<version>3.1.2</version>
8+
<version>3.1.3</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

core/src/main/scala/com/pingcap/tispark/TiConfigConst.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,7 @@ object TiConfigConst {
8585
val DEFAULT_GC_MAX_WAIT_TIME: Long = 24 * 60 * 60
8686
val DEFAULT_GC_SAFE_POINT_TTL: Int = 5 * 60
8787

88+
// cache load
89+
val LOAD_TABLES: String = "spark.tispark.load_tables"
90+
val DEFAULT_LOAD_TABLES: Boolean = true
8891
}

core/src/main/scala/com/pingcap/tispark/utils/TiUtil.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ object TiUtil {
237237
tiConf.setNewCollationEnable(conf.get(TiConfigConst.NEW_COLLATION_ENABLE).toBoolean)
238238
}
239239

240+
tiConf.setLoadTables(
241+
conf.get(TiConfigConst.LOAD_TABLES, TiConfigConst.DEFAULT_LOAD_TABLES.toString).toBoolean)
240242
tiConf
241243
}
242244

db-random-test/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.pingcap.tispark</groupId>
77
<artifactId>tispark-parent</artifactId>
8-
<version>3.1.2</version>
8+
<version>3.1.3</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

docs/userguide_3.0.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ spark.sql("select t1.id,t2.id from spark_catalog.default.t t1 left join tidb_cat
277277
| `spark.tispark.replica_read.label` | "" | Only select TiKV store match specified labels. Format: label_x=value_x,label_y=value_y |
278278
| `spark.tispark.replica_read.address_whitelist` | "" | Only select TiKV store with given ip addresses. Split mutil addresses by `,` |
279279
| `spark.tispark.replica_read.address_blacklist` | "" | Do not select TiKV store with given ip addresses. Split mutil addresses by `,` |
280+
| `spark.tispark.load_tables` | true | (experimental) Whether load all tables when we reload catalog cache. Disable it may cause table not find in scenarios where the table changes frequently. |
280281

281282
### TLS Configuration
282283

@@ -385,13 +386,15 @@ TiSpark reads the range and hash partition table from TiDB.
385386

386387
Currently, TiSpark doesn't support a MySQL/TiDB partition table syntax `select col_name from table_name partition(partition_name)`, but you can still use `where` condition to filter the partitions.
387388

388-
TiSpark decides whether to apply partition pruning according to the partition type and the partition expression associated with the table. Currently, TiSpark partially apply partition pruning on range partition.
389+
TiSpark decides whether to apply partition pruning according to the partition type and the partition expression associated with the table.
390+
391+
Currently, TiSpark partially apply partition pruning on range partition.
389392

390393
The partition pruning is applied when the partition expression of the range partition is one of the following:
391394

392395
+ column expression
393-
+ `YEAR(col)` and its type is datetime/string/date literal that can be parsed as datetime.
394-
+ `TO_DAYS(col)` and its type is datetime/string/date literal that can be parsed as datetime.
396+
+ `YEAR($argument)` where the argument is a column and its type is datetime or string literal
397+
that can be parsed as datetime.
395398

396399
If partition pruning is not applied, TiSpark's reading is equivalent to doing a table scan over all partitions.
397400

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<groupId>com.pingcap.tispark</groupId>
1212
<artifactId>tispark-parent</artifactId>
13-
<version>3.1.2</version>
13+
<version>3.1.3</version>
1414
<packaging>pom</packaging>
1515
<name>TiSpark Project Parent POM</name>
1616
<url>http://github.copm/pingcap/tispark</url>

spark-wrapper/spark-3.0/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.pingcap.tispark</groupId>
77
<artifactId>tispark-parent</artifactId>
8-
<version>3.1.2</version>
8+
<version>3.1.3</version>
99
<relativePath>../../pom.xml</relativePath>
1010
</parent>
1111

0 commit comments

Comments
 (0)