@ -207,7 +207,7 @@ public enum ExpressionFunctions {
|
||||
Method method, FEFunction annotation) {
|
||||
if (annotation != null) {
|
||||
String name = annotation.name();
|
||||
Type returnType = Type.fromPrimitiveType(PrimitiveType.valueOf(annotation.returnType()));
|
||||
Type returnType = Type.fromPrimitiveType(PrimitiveType.valueOf(annotation.returnType().toUpperCase()));
|
||||
List<Type> argTypes = new ArrayList<>();
|
||||
for (String type : annotation.argTypes()) {
|
||||
argTypes.add(ScalarType.createType(type));
|
||||
|
||||
@ -192,7 +192,7 @@ public abstract class ColumnType {
|
||||
}
|
||||
|
||||
public static Type read(DataInput in) throws IOException {
|
||||
PrimitiveType primitiveType = PrimitiveType.valueOf(Text.readString(in));
|
||||
PrimitiveType primitiveType = PrimitiveType.valueOf(Text.readString(in).toUpperCase());
|
||||
if (primitiveType == PrimitiveType.ARRAY) {
|
||||
Type itermType = read(in);
|
||||
boolean containsNull = in.readBoolean();
|
||||
|
||||
@ -396,11 +396,11 @@ public class PartitionKey implements Comparable<PartitionKey>, Writable {
|
||||
public void readFields(DataInput in) throws IOException {
|
||||
int count = in.readInt();
|
||||
for (int i = 0; i < count; i++) {
|
||||
PrimitiveType type = PrimitiveType.valueOf(Text.readString(in));
|
||||
PrimitiveType type = PrimitiveType.valueOf(Text.readString(in).toUpperCase());
|
||||
boolean isMax = in.readBoolean();
|
||||
if (type == PrimitiveType.NULL_TYPE) {
|
||||
String realType = StringLiteral.read(in).getStringValue();
|
||||
type = PrimitiveType.valueOf(realType);
|
||||
type = PrimitiveType.valueOf(realType.toUpperCase());
|
||||
types.add(type);
|
||||
keys.add(NullLiteral.create(Type.fromPrimitiveType(type)));
|
||||
continue;
|
||||
|
||||
@ -115,7 +115,7 @@ public class Histogram {
|
||||
|
||||
JsonObject histogramJson = JsonParser.parseString(json).getAsJsonObject();
|
||||
String typeStr = histogramJson.get("data_type").getAsString();
|
||||
Type dataType = Type.fromPrimitiveType(PrimitiveType.valueOf(typeStr));
|
||||
Type dataType = Type.fromPrimitiveType(PrimitiveType.valueOf(typeStr.toUpperCase()));
|
||||
histogramBuilder.setDataType(dataType);
|
||||
|
||||
float sampleRate = histogramJson.get("sample_rate").getAsFloat();
|
||||
|
||||
Reference in New Issue
Block a user