提交 686895b1 authored 作者: Noel Grandin's avatar Noel Grandin

rename dataType to returnDataType

to make it more obvious
上级 45c24f18
...@@ -498,13 +498,13 @@ public class Function extends Expression implements FunctionCall { ...@@ -498,13 +498,13 @@ public class Function extends Expression implements FunctionCall {
} }
private static void addFunction(String name, int type, int parameterCount, private static void addFunction(String name, int type, int parameterCount,
int dataType, boolean nullIfParameterIsNull, boolean deterministic, int returnDataType, boolean nullIfParameterIsNull, boolean deterministic,
boolean bufferResultSetToLocalTemp) { boolean bufferResultSetToLocalTemp) {
FunctionInfo info = new FunctionInfo(); FunctionInfo info = new FunctionInfo();
info.name = name; info.name = name;
info.type = type; info.type = type;
info.parameterCount = parameterCount; info.parameterCount = parameterCount;
info.dataType = dataType; info.returnDataType = returnDataType;
info.nullIfParameterIsNull = nullIfParameterIsNull; info.nullIfParameterIsNull = nullIfParameterIsNull;
info.deterministic = deterministic; info.deterministic = deterministic;
info.bufferResultSetToLocalTemp = bufferResultSetToLocalTemp; info.bufferResultSetToLocalTemp = bufferResultSetToLocalTemp;
...@@ -512,18 +512,18 @@ public class Function extends Expression implements FunctionCall { ...@@ -512,18 +512,18 @@ public class Function extends Expression implements FunctionCall {
} }
private static void addFunctionNotDeterministic(String name, int type, private static void addFunctionNotDeterministic(String name, int type,
int parameterCount, int dataType) { int parameterCount, int returnDataType) {
addFunction(name, type, parameterCount, dataType, true, false, true); addFunction(name, type, parameterCount, returnDataType, true, false, true);
} }
private static void addFunction(String name, int type, int parameterCount, private static void addFunction(String name, int type, int parameterCount,
int dataType) { int returnDataType) {
addFunction(name, type, parameterCount, dataType, true, true, true); addFunction(name, type, parameterCount, returnDataType, true, true, true);
} }
private static void addFunctionWithNull(String name, int type, private static void addFunctionWithNull(String name, int type,
int parameterCount, int dataType) { int parameterCount, int returnDataType) {
addFunction(name, type, parameterCount, dataType, false, true, true); addFunction(name, type, parameterCount, returnDataType, false, true, true);
} }
/** /**
...@@ -2470,7 +2470,7 @@ public class Function extends Expression implements FunctionCall { ...@@ -2470,7 +2470,7 @@ public class Function extends Expression implements FunctionCall {
} }
case SUBSTRING: case SUBSTRING:
case SUBSTR: { case SUBSTR: {
t = info.dataType; t = info.returnDataType;
p = args[0].getPrecision(); p = args[0].getPrecision();
s = 0; s = 0;
if (args[1].isConstant()) { if (args[1].isConstant()) {
...@@ -2487,7 +2487,7 @@ public class Function extends Expression implements FunctionCall { ...@@ -2487,7 +2487,7 @@ public class Function extends Expression implements FunctionCall {
break; break;
} }
default: default:
t = info.dataType; t = info.returnDataType;
DataType type = DataType.getDataType(t); DataType type = DataType.getDataType(t);
p = PRECISION_UNKNOWN; p = PRECISION_UNKNOWN;
d = 0; d = 0;
......
...@@ -23,7 +23,7 @@ class FunctionInfo { ...@@ -23,7 +23,7 @@ class FunctionInfo {
/** /**
* The data type of the return value. * The data type of the return value.
*/ */
int dataType; int returnDataType;
/** /**
* The number of parameters. * The number of parameters.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论