forked from projectnessie/nessie
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix broken assertion in AbstractNessieSparkSqlExtensionTest
The assertion was modified in projectnessie#7308 with a workaround to avoid compilation failures. This commit reintroduces the right assertion, which became possible when Iceberg updated Nessie to 0.61+.
- Loading branch information
Showing
6 changed files
with
509 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
126 changes: 126 additions & 0 deletions
126
...3.2/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/NessieCommandOutputs.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
/* | ||
* Copyright (C) 2022 Dremio | ||
* | ||
* Licensed 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.plans.logical | ||
|
||
import org.apache.spark.sql.catalyst.expressions.AttributeReference | ||
import org.apache.spark.sql.types.{DataTypes, Metadata, StructField, StructType} | ||
|
||
object NessieCommandOutputs { | ||
def referenceOutput(): Seq[AttributeReference] = new StructType( | ||
Array[StructField]( | ||
StructField( | ||
"refType", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"name", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"hash", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
) | ||
) | ||
).toAttributes | ||
|
||
def simpleReferenceOutput(): Seq[AttributeReference] = new StructType( | ||
Array[StructField]( | ||
StructField( | ||
"name", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"hash", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
) | ||
) | ||
).toAttributes | ||
|
||
def dropReferenceOutput(): Seq[AttributeReference] = new StructType( | ||
Array[StructField]( | ||
StructField( | ||
"status", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
) | ||
) | ||
).toAttributes | ||
|
||
def showLogOutput(): Seq[AttributeReference] = new StructType( | ||
Array[StructField]( | ||
StructField( | ||
"author", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"committer", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"hash", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"message", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"signedOffBy", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"authorTime", | ||
DataTypes.TimestampType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"committerTime", | ||
DataTypes.TimestampType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"properties", | ||
DataTypes | ||
.createMapType(DataTypes.StringType, DataTypes.StringType, false), | ||
nullable = false, | ||
Metadata.empty | ||
) | ||
) | ||
).toAttributes | ||
} |
126 changes: 126 additions & 0 deletions
126
...3.3/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/NessieCommandOutputs.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
/* | ||
* Copyright (C) 2022 Dremio | ||
* | ||
* Licensed 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.plans.logical | ||
|
||
import org.apache.spark.sql.catalyst.expressions.AttributeReference | ||
import org.apache.spark.sql.types.{DataTypes, Metadata, StructField, StructType} | ||
|
||
object NessieCommandOutputs { | ||
def referenceOutput(): Seq[AttributeReference] = new StructType( | ||
Array[StructField]( | ||
StructField( | ||
"refType", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"name", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"hash", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
) | ||
) | ||
).toAttributes | ||
|
||
def simpleReferenceOutput(): Seq[AttributeReference] = new StructType( | ||
Array[StructField]( | ||
StructField( | ||
"name", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"hash", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
) | ||
) | ||
).toAttributes | ||
|
||
def dropReferenceOutput(): Seq[AttributeReference] = new StructType( | ||
Array[StructField]( | ||
StructField( | ||
"status", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
) | ||
) | ||
).toAttributes | ||
|
||
def showLogOutput(): Seq[AttributeReference] = new StructType( | ||
Array[StructField]( | ||
StructField( | ||
"author", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"committer", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"hash", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"message", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"signedOffBy", | ||
DataTypes.StringType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"authorTime", | ||
DataTypes.TimestampType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"committerTime", | ||
DataTypes.TimestampType, | ||
nullable = false, | ||
Metadata.empty | ||
), | ||
StructField( | ||
"properties", | ||
DataTypes | ||
.createMapType(DataTypes.StringType, DataTypes.StringType, false), | ||
nullable = false, | ||
Metadata.empty | ||
) | ||
) | ||
).toAttributes | ||
} |
Oops, something went wrong.