Skip to content
Merged
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
6 changes: 6 additions & 0 deletions plugin/trino-delta-lake/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@
<artifactId>units</artifactId>
</dependency>

<dependency>
<groupId>io.delta</groupId>
<artifactId>delta-kernel-api</artifactId>
<version>3.2.0</version>
</dependency>

<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-cache</artifactId>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package io.trino.plugin.deltalake.delete;

import com.google.common.base.CharMatcher;
import io.delta.kernel.internal.deletionvectors.Base85Codec;
import io.trino.filesystem.Location;
import io.trino.filesystem.TrinoFileSystem;
import io.trino.filesystem.TrinoInputFile;
Expand All @@ -31,6 +32,7 @@

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import static io.delta.kernel.internal.deletionvectors.Base85Codec.decodeUUID;
import static io.trino.plugin.deltalake.DeltaLakeErrorCode.DELTA_LAKE_INVALID_SCHEMA;
import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED;
import static java.lang.Math.toIntExact;
Expand Down Expand Up @@ -74,7 +76,7 @@ public static String toFileName(String pathOrInlineDv)
checkArgument(ALPHANUMERIC.matchesAllOf(randomPrefix), "Random prefix must be alphanumeric: %s", randomPrefix);
String prefix = randomPrefix.isEmpty() ? "" : randomPrefix + "/";
String encodedUuid = pathOrInlineDv.substring(randomPrefixLength);
UUID uuid = decodeUuid(encodedUuid);
UUID uuid = decodeUUID(encodedUuid);
return "%sdeletion_vector_%s.bin".formatted(prefix, uuid);
}

Expand Down Expand Up @@ -131,14 +133,4 @@ private static Roaring64NavigableMap deserializeDeletionVectors(byte[] bytes)
}
throw new IllegalArgumentException("Unsupported magic number: " + magicNumber);
}

public static UUID decodeUuid(String encoded)
{
byte[] bytes = Base85Codec.decode(encoded);
ByteBuffer buffer = ByteBuffer.wrap(bytes);
checkArgument(buffer.remaining() == 16);
long highBits = buffer.getLong();
long lowBits = buffer.getLong();
return new UUID(highBits, lowBits);
}
}

This file was deleted.