Skip to content

Commit

Permalink
Revert "Add long and varchar enum types"
Browse files Browse the repository at this point in the history
This reverts commit 7ced455.
  • Loading branch information
Ying Su authored and caithagoras0 committed Sep 17, 2020
1 parent 748e69e commit 4ea4139
Show file tree
Hide file tree
Showing 14 changed files with 172 additions and 894 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@
package com.facebook.presto.client;

import com.facebook.airlift.json.ObjectMapperProvider;
import com.facebook.presto.common.type.LongEnumType.LongEnumMap;
import com.facebook.presto.common.type.NamedTypeSignature;
import com.facebook.presto.common.type.ParameterKind;
import com.facebook.presto.common.type.TypeSignatureParameter;
import com.facebook.presto.common.type.VarcharEnumType.VarcharEnumMap;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonParser;
Expand Down Expand Up @@ -55,12 +53,6 @@ public ClientTypeSignatureParameter(TypeSignatureParameter typeParameterSignatur
case NAMED_TYPE:
value = typeParameterSignature.getNamedTypeSignature();
break;
case LONG_ENUM:
value = typeParameterSignature.getLongEnumMap();
break;
case VARCHAR_ENUM:
value = typeParameterSignature.getVarcharEnumMap();
break;
default:
throw new UnsupportedOperationException(format("Unknown kind [%s]", kind));
}
Expand Down Expand Up @@ -161,12 +153,6 @@ public ClientTypeSignatureParameter deserialize(JsonParser jp, DeserializationCo
case LONG:
value = MAPPER.readValue(jsonValue, Long.class);
break;
case LONG_ENUM:
value = MAPPER.readValue(jsonValue, LongEnumMap.class);
break;
case VARCHAR_ENUM:
value = MAPPER.readValue(jsonValue, VarcharEnumMap.class);
break;
default:
throw new UnsupportedOperationException(format("Unsupported kind [%s]", kind));
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ public enum ParameterKind
TYPE(Optional.of("TYPE_SIGNATURE")),
NAMED_TYPE(Optional.of("NAMED_TYPE_SIGNATURE")),
LONG(Optional.of("LONG_LITERAL")),
VARIABLE(Optional.empty()),
LONG_ENUM(Optional.of("LONG_ENUM")),
VARCHAR_ENUM(Optional.of("VARCHAR_ENUM"));
VARIABLE(Optional.empty());

// TODO: drop special serialization code as soon as all clients
// migrate to version which can deserialize new format.
Expand Down
Loading

0 comments on commit 4ea4139

Please sign in to comment.