Skip to content

Commit

Permalink
Update CatalogVersion contract
Browse files Browse the repository at this point in the history
The engine doesn't require CatalogVersions to be lexicographically
sortable. Additionally, the CatalogStore implementations provided by the
engine (FileCatalogStore and InMemoryCatalogStore), do not guarantee
that the lexicographical order reflects the chronological order of
catalog versions.
  • Loading branch information
piotrrzysko authored and hashhar committed Oct 14, 2024
1 parent e0e83a4 commit b4f8248
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,13 @@ public boolean isInternal()

@Experimental(eta = "2023-02-01")
public static final class CatalogVersion
implements Comparable<CatalogVersion>
{
private static final int INSTANCE_SIZE = instanceSize(CatalogVersion.class);

private final String version;

/**
* Version of a catalog. The string maybe compared lexicographically using ASCII, and to determine which catalog version is newer.
* Version of a catalog.
*/
@JsonCreator
public CatalogVersion(String version)
Expand All @@ -204,12 +203,6 @@ private static boolean isAllowedCharacter(char c)
c == '-';
}

@Override
public int compareTo(CatalogVersion other)
{
return version.compareTo(other.version);
}

@Override
public boolean equals(Object other)
{
Expand Down

0 comments on commit b4f8248

Please sign in to comment.