Class MetadataVersion
java.lang.Object
org.apache.drill.exec.store.parquet.metadata.MetadataVersion
- All Implemented Interfaces:
Comparable<MetadataVersion>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Supported metadata versions. -
Constructor Summary
ConstructorDescriptionMetadataVersion
(int major, int minor) MetadataVersion
(String metadataVersion) -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
int
getMajor()
int
getMinor()
int
hashCode()
boolean
isAtLeast
(int major, int minor) Check if this version is at least (equals or higher) the one identified bymajor
andminor
versions integer literals.boolean
isEqualTo
(int major, int minor) Check if the version is the same as the one identified bymajor
andminor
versions integer literals.boolean
isHigherThan
(int major, int minor) Check if this version comes after the one identified bymajor
andminor
versions integer literals.toString()
-
Constructor Details
-
MetadataVersion
public MetadataVersion(int major, int minor) -
MetadataVersion
-
-
Method Details
-
getMajor
public int getMajor() -
getMinor
public int getMinor() -
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toString
in classObject
- Returns:
- string representation of the metadata file version, for example: "1", "10", "4.13"
String metadata version consists of the following characters:
major metadata version (any number of digits, except a single zero digit),
optional "." delimiter (used if minor metadata version is specified),
minor metadata version (not specified for "0" minor version)
-
compareTo
- Specified by:
compareTo
in interfaceComparable<MetadataVersion>
-
isAtLeast
public boolean isAtLeast(int major, int minor) Check if this version is at least (equals or higher) the one identified bymajor
andminor
versions integer literals.- Parameters:
major
- major versionminor
- minor version- Returns:
- true if the version is equal to or higher than the one it is being checked against
-
isEqualTo
public boolean isEqualTo(int major, int minor) Check if the version is the same as the one identified bymajor
andminor
versions integer literals.- Parameters:
major
- major versionminor
- minor version- Returns:
- true if the version is equal to the one it is being checked against
-
isHigherThan
public boolean isHigherThan(int major, int minor) Check if this version comes after the one identified bymajor
andminor
versions integer literals. That is, this one was introduced later.- Parameters:
major
- major versionminor
- minor version- Returns:
- true if the version is defined later than the one it is being checked against
-