diff --git a/docs/coverage/pom.xml b/docs/coverage/pom.xml index 1587d35b..721ecf52 100644 --- a/docs/coverage/pom.xml +++ b/docs/coverage/pom.xml @@ -62,11 +62,6 @@ formula-engine-oracle-test ${project.version} - - com.salesforce.formula - formula-engine-mysql-test - ${project.version} - com.salesforce.formula formula-engine-sqlserver-test @@ -99,5 +94,15 @@ - - + + mysql-test + + + com.salesforce.formula + formula-engine-mysql-test + ${project.version} + + + + + \ No newline at end of file diff --git a/impl/src/main/java/com/force/formula/impl/WrongArgumentTypeException.java b/impl/src/main/java/com/force/formula/impl/WrongArgumentTypeException.java index 53d67b83..da57040f 100644 --- a/impl/src/main/java/com/force/formula/impl/WrongArgumentTypeException.java +++ b/impl/src/main/java/com/force/formula/impl/WrongArgumentTypeException.java @@ -20,9 +20,15 @@ public WrongArgumentTypeException(String function, Type[] expectedInputTypes, Fo super(createErrorMessage(function, expectedInputTypes, actual)); Token token = actual.getToken(); - location = token.getColumn(); - text = token.getText(); - type = token.getType(); + if(token != null) { + location = token.getColumn(); + text = token.getText(); + type = token.getType(); + } else { + location = 0; + text = ""; + type = 0; + } } private static String createErrorMessage(String function, Type[] expectedInputTypes, FormulaAST actual) { @@ -63,9 +69,15 @@ public WrongArgumentTypeException(String function, Type[] expectedInputTypes, Fo super(createErrorMessage(function, expectedInputTypes, columnType)); Token token = actual.getToken(); - location = token.getColumn(); - text = token.getText(); - type = token.getType(); + if(token != null) { + location = token.getColumn(); + text = token.getText(); + type = token.getType(); + } else { + location = 0; + text = ""; + type = 0; + } } private static String createErrorMessage(String function, Type[] expectedInputTypes, FormulaDataType columnType) { diff --git a/pom.xml b/pom.xml index faa4eda0..a05bd576 100644 --- a/pom.xml +++ b/pom.xml @@ -512,7 +512,9 @@ impl test-utils oracle-test - mysql-test + + + sqlserver-test sqlite-test @@ -536,6 +538,12 @@ google-test + + mysql + + mysql-test + +