Class MetadataVersion
java.lang.Object
org.apache.drill.exec.store.parquet.metadata.MetadataVersion
- All Implemented Interfaces:
Comparable<MetadataVersion>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSupported metadata versions. -
Constructor Summary
ConstructorsConstructorDescriptionMetadataVersion(int major, int minor) MetadataVersion(String metadataVersion) -
Method Summary
Modifier and TypeMethodDescriptionintbooleanintgetMajor()intgetMinor()inthashCode()booleanisAtLeast(int major, int minor) Check if this version is at least (equals or higher) the one identified bymajorandminorversions integer literals.booleanisEqualTo(int major, int minor) Check if the version is the same as the one identified bymajorandminorversions integer literals.booleanisHigherThan(int major, int minor) Check if this version comes after the one identified bymajorandminorversions 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:
toStringin 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:
compareToin interfaceComparable<MetadataVersion>
-
isAtLeast
public boolean isAtLeast(int major, int minor) Check if this version is at least (equals or higher) the one identified bymajorandminorversions 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 bymajorandminorversions 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 bymajorandminorversions 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
-