This is an automated email from the ASF dual-hosted git repository.
fokko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/parquet-mr.git
The following commit(s) were added to refs/heads/master by this push:
new 4ca813a8c PARQUET-2384: Mark toOriginalType as deprecated (#1202)
4ca813a8c is described below
commit 4ca813a8cb0166156ad5ded53244d381012c00de
Author: Fokko Driesprong <[email protected]>
AuthorDate: Tue Nov 28 14:24:30 2023 -0800
PARQUET-2384: Mark toOriginalType as deprecated (#1202)
The OriginalType itself has been marked as deprecated
for a long time, would be good to mark these as deprecated
as well.
---
.../parquet/schema/LogicalTypeAnnotation.java | 45 ++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git
a/parquet-column/src/main/java/org/apache/parquet/schema/LogicalTypeAnnotation.java
b/parquet-column/src/main/java/org/apache/parquet/schema/LogicalTypeAnnotation.java
index bdd4f1a5e..7ca98cd9b 100644
---
a/parquet-column/src/main/java/org/apache/parquet/schema/LogicalTypeAnnotation.java
+++
b/parquet-column/src/main/java/org/apache/parquet/schema/LogicalTypeAnnotation.java
@@ -151,8 +151,11 @@ public abstract class LogicalTypeAnnotation {
*
* API should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the OriginalType representation of the new logical type, or null
if there's none
*/
+ @Deprecated
public abstract OriginalType toOriginalType();
/**
@@ -314,9 +317,12 @@ public abstract class LogicalTypeAnnotation {
/**
* API Should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the original type
*/
@Override
+ @Deprecated
public OriginalType toOriginalType() {
return OriginalType.UTF8;
}
@@ -357,9 +363,12 @@ public abstract class LogicalTypeAnnotation {
/**
* API Should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the original type
*/
@Override
+ @Deprecated
public OriginalType toOriginalType() {
return OriginalType.MAP;
}
@@ -395,9 +404,12 @@ public abstract class LogicalTypeAnnotation {
/**
* API Should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the original type
*/
@Override
+ @Deprecated
public OriginalType toOriginalType() {
return OriginalType.LIST;
}
@@ -433,9 +445,12 @@ public abstract class LogicalTypeAnnotation {
/**
* API Should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the original type
*/
@Override
+ @Deprecated
public OriginalType toOriginalType() {
return OriginalType.ENUM;
}
@@ -489,9 +504,12 @@ public abstract class LogicalTypeAnnotation {
/**
* API Should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the original type
*/
@Override
+ @Deprecated
public OriginalType toOriginalType() {
return OriginalType.DECIMAL;
}
@@ -546,9 +564,12 @@ public abstract class LogicalTypeAnnotation {
/**
* API Should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the original type
*/
@Override
+ @Deprecated
public OriginalType toOriginalType() {
return OriginalType.DATE;
}
@@ -598,9 +619,12 @@ public abstract class LogicalTypeAnnotation {
/**
* API Should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the original type
*/
@Override
+ @Deprecated
public OriginalType toOriginalType() {
switch (unit) {
case MILLIS:
@@ -681,9 +705,12 @@ public abstract class LogicalTypeAnnotation {
/**
* API Should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the original type
*/
@Override
+ @Deprecated
public OriginalType toOriginalType() {
switch (unit) {
case MILLIS:
@@ -771,9 +798,12 @@ public abstract class LogicalTypeAnnotation {
/**
* API Should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the original type
*/
@Override
+ @Deprecated
public OriginalType toOriginalType() {
switch (bitWidth) {
case 8:
@@ -847,9 +877,12 @@ public abstract class LogicalTypeAnnotation {
/**
* API Should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the original type
*/
@Override
+ @Deprecated
public OriginalType toOriginalType() {
return OriginalType.JSON;
}
@@ -890,9 +923,12 @@ public abstract class LogicalTypeAnnotation {
/**
* API Should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the original type
*/
@Override
+ @Deprecated
public OriginalType toOriginalType() {
return OriginalType.BSON;
}
@@ -934,9 +970,12 @@ public abstract class LogicalTypeAnnotation {
/**
* API Should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the original type
*/
@Override
+ @Deprecated
public OriginalType toOriginalType() {
// No OriginalType for UUID
return null;
@@ -974,9 +1013,12 @@ public abstract class LogicalTypeAnnotation {
/**
* API Should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the original type
*/
@Override
+ @Deprecated
public OriginalType toOriginalType() {
return OriginalType.INTERVAL;
}
@@ -1029,9 +1071,12 @@ public abstract class LogicalTypeAnnotation {
/**
* API Should be considered private
*
+ * Deprecated: Please use the LogicalTypeAnnotation itself
+ *
* @return the original type
*/
@Override
+ @Deprecated
public OriginalType toOriginalType() {
return OriginalType.MAP_KEY_VALUE;
}