@@ -151,8 +151,11 @@ protected LogicalTypeAnnotation fromString(List<String> params) {
151151 *
152152 * API should be considered private
153153 *
154+ * Deprecated: Please use the LogicalTypeAnnotation itself
155+ *
154156 * @return the OriginalType representation of the new logical type, or null if there's none
155157 */
158+ @ Deprecated
156159 public abstract OriginalType toOriginalType ();
157160
158161 /**
@@ -314,9 +317,12 @@ private StringLogicalTypeAnnotation() {
314317 /**
315318 * API Should be considered private
316319 *
320+ * Deprecated: Please use the LogicalTypeAnnotation itself
321+ *
317322 * @return the original type
318323 */
319324 @ Override
325+ @ Deprecated
320326 public OriginalType toOriginalType () {
321327 return OriginalType .UTF8 ;
322328 }
@@ -357,9 +363,12 @@ private MapLogicalTypeAnnotation() {
357363 /**
358364 * API Should be considered private
359365 *
366+ * Deprecated: Please use the LogicalTypeAnnotation itself
367+ *
360368 * @return the original type
361369 */
362370 @ Override
371+ @ Deprecated
363372 public OriginalType toOriginalType () {
364373 return OriginalType .MAP ;
365374 }
@@ -395,9 +404,12 @@ private ListLogicalTypeAnnotation() {
395404 /**
396405 * API Should be considered private
397406 *
407+ * Deprecated: Please use the LogicalTypeAnnotation itself
408+ *
398409 * @return the original type
399410 */
400411 @ Override
412+ @ Deprecated
401413 public OriginalType toOriginalType () {
402414 return OriginalType .LIST ;
403415 }
@@ -433,9 +445,12 @@ private EnumLogicalTypeAnnotation() {
433445 /**
434446 * API Should be considered private
435447 *
448+ * Deprecated: Please use the LogicalTypeAnnotation itself
449+ *
436450 * @return the original type
437451 */
438452 @ Override
453+ @ Deprecated
439454 public OriginalType toOriginalType () {
440455 return OriginalType .ENUM ;
441456 }
@@ -489,9 +504,12 @@ public int getScale() {
489504 /**
490505 * API Should be considered private
491506 *
507+ * Deprecated: Please use the LogicalTypeAnnotation itself
508+ *
492509 * @return the original type
493510 */
494511 @ Override
512+ @ Deprecated
495513 public OriginalType toOriginalType () {
496514 return OriginalType .DECIMAL ;
497515 }
@@ -546,9 +564,12 @@ private DateLogicalTypeAnnotation() {
546564 /**
547565 * API Should be considered private
548566 *
567+ * Deprecated: Please use the LogicalTypeAnnotation itself
568+ *
549569 * @return the original type
550570 */
551571 @ Override
572+ @ Deprecated
552573 public OriginalType toOriginalType () {
553574 return OriginalType .DATE ;
554575 }
@@ -598,9 +619,12 @@ private TimeLogicalTypeAnnotation(boolean isAdjustedToUTC, TimeUnit unit) {
598619 /**
599620 * API Should be considered private
600621 *
622+ * Deprecated: Please use the LogicalTypeAnnotation itself
623+ *
601624 * @return the original type
602625 */
603626 @ Override
627+ @ Deprecated
604628 public OriginalType toOriginalType () {
605629 switch (unit ) {
606630 case MILLIS :
@@ -681,9 +705,12 @@ private TimestampLogicalTypeAnnotation(boolean isAdjustedToUTC, TimeUnit unit) {
681705 /**
682706 * API Should be considered private
683707 *
708+ * Deprecated: Please use the LogicalTypeAnnotation itself
709+ *
684710 * @return the original type
685711 */
686712 @ Override
713+ @ Deprecated
687714 public OriginalType toOriginalType () {
688715 switch (unit ) {
689716 case MILLIS :
@@ -771,9 +798,12 @@ private IntLogicalTypeAnnotation(int bitWidth, boolean isSigned) {
771798 /**
772799 * API Should be considered private
773800 *
801+ * Deprecated: Please use the LogicalTypeAnnotation itself
802+ *
774803 * @return the original type
775804 */
776805 @ Override
806+ @ Deprecated
777807 public OriginalType toOriginalType () {
778808 switch (bitWidth ) {
779809 case 8 :
@@ -847,9 +877,12 @@ private JsonLogicalTypeAnnotation() {
847877 /**
848878 * API Should be considered private
849879 *
880+ * Deprecated: Please use the LogicalTypeAnnotation itself
881+ *
850882 * @return the original type
851883 */
852884 @ Override
885+ @ Deprecated
853886 public OriginalType toOriginalType () {
854887 return OriginalType .JSON ;
855888 }
@@ -890,9 +923,12 @@ private BsonLogicalTypeAnnotation() {
890923 /**
891924 * API Should be considered private
892925 *
926+ * Deprecated: Please use the LogicalTypeAnnotation itself
927+ *
893928 * @return the original type
894929 */
895930 @ Override
931+ @ Deprecated
896932 public OriginalType toOriginalType () {
897933 return OriginalType .BSON ;
898934 }
@@ -934,9 +970,12 @@ private UUIDLogicalTypeAnnotation() {
934970 /**
935971 * API Should be considered private
936972 *
973+ * Deprecated: Please use the LogicalTypeAnnotation itself
974+ *
937975 * @return the original type
938976 */
939977 @ Override
978+ @ Deprecated
940979 public OriginalType toOriginalType () {
941980 // No OriginalType for UUID
942981 return null ;
@@ -974,9 +1013,12 @@ private IntervalLogicalTypeAnnotation() {
9741013 /**
9751014 * API Should be considered private
9761015 *
1016+ * Deprecated: Please use the LogicalTypeAnnotation itself
1017+ *
9771018 * @return the original type
9781019 */
9791020 @ Override
1021+ @ Deprecated
9801022 public OriginalType toOriginalType () {
9811023 return OriginalType .INTERVAL ;
9821024 }
@@ -1029,9 +1071,12 @@ private MapKeyValueTypeAnnotation() {
10291071 /**
10301072 * API Should be considered private
10311073 *
1074+ * Deprecated: Please use the LogicalTypeAnnotation itself
1075+ *
10321076 * @return the original type
10331077 */
10341078 @ Override
1079+ @ Deprecated
10351080 public OriginalType toOriginalType () {
10361081 return OriginalType .MAP_KEY_VALUE ;
10371082 }
0 commit comments