1. [SPARK-33535][INFRA][TESTS] Export LANG to en_US.UTF-8 in (details)
  2. [SPARK-33287][SS][UI] Expose state custom metrics information on SS UI (details)
  3. [SPARK-33457][PYTHON] Adjust mypy configuration (details)
Commit 048a9821c788b6796d52d1e2a0cd174377ebd0f0 by dongjoon
[SPARK-33535][INFRA][TESTS] Export LANG to en_US.UTF-8 in run-tests-jenkins script

### What changes were proposed in this pull request?
It seems that Jenkins tests tasks in many pr have test failed. The failed cases include:

-  `org.apache.spark.sql.hive.thriftserver.SparkThriftServerProtocolVersionsSuite.HIVE_CLI_SERVICE_PROTOCOL_V1 get binary type`
- `org.apache.spark.sql.hive.thriftserver.SparkThriftServerProtocolVersionsSuite.HIVE_CLI_SERVICE_PROTOCOL_V2 get binary type`
- `org.apache.spark.sql.hive.thriftserver.SparkThriftServerProtocolVersionsSuite.HIVE_CLI_SERVICE_PROTOCOL_V3 get binary type`
- `org.apache.spark.sql.hive.thriftserver.SparkThriftServerProtocolVersionsSuite.HIVE_CLI_SERVICE_PROTOCOL_V4 get binary type`
- `org.apache.spark.sql.hive.thriftserver.SparkThriftServerProtocolVersionsSuite.HIVE_CLI_SERVICE_PROTOCOL_V5 get binary type`

The error message as follows:

Error Messageorg.scalatest.exceptions.TestFailedException: "[?](" did not equal "[�]("Stacktracesbt.ForkMain$ForkError: org.scalatest.exceptions.TestFailedException: "[?](" did not equal "[�]("
at org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:472)
at org.scalatest.Assertions.newAssertionFailedException$(Assertions.scala:471)
at org.scalatest.Assertions$.newAssertionFailedException(Assertions.scala:1231)
at org.scalatest.Assertions$AssertionsHelper.macroAssert(Assertions.scala:1295)
at org.apache.spark.sql.hive.thriftserver.SparkThriftServerProtocolVersionsSuite.$anonfun$new$26(SparkThriftServerProtocolVersionsSuite.scala:302)

But they can pass the GitHub Action, maybe it's related to the `LANG` of the Jenkins build machine, this pr add `export LANG="en_US.UTF-8"` in `run-test-jenkins` script.

### Why are the changes needed?
Ensure LANG in Jenkins test process is `en_US.UTF-8` to pass `HIVE_CLI_SERVICE_PROTOCOL_VX` related tests

### Does this PR introduce _any_ user-facing change?

### How was this patch tested?
Jenkins tests pass

Closes #30487 from LuciferYang/SPARK-33535.

Authored-by: yangjie01 <>
Signed-off-by: Dongjoon Hyun <>
The file was modifieddev/run-tests-jenkins (diff)
Commit 95b6dabc33515f1975eb889480ccca12bf5ac3c8 by kabhwan.opensource
[SPARK-33287][SS][UI] Expose state custom metrics information on SS UI

### What changes were proposed in this pull request?
Structured Streaming UI is not containing state custom metrics information. In this PR I've added it.

### Why are the changes needed?
Missing state custom metrics information.

### Does this PR introduce _any_ user-facing change?
Additional UI elements appear.

### How was this patch tested?
Existing unit tests + manual test.
#Compile Spark
echo "spark.sql.streaming.ui.enabledCustomMetricList stateOnCurrentVersionSizeBytes" >> conf/spark-defaults.conf
sbin/ spark://gsomogyi-MBP16:7077
./bin/spark-submit --master spark://gsomogyi-MBP16:7077 --deploy-mode client --class com.spark.Main ../spark-test/target/spark-test-1.0-SNAPSHOT-jar-with-dependencies.jar
<img width="1119" alt="Screenshot 2020-11-18 at 12 45 36" src="">

Closes #30336 from gaborgsomogyi/SPARK-33287.

Authored-by: Gabor Somogyi <>
Signed-off-by: Jungtaek Lim (HeartSaVioR) <>
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/internal/StaticSQLConf.scala (diff)
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/streaming/ui/StreamingQueryStatisticsPage.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/streaming/ui/StreamingQueryPageSuite.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/streaming/ui/UISeleniumSuite.scala (diff)
Commit 665817bd4fc07b18cee0f8c6ff759288472514c2 by gurwls223
[SPARK-33457][PYTHON] Adjust mypy configuration

### What changes were proposed in this pull request?

This pull request:

- Adds following flags to the main mypy configuration:
  - [`strict_optional`](
  - [`no_implicit_optional`](
  - [`disallow_untyped_defs`](

These flags are enabled only for public API and disabled for tests and internal modules.

Additionally, these PR fixes missing annotations.

### Why are the changes needed?

Primary reason to propose this changes is to use standard configuration as used by typeshed project. This will allow us to be more strict, especially when interacting with JVM code. See for example

Additionally, it will allow us to detect cases where annotations have unintentionally omitted.

### Does this PR introduce _any_ user-facing change?

Annotations only.

### How was this patch tested?


Closes #30382 from zero323/SPARK-33457.

Authored-by: zero323 <>
Signed-off-by: HyukjinKwon <>
The file was modifiedpython/pyspark/mllib/common.pyi (diff)
The file was modifiedpython/pyspark/ml/classification.pyi (diff)
The file was modifiedpython/pyspark/sql/udf.pyi (diff)
The file was modifiedpython/pyspark/resource/profile.pyi (diff)
The file was modifiedpython/pyspark/sql/types.pyi (diff)
The file was modifiedpython/pyspark/ml/regression.pyi (diff)
The file was modifiedpython/pyspark/ml/feature.pyi (diff)
The file was modifiedpython/pyspark/streaming/kinesis.pyi (diff)
The file was modifiedpython/pyspark/sql/functions.pyi (diff)
The file was modifiedpython/pyspark/sql/session.pyi (diff)
The file was modifiedpython/pyspark/sql/context.pyi (diff)
The file was modifiedpython/pyspark/context.pyi (diff)
The file was modifiedpython/pyspark/mllib/linalg/__init__.pyi (diff)
The file was modifiedpython/pyspark/ml/evaluation.pyi (diff)
The file was modifiedpython/pyspark/mllib/stat/_statistics.pyi (diff)
The file was modifiedpython/pyspark/mllib/random.pyi (diff)
The file was modifiedpython/pyspark/mllib/classification.pyi (diff)
The file was modifiedpython/pyspark/mllib/recommendation.pyi (diff)
The file was modifiedpython/pyspark/streaming/dstream.pyi (diff)
The file was modifiedpython/mypy.ini (diff)
The file was modifiedpython/pyspark/rdd.pyi (diff)
The file was modifiedpython/pyspark/broadcast.pyi (diff)
The file was modifiedpython/pyspark/mllib/clustering.pyi (diff)
The file was modifiedpython/pyspark/ml/common.pyi (diff)
The file was modifiedpython/pyspark/ml/linalg/__init__.pyi (diff)
The file was modifiedpython/pyspark/ml/pipeline.pyi (diff)
The file was modifiedpython/pyspark/sql/column.pyi (diff)
The file was modifiedpython/pyspark/streaming/context.pyi (diff)