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
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,13 @@ public static HashMap<String, List<String>> resolve(

List<String> dictionary = null;
if (symbolLengthStream != null && symbolTableStream != null && dictionaryLengthStream != null) {
@SuppressWarnings("deprecation")
var decompressedLength = dictionaryLengthStream.stream().mapToInt(i -> i).sum();
var utf8Values =
FsstEncoder.decode(
symbolTableStream,
symbolLengthStream.stream().mapToInt(i -> i).toArray(),
dictionaryStream);
dictionaryStream,
decompressedLength);
dictionary = decodeDictionary(dictionaryLengthStream, utf8Values);
} else if (dictionaryLengthStream != null) {
dictionary = decodeDictionary(dictionaryLengthStream, dictionaryStream);
Expand Down Expand Up @@ -208,11 +209,13 @@ public static Triple<Integer, BitSet, List<String>> decode(
}

if (symbolTableStream != null && symbolLengthStream != null && dictionaryLengthStream != null) {
var decompressedLength = dictionaryLengthStream.stream().mapToInt(i -> i).sum();
var utf8Values =
FsstEncoder.decode(
symbolTableStream,
symbolLengthStream.stream().mapToInt(i -> i).toArray(),
dictionaryStream);
dictionaryStream,
decompressedLength);
return Triple.of(
numValues,
presentStream,
Expand Down Expand Up @@ -316,12 +319,14 @@ public static List<String> decodeFsstDictionaryEncodedStringColumn(byte[] data,
compressedCorpusOffset.get(),
compressedCorpusOffset.get() + compressedCorpusMetadata.byteLength());

@SuppressWarnings("deprecation")
var length = IntegerDecoder.decodeIntStream(data, lengthOffset, lengthMetadata, false);
var decompressedLength = length.stream().mapToInt(i -> i).sum();
var values =
FsstEncoder.decode(
symbols, symbolLength.stream().mapToInt(i -> i).toArray(), compressedCorpus);

var length = IntegerDecoder.decodeIntStream(data, lengthOffset, lengthMetadata, false);
symbols,
symbolLength.stream().mapToInt(i -> i).toArray(),
compressedCorpus,
decompressedLength);
var decodedData = IntegerDecoder.decodeIntStream(data, dataOffset, dataMetadata, false);

var decodedDictionary = new ArrayList<String>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,21 @@
public class FeatureTable implements Iterable<Feature> {
private final String name;

@SuppressWarnings("rawtypes")
private final Vector idColumn;
private final Vector<?, ?> idColumn;

private final GeometryVector geometryColumn;

@SuppressWarnings("rawtypes")
private final Vector[] propertyColumns;
private final Vector<?, ?>[] propertyColumns;

public FeatureTable(
String name,
GeometryVector geometryVector,
@SuppressWarnings("rawtypes") Vector[] properties) {
public FeatureTable(String name, GeometryVector geometryVector, Vector<?, ?>[] properties) {
this(name, null, geometryVector, properties);
}

public FeatureTable(
String name,
@SuppressWarnings("rawtypes") Vector idColumn,
Vector<?, ?> idColumn,
GeometryVector geometryVector,
@SuppressWarnings("rawtypes") Vector[] properties) {
Vector<?, ?>[] properties) {
this.name = name;
this.idColumn = idColumn;
this.geometryColumn = geometryVector;
Expand Down Expand Up @@ -87,17 +82,15 @@ public String getName() {
return name;
}

@SuppressWarnings("rawtypes")
public Vector getIdColumn() {
public Vector<?, ?> getIdColumn() {
return idColumn;
}

public GeometryVector getGeometryColumn() {
return geometryColumn;
}

@SuppressWarnings("rawtypes")
public Vector[] getPropertyColumns() {
public Vector<?, ?>[] getPropertyColumns() {
return propertyColumns;
}
}