This is an automated email from the ASF dual-hosted git repository.
wenchen 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 259d3e3b589 [SPARK-44315][SQL][CONNECT] Move
DefinedByConstructorParams to sql/api
259d3e3b589 is described below
commit 259d3e3b589d723dfe2922550a46175bd82fe97c
Author: Rui Wang <[email protected]>
AuthorDate: Thu Jul 6 17:35:41 2023 -0700
[SPARK-44315][SQL][CONNECT] Move DefinedByConstructorParams to sql/api
### What changes were proposed in this pull request?
Move DefinedByConstructorParams to sql/api.
### Why are the changes needed?
This is an effort to help the Scala client not need to depend on Catalyst.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Existing test
Closes #41873 from amaliujia/scsc.
Authored-by: Rui Wang <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
---
.../sql/catalyst/DefinedByConstructorParams.scala | 25 ++++++++++++++++++++++
.../spark/sql/catalyst/ScalaReflection.scala | 8 -------
2 files changed, 25 insertions(+), 8 deletions(-)
diff --git
a/sql/api/src/main/scala/org/apache/spark/sql/catalyst/DefinedByConstructorParams.scala
b/sql/api/src/main/scala/org/apache/spark/sql/catalyst/DefinedByConstructorParams.scala
new file mode 100644
index 00000000000..fc6bc2095a8
--- /dev/null
+++
b/sql/api/src/main/scala/org/apache/spark/sql/catalyst/DefinedByConstructorParams.scala
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+
+package org.apache.spark.sql.catalyst
+
+/**
+ * A helper trait to create
[[org.apache.spark.sql.catalyst.encoders.ExpressionEncoder]]s
+ * for classes whose fields are entirely defined by constructor params but
should not be
+ * case classes.
+ */
+trait DefinedByConstructorParams
diff --git
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala
index d67ba455438..b0588fc7044 100644
---
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala
+++
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala
@@ -45,14 +45,6 @@ import org.apache.spark.sql.types._
import org.apache.spark.unsafe.types.{CalendarInterval, UTF8String}
-/**
- * A helper trait to create
[[org.apache.spark.sql.catalyst.encoders.ExpressionEncoder]]s
- * for classes whose fields are entirely defined by constructor params but
should not be
- * case classes.
- */
-trait DefinedByConstructorParams
-
-
private[catalyst] object ScalaSubtypeLock
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]