Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* 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 io.trino.plugin.lance;

import java.util.Optional;

import static java.util.Objects.requireNonNull;

/**
* Procedure handle for {@code ALTER TABLE ... EXECUTE compact(...)}.
* {@code deferIndexRemap}, when true, skips remapping row addresses in existing indices during
* compaction (applied lazily via the Fragment Reuse Index on next load instead), so compaction
* does not conflict with concurrent index builds. Empty means use Lance's own default.
*/
public record LanceCompactHandle(Optional<Boolean> deferIndexRemap)
implements LanceProcedureHandle
{
public LanceCompactHandle
{
requireNonNull(deferIndexRemap, "deferIndexRemap is null");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
import io.trino.spi.connector.ConnectorSession;
import io.trino.spi.connector.ConnectorSplitManager;
import io.trino.spi.connector.ConnectorTransactionHandle;
import io.trino.spi.connector.TableProcedureMetadata;
import io.trino.spi.session.PropertyMetadata;
import io.trino.spi.transaction.IsolationLevel;

import java.util.List;
import java.util.Set;

import static java.util.Objects.requireNonNull;

Expand Down Expand Up @@ -90,6 +92,12 @@ public List<PropertyMetadata<?>> getTableProperties()
return LanceTableProperties.getTableProperties();
}

@Override
public Set<TableProcedureMetadata> getTableProcedures()
{
return LanceTableProcedures.getTableProcedures();
}

@Override
public final void shutdown()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* 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 io.trino.plugin.lance;

import java.util.Optional;

import static java.util.Objects.requireNonNull;

/**
* Procedure handle for {@code ALTER TABLE ... EXECUTE create_index(...)}.
* Currently only the {@code fts} (inverted) index type is supported.
*/
public record LanceCreateIndexHandle(
String column,
Optional<String> indexName,
String indexType,
boolean replace,
boolean train,
String baseTokenizer,
String language,
boolean withPosition,
boolean lowerCase,
boolean stem,
boolean removeStopWords,
boolean asciiFolding,
Optional<Integer> maxTokenLength)
implements LanceProcedureHandle
{
public LanceCreateIndexHandle
{
requireNonNull(column, "column is null");
requireNonNull(indexName, "indexName is null");
requireNonNull(indexType, "indexType is null");
requireNonNull(baseTokenizer, "baseTokenizer is null");
requireNonNull(language, "language is null");
requireNonNull(maxTokenLength, "maxTokenLength is null");
}
}
Loading