经过验证,不会产生 ANTLR 版本 does not match
的组合如下:
-
TiDB v5.4.2 - Spark v3.0.3 - TiSpark v2.5.1/v3.0.1
-
TiDB v6.1 - Spark v3.0.3 - tispark-assembly-3.0_2.12-3.0.1.jar
spark-sql> use tidb_catalog.mysql;
22/07/29 03:38:08 WARN HttpClientUtil: Failed to send HTTP get request.
22/07/29 03:38:08 WARN TiSparkTeleInfo$: Failed to get PD version For input string: "2379,192.168.3.222:2379,192.168.3.223:2379"
22/07/29 03:38:08 WARN ObjectStore: Failed to get database global_temp, returning NoSuchObjectException
Time taken: 2.741 seconds
spark-sql> use tidb_catalog.mysql;
Time taken: 0.025 seconds
spark-sql> select * from user;
22/07/29 03:38:19 WARN package: Truncated the string representation of a plan since it was too large. This behavior can be adjusted by setting 'spark.sql.debug.maxToStringFields'.
% root *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B mysql_native_password Y Y Y Y Y Y Y Y Y Y YY Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N Y Y Y Y Y
% admin *4ACFE3202A5FF5CF467898FC58AAB1D615029441 mysql_native_password Y Y Y Y Y Y Y Y Y Y YY Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N Y Y Y Y Y
Time taken: 2.552 seconds, Fetched 2 row(s)
- TiDB v6.1 - Spark v3.0.3 - tispark-assembly-3.0-2.5.1.jar
spark-sql> use tidb_catalog.mysql;
22/07/29 03:32:35 WARN ObjectStore: Failed to get database global_temp, returning NoSuchObjectException
Time taken: 2.641 seconds
spark-sql> use tidb_catalog.mysql;
Time taken: 0.024 seconds
spark-sql> select * from user;
22/07/29 03:32:42 WARN package: Truncated the string representation of a plan since it was too large. This behavior can be adjusted by setting 'spark.sql.debug.maxToStringFields'.
% root *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B mysql_native_password Y Y Y Y Y Y Y Y Y Y YY Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N Y Y Y Y Y
% admin *4ACFE3202A5FF5CF467898FC58AAB1D615029441 mysql_native_password Y Y Y Y Y Y Y Y Y Y YY Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N Y Y Y Y Y
Time taken: 2.78 seconds, Fetched 2 row(s)
存在 ANTLR 版本 does not match
的组合为:
- TiDB v6.1 - Spark v3.1.3 - tispark-assembly-3.0-2.5.1.jar
ANTLR Tool version 4.8 used for code generation does not match the current runtime version 4.7.1ANTLR Runtime version 4.8 used for parser compilation does not match the current runtime version 4.7.1ANTLR Tool version 4.8 used for code generation does not match the current runtime version 4.7.1ANTLR Runtime version 4.8 used for parser compilation does not match the current runtime version 4.7.1default
-
TiDB v5.4.2 - Spark v3.1.3 - tispark-assembly-3.0-2.5.1.jar
-
TiDB v5.4.2 - Spark v3.1.3 - tispark-assembly-3.1_2.12-3.0.1.jar
根据以上结果,初步判断。Spark v3.1.3 中引入的 ANTLR 4.8,Spark v3.0.3 中引入的ANTLR 为 4.7,而TiDB5.x/6.x与TiSpark2.5.x/3.x中引入的ANTLR版本为4.7.1