You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2022/12/10 05:27:03 UTC
[spark] branch master updated: [SPARK-41475][CONNECT] Fix lint-scala command error and typo
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 3084cc531e0 [SPARK-41475][CONNECT] Fix lint-scala command error and typo
3084cc531e0 is described below
commit 3084cc531e0e0f352e4f6341f3ceddc78e3e8b3a
Author: dengziming <de...@bytedance.com>
AuthorDate: Fri Dec 9 21:26:50 2022 -0800
[SPARK-41475][CONNECT] Fix lint-scala command error and typo
### What changes were proposed in this pull request?
We separate connect into server and common, but failed to update the `lint-scala` tools.
fix a typo: fase -> false
format the code.
### Why are the changes needed?
We can check the scala code format without it.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
No
Closes #39012 from dengziming/minor-typo.
Authored-by: dengziming <de...@bytedance.com>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
.../main/scala/org/apache/spark/sql/connect/config/Connect.scala | 7 ++++---
.../org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala | 6 ++----
dev/lint-scala | 4 ++--
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/config/Connect.scala b/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/config/Connect.scala
index 358cb3c8f79..60fdd964018 100644
--- a/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/config/Connect.scala
+++ b/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/config/Connect.scala
@@ -38,9 +38,10 @@ private[spark] object Connect {
val CONNECT_GRPC_ARROW_MAX_BATCH_SIZE =
ConfigBuilder("spark.connect.grpc.arrow.maxBatchSize")
- .doc("When using Apache Arrow, limit the maximum size of one arrow batch that " +
- "can be sent from server side to client side. Currently, we conservatively use 70% " +
- "of it because the size is not accurate but estimated.")
+ .doc(
+ "When using Apache Arrow, limit the maximum size of one arrow batch that " +
+ "can be sent from server side to client side. Currently, we conservatively use 70% " +
+ "of it because the size is not accurate but estimated.")
.version("3.4.0")
.bytesConf(ByteUnit.MiB)
.createWithDefaultString("4m")
diff --git a/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala b/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala
index a40fe990307..ba5ceed4529 100644
--- a/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala
+++ b/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala
@@ -322,8 +322,7 @@ class SparkConnectPlanner(session: SparkSession) {
None,
rel.getVariableColumnName,
Seq(rel.getValueColumnName),
- transformRelation(rel.getInput)
- )
+ transformRelation(rel.getInput))
} else {
val values = rel.getValuesList.asScala.toArray.map { expr =>
Column(transformExpression(expr))
@@ -335,8 +334,7 @@ class SparkConnectPlanner(session: SparkSession) {
None,
rel.getVariableColumnName,
Seq(rel.getValueColumnName),
- transformRelation(rel.getInput)
- )
+ transformRelation(rel.getInput))
}
}
diff --git a/dev/lint-scala b/dev/lint-scala
index ea3b98464b2..48ecf57ef47 100755
--- a/dev/lint-scala
+++ b/dev/lint-scala
@@ -29,14 +29,14 @@ ERRORS=$(./build/mvn \
-Dscalafmt.skip=false \
-Dscalafmt.validateOnly=true \
-Dscalafmt.changedOnly=false \
- -pl connector/connect \
+ -pl connector/connect/server \
2>&1 | grep -e "^Requires formatting" \
)
if test ! -z "$ERRORS"; then
echo -e "The scalafmt check failed on connector/connect at following occurrences:\n\n$ERRORS\n"
echo "Before submitting your change, please make sure to format your code using the following command:"
- echo "./build/mvn -Pscala-2.12 scalafmt:format -Dscalafmt.skip=fase -Dscalafmt.validateOnly=false -Dscalafmt.changedOnly=false -pl connector/connect"
+ echo "./build/mvn -Pscala-2.12 scalafmt:format -Dscalafmt.skip=false -Dscalafmt.validateOnly=false -Dscalafmt.changedOnly=false -pl connector/connect/server"
exit 1
else
echo -e "Scalafmt checks passed."
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org