Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
29deea4
[#8833] feat(catalogs): Support the basic framework for the generic l…
yuqi1129 Oct 20, 2025
eb8ace8
feat(lance): add Lance REST server packaging (#8825)
beinan Oct 21, 2025
ea1576a
[#8835][#8836] feat(lakehouseCatalog): supports catalog and schema o…
mchades Oct 22, 2025
924acbb
[#8834] feat(catalogs): Add a table to store details information of G…
yuqi1129 Oct 23, 2025
9aa61b2
[#8890] feat(lance-rest-server): add lance-rest-server framework (#8895)
mchades Oct 24, 2025
f6d49d9
[#8891] feat(lance-rest-server): Add standalone and auxiliary mode su…
youngyjd Oct 24, 2025
618fc60
[#8861] Improve(test): fix testPolicyAndTagCacheWeigher (#8862)
youngyjd Oct 21, 2025
6c66f9d
[#8871]Improve(core): fix EntityCacheWeigher and testPolicyAndTagCac…
youngyjd Oct 22, 2025
059d279
[HOTFIX][#8830] fix (gvfs-fuse) : Disable the CI to build fuse-filesy…
diqiu50 Oct 24, 2025
67179e6
[#8909] feat(lance): Add metric systems to lance server (#8904)
youngyjd Oct 24, 2025
d093824
[#8838] feat(catalogs): Support create/load/list table operation for …
yuqi1129 Oct 24, 2025
662097a
[#8892] feat(Lance-REST-Server): implement namespace operation APIs f…
mchades Oct 24, 2025
96a1caa
[#8893] feat(lance-rest-server): Support create/load table operations…
yuqi1129 Oct 25, 2025
bedc522
[MINOR] Improve(lance-namespace): Slightly improve the configuration …
jerryshao Oct 28, 2025
4a92762
[#8919] improve(lance-table): Supports object store configurations fo…
mchades Oct 28, 2025
d0c58f9
[#8921] improvement(catalogs): Add ITs for lance table operations. (#…
yuqi1129 Oct 28, 2025
4c6934d
[#8933] fix(CI): Fix the lance rest start issue (#8934)
jerryshao Oct 28, 2025
c4a9618
[#8959] fix(lance-rest): Fix configuration name error in Lance config…
yuqi1129 Oct 29, 2025
bc1b77a
[#8946] improvement(lance): supports more dataTypes for lance table c…
mchades Oct 29, 2025
f313b70
[#8915] improvment(catalogs): Polish code for PR #8879 (#8922)
yuqi1129 Oct 30, 2025
d8a4ded
[#8962] improvement(lance): supports more dataTypes for the Lance res…
mchades Oct 31, 2025
48342ac
[#8955] feat(lance-rest): Support register and deregister table in La…
yuqi1129 Oct 31, 2025
97e1ccb
[MINOR] fix(lance-rest-server): remove encoded annotation (#8992)
mchades Oct 31, 2025
fc0f617
[#9009]improvement(lance-rest-server): add ITs for LRS namespace oper…
mchades Nov 4, 2025
dff4bc2
[#8937] fix(core): Fix flaky test in testPolicyAndTagCacheWeigher (#8…
yuqi1129 Oct 29, 2025
8782b30
[#8940] improvement(core): Support serialize/deserialize for distribu…
yuqi1129 Nov 4, 2025
32d9642
[#9015] improvement(lance-rest): Add UTs and ITs for Lance rest table…
yuqi1129 Nov 5, 2025
d724f2e
[#9028] improve(core): Refactor the table and table entity to avoid i…
jerryshao Nov 7, 2025
67ea168
Support create & list index for LRS
yuqi1129 Nov 7, 2025
1dff206
Fix tests
yuqi1129 Nov 7, 2025
72cc9f3
Polish
yuqi1129 Nov 11, 2025
25774a6
fix
yuqi1129 Nov 11, 2025
7a23944
[#9028] improve(core): Refactor the table and table entity to avoid i…
jerryshao Nov 7, 2025
ea3eb77
bugfix[lance]: fix lance register table endpoint (#9093)
youngyjd Nov 13, 2025
5c4035a
Merge branch 'branch-lance-namespace-dev' of github.com:apache/gravit…
yuqi1129 Nov 13, 2025
fe2efa7
[#8939] Improvement(lance-catalog): Make operating Gravitino store an…
yuqi1129 Nov 13, 2025
9c0816e
Merge branch 'branch-lance-namespace-dev' into issue_9043
yuqi1129 Nov 13, 2025
2ef3fe9
Polish code
yuqi1129 Nov 13, 2025
7fd5d2d
Resolve the comments
yuqi1129 Nov 19, 2025
138d63f
Merge branch 'main' of github.com:apache/gravitino into issue_9043
yuqi1129 Nov 24, 2025
446e29a
fix
yuqi1129 Nov 24, 2025
fb3ec03
fix
yuqi1129 Nov 24, 2025
4071e17
fix
yuqi1129 Nov 24, 2025
0081592
fix
yuqi1129 Nov 24, 2025
dbda7f2
fix comments by copilot
yuqi1129 Nov 24, 2025
a2e9bfb
Merge branch 'main' of github.com:datastrato/graviton into issue_9043
yuqi1129 Nov 26, 2025
4fb5909
Resolves comments by copilot
yuqi1129 Nov 26, 2025
66d8520
Merge branch 'main' of github.com:datastrato/graviton into issue_9043
yuqi1129 Nov 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion api/src/main/java/org/apache/gravitino/rel/TableChange.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import com.google.common.base.Preconditions;
import java.util.Arrays;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import org.apache.gravitino.annotation.Evolving;
Expand Down Expand Up @@ -453,6 +454,20 @@ static TableChange addIndex(IndexType type, String name, String[][] fieldNames)
return new AddIndex(type, name, fieldNames);
}

/**
* Create a TableChange for adding an index.
*
* @param type The type of the index.
* @param name The name of the index.
* @param fieldNames The field names of the index.
* @param properties The properties of the index.
* @return A TableChange for the add index.
*/
static TableChange addIndex(
IndexType type, String name, String[][] fieldNames, Map<String, String> properties) {
return new AddIndex(type, name, fieldNames, properties);
}

/**
* Create a TableChange for deleting an index.
*
Expand Down Expand Up @@ -747,15 +762,29 @@ final class AddIndex implements TableChange {

private final String[][] fieldNames;

private final Map<String, String> properties;

/**
* @param type The type of the index.
* @param name The name of the index.
* @param fieldNames The field names of the index.
*/
public AddIndex(IndexType type, String name, String[][] fieldNames) {
this(type, name, fieldNames, Map.of());
}

/**
* @param type The type of the index.
* @param name The name of the index.
* @param fieldNames The field names of the index.
* @param properties The properties of the index.
*/
public AddIndex(
IndexType type, String name, String[][] fieldNames, Map<String, String> properties) {
this.type = type;
this.name = name;
this.fieldNames = fieldNames;
this.properties = properties;
}

/**
Expand All @@ -779,20 +808,29 @@ public String[][] getFieldNames() {
return fieldNames;
}

/**
* @return The properties of the index.
*/
public Map<String, String> getProperties() {
return properties;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AddIndex addIndex = (AddIndex) o;
return type == addIndex.type
&& Objects.equals(name, addIndex.name)
&& Arrays.deepEquals(fieldNames, addIndex.fieldNames);
&& Arrays.deepEquals(fieldNames, addIndex.fieldNames)
&& Objects.equals(properties, addIndex.properties);
}

@Override
public int hashCode() {
int result = Objects.hash(type, name);
result = 31 * result + Arrays.hashCode(fieldNames);
result = 31 * result + Objects.hashCode(properties);
return result;
}
}
Expand Down
49 changes: 43 additions & 6 deletions api/src/main/java/org/apache/gravitino/rel/indexes/Index.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.apache.gravitino.rel.indexes;

import java.util.Map;
import org.apache.gravitino.annotation.Evolving;

/**
Expand All @@ -44,6 +45,13 @@ public interface Index {
*/
String[][] fieldNames();

/**
* @return The properties of the index.
*/
default Map<String, String> properties() {
return Map.of();
}

/**
* The enum IndexType defines the type of the index. Currently, PRIMARY_KEY and UNIQUE_KEY are
* supported.
Expand Down Expand Up @@ -102,15 +110,44 @@ enum IndexType {
* Currently, this type is only applicable to Lance.
*/
VECTOR,
/** IVF_FLAT (Inverted File with Flat quantization) is an indexing method used for efficient */

/**
* IVF_FLAT (Inverted File with Flat Quantization) is an indexing method used for efficient
* approximate nearest neighbor search in high-dimensional vector spaces. It stores the original
* vectors without any quantization.
*/
IVF_FLAT,
/** IVF_SQ (Inverted File with Scalar Quantization) is an indexing method used for efficient */
/**
* IVF_SQ (Inverted File with Scalar Quantization) is an indexing method used for efficient
* approximate nearest neighbor search in high-dimensional vector spaces. It applies scalar
* quantization to reduce the storage size of the vectors.
*/
IVF_SQ,
/** IVF_PQ (Inverted File with Product Quantization) is an indexing method used for efficient */
/**
* IVF_PQ (Inverted File with Product Quantization) is an indexing method used for efficient
* approximate nearest neighbor search in high-dimensional vector spaces. It applies product
* quantization to compress the vectors into smaller codes for faster search and reduced
* storage.
*/
IVF_PQ,
/** IVF_HNSW_FLAT */

/**
* IVF_HNSW_SQ is an indexing method that combines Inverted File (IVF) with Hierarchical
* Navigable Small World (HNSW) graphs and Scalar Quantization (SQ) for efficient approximate
* nearest neighbor search in high-dimensional vector spaces.
*/
IVF_HNSW_SQ,
/** IVF_HNSW_PQ */
IVF_HNSW_PQ;
/**
* IVF_HNSW_PQ is an indexing method that combines Inverted File (IVF) with Hierarchical
* Navigable Small World (HNSW) graphs and Product Quantization (PQ) for efficient approximate
* nearest neighbor search in high-dimensional vector spaces.
*/
IVF_HNSW_PQ,
/**
* FTS index is a data structure used for efficient storage and retrieval of strings, enabling
* fast prefix-based searches and pattern matching. Currently, this type is only applicable to
* Lance.
*/
FTS;
}
}
56 changes: 52 additions & 4 deletions api/src/main/java/org/apache/gravitino/rel/indexes/Indexes.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import com.google.common.base.Objects;
import java.util.Arrays;
import java.util.Map;

/** Helper methods to create index to pass into Apache Gravitino. */
public class Indexes {
Expand Down Expand Up @@ -76,6 +77,28 @@ public static Index of(Index.IndexType indexType, String name, String[][] fieldN
.build();
}

/**
* Create an index.
*
* @param indexType The type of the index
* @param name The name of the index
* @param fieldNames The field names under the table contained in the index.
* @param properties The properties of the index.
* @return The index to be created.
*/
public static Index of(
Index.IndexType indexType,
String name,
String[][] fieldNames,
Map<String, String> properties) {
return IndexImpl.builder()
.withIndexType(indexType)
.withName(name)
.withFieldNames(fieldNames)
.withProperties(properties)
.build();
}

/** The user side implementation of the index. */
public static final class IndexImpl implements Index {
private final IndexType indexType;
Expand All @@ -84,17 +107,20 @@ public static final class IndexImpl implements Index {

private final String[][] fieldNames;

private final Map<String, String> properties;
/**
* The constructor of the index.
*
* @param indexType The type of the index
* @param name The name of the index
* @param fieldNames The field names under the table contained in the index.
*/
private IndexImpl(IndexType indexType, String name, String[][] fieldNames) {
private IndexImpl(
IndexType indexType, String name, String[][] fieldNames, Map<String, String> properties) {
this.indexType = indexType;
this.name = name;
this.fieldNames = fieldNames;
this.properties = properties;
}

/**
Expand All @@ -121,6 +147,11 @@ public String[][] fieldNames() {
return fieldNames;
}

@Override
public Map<String, String> properties() {
return properties;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -132,12 +163,15 @@ public boolean equals(Object o) {
IndexImpl index = (IndexImpl) o;
return indexType == index.indexType
&& Objects.equal(name, index.name)
&& Arrays.deepEquals(fieldNames, index.fieldNames);
&& Arrays.deepEquals(fieldNames, index.fieldNames)
&& Objects.equal(properties, index.properties);
}

@Override
public int hashCode() {
return Objects.hashCode(indexType, name, Arrays.hashCode(fieldNames));
int result = Objects.hashCode(indexType, name, properties);
result = 31 * result + Arrays.deepHashCode(fieldNames);
return result;
}

/**
Expand All @@ -159,6 +193,9 @@ public static class Builder {
/** The field names of the index. */
protected String[][] fieldNames;

/** The properties of the index. */
protected Map<String, String> properties;

/**
* Set the type of the index.
*
Expand Down Expand Up @@ -192,13 +229,24 @@ public Indexes.IndexImpl.Builder withFieldNames(String[][] fieldNames) {
return this;
}

/**
* Set the properties of the index.
*
* @param properties The properties of the index
* @return The builder for creating a new instance of IndexImpl.
*/
public Indexes.IndexImpl.Builder withProperties(Map<String, String> properties) {
this.properties = properties;
return this;
}

/**
* Build a new instance of IndexImpl.
*
* @return The new instance.
*/
public Index build() {
return new IndexImpl(indexType, name, fieldNames);
return new IndexImpl(indexType, name, fieldNames, properties);
}
}
}
Expand Down
29 changes: 17 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -858,17 +858,6 @@ tasks {
destinationDirectory.set(projectDir.dir("distribution"))
}

val assembleLanceRESTServer by registering(Tar::class) {
dependsOn("compileLanceRESTServer")
group = "gravitino distribution"
finalizedBy("checksumLanceRESTServerDistribution")
into("${rootProject.name}-lance-rest-server-$version-bin")
from(compileLanceRESTServer.map { it.outputs.files.single() })
compression = Compression.GZIP
archiveFileName.set("${rootProject.name}-lance-rest-server-$version-bin.tar.gz")
destinationDirectory.set(projectDir.dir("distribution"))
}

val assembleIcebergRESTServer by registering(Tar::class) {
dependsOn("compileIcebergRESTServer")
group = "gravitino distribution"
Expand All @@ -880,6 +869,17 @@ tasks {
destinationDirectory.set(projectDir.dir("distribution"))
}

val assembleLanceRESTServer by registering(Tar::class) {
dependsOn("compileLanceRESTServer")
group = "gravitino distribution"
finalizedBy("checksumLanceRESTServerDistribution")
into("${rootProject.name}-lance-rest-server-$version-bin")
from(compileLanceRESTServer.map { it.outputs.files.single() })
compression = Compression.GZIP
archiveFileName.set("${rootProject.name}-lance-rest-server-$version-bin.tar.gz")
destinationDirectory.set(projectDir.dir("distribution"))
}

register("checksumIcebergRESTServerDistribution") {
group = "gravitino distribution"
dependsOn(assembleIcebergRESTServer)
Expand Down Expand Up @@ -914,7 +914,12 @@ tasks {

register("checksumDistribution") {
group = "gravitino distribution"
dependsOn(assembleDistribution, "checksumTrinoConnector", "checksumIcebergRESTServerDistribution", "checksumLanceRESTServerDistribution")
dependsOn(
assembleDistribution,
"checksumTrinoConnector",
"checksumIcebergRESTServerDistribution",
"checksumLanceRESTServerDistribution"
)
val archiveFile = assembleDistribution.flatMap { it.archiveFile }
val checksumFile = archiveFile.map { archive ->
archive.asFile.let { it.resolveSibling("${it.name}.sha256") }
Expand Down
6 changes: 5 additions & 1 deletion catalogs/catalog-lakehouse-generic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ dependencies {
implementation(libs.commons.io)
implementation(libs.commons.lang3)
implementation(libs.guava)
implementation(libs.lance)
implementation(libs.hadoop3.client.api)
implementation(libs.lance) {
exclude(group = "com.google.guava", module = "guava") // provided by gravitino
exclude(group = "org.apache.commons", module = "commons-lang3") // provided by gravitino
}

annotationProcessor(libs.lombok)

Expand Down
Loading