forked from apache/gravitino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[apache#2587] feat(spark-connector): Support iceberg metadataColumns (a…
…pache#2717) ### What changes were proposed in this pull request? Support retrieve iceberg metadataColumns, such as `_spec_id`, `_partition`, `_file`, `_pos`, `_deleted`. ### Why are the changes needed? Support retrieve iceberg metadataColumns, row-level operations depend on this. Fix: apache#2587 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? New integration test.
- Loading branch information
Showing
6 changed files
with
288 additions
and
1 deletion.
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
33 changes: 33 additions & 0 deletions
33
...st/java/com/datastrato/gravitino/integration/test/util/spark/SparkMetadataColumnInfo.java
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,33 @@ | ||
/* | ||
* Copyright 2024 Datastrato Pvt Ltd. | ||
* This software is licensed under the Apache License version 2. | ||
*/ | ||
|
||
package com.datastrato.gravitino.integration.test.util.spark; | ||
|
||
import org.apache.spark.sql.connector.catalog.MetadataColumn; | ||
import org.apache.spark.sql.types.DataType; | ||
|
||
public class SparkMetadataColumnInfo implements MetadataColumn { | ||
private final String name; | ||
private final DataType dataType; | ||
private final boolean isNullable; | ||
|
||
public SparkMetadataColumnInfo(String name, DataType dataType, boolean isNullable) { | ||
this.name = name; | ||
this.dataType = dataType; | ||
this.isNullable = isNullable; | ||
} | ||
|
||
public String name() { | ||
return this.name; | ||
} | ||
|
||
public DataType dataType() { | ||
return this.dataType; | ||
} | ||
|
||
public boolean isNullable() { | ||
return this.isNullable; | ||
} | ||
} |
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
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
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
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