grundprinzip commented on code in PR #37994:
URL: https://github.com/apache/spark/pull/37994#discussion_r988657189
##########
connector/connect/src/main/protobuf/spark/connect/expressions.proto:
##########
@@ -159,4 +159,17 @@ message Expression {
// UnresolvedStar is used to expand all the fields of a relation or struct.
message UnresolvedStar {
}
+
+ // An resolved attribute that can specify a reference (e.g. column) without
needing a resolution
+ // by the analyzer.
+ message Attribute {
+ string name = 1;
+ // TODO: Full definition of an attribute is at
https://github.com/apache/spark/blob/4f4a080a78c3979961e8483aace663bdc45f489d/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala#L105
+ // bool Nullability = 2;
+ // repeated string Qualifier = 3;
+ // int64 exprId = 4;
+ // string UUID = 6;
Review Comment:
Those should probably never be set from the spark connect side.
##########
connector/connect/src/main/scala/org/apache/spark/sql/catalyst/connect/connect.scala:
##########
@@ -0,0 +1,55 @@
+/*
+ * 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
+
+import scala.collection.JavaConverters._
+
+import org.apache.spark.connect.proto
Review Comment:
Doesn't this create a circular reference?
Connect depends on catalyst depends on connect?
##########
connector/connect/src/main/protobuf/spark/connect/expressions.proto:
##########
@@ -159,4 +159,17 @@ message Expression {
// UnresolvedStar is used to expand all the fields of a relation or struct.
message UnresolvedStar {
}
+
+ // An resolved attribute that can specify a reference (e.g. column) without
needing a resolution
+ // by the analyzer.
+ message Attribute {
Review Comment:
Why do we need a resolved attribute in the proto? This should never occur?
##########
connector/connect/src/main/protobuf/spark/connect/expressions.proto:
##########
@@ -159,4 +159,17 @@ message Expression {
// UnresolvedStar is used to expand all the fields of a relation or struct.
message UnresolvedStar {
}
+
+ // An resolved attribute that can specify a reference (e.g. column) without
needing a resolution
Review Comment:
As mentioned below "resolved" is not the right way to name this.
##########
connector/connect/src/main/protobuf/spark/connect/expressions.proto:
##########
@@ -159,4 +159,17 @@ message Expression {
// UnresolvedStar is used to expand all the fields of a relation or struct.
message UnresolvedStar {
}
+
+ // An resolved attribute that can specify a reference (e.g. column) without
needing a resolution
+ // by the analyzer.
+ message Attribute {
Review Comment:
Actually, I think we should rename this into something like "Qualified
Attribute" or something similar.
The reason is that it's a resolved attribute because the analyzer has never
seen it. The only reason it's similar to a resolved attribute is that it
carries all of the attributes of a resolved one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]