Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
<profile>
<id>db-tests</id>
<dependencies>
<!-- Rely on core for tests of oracle
<dependency>
<groupId>com.salesforce.formula</groupId>
<artifactId>formula-engine-oracle-test</artifactId>
<version>${project.version}</version>
</dependency>
<!--
<dependency>
<groupId>com.salesforce.formula</groupId>
<artifactId>formula-engine-sqlserver-test</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public FormulaCommand getCommand(FormulaAST node, FormulaContext context) {

@Override
public SQLPair getSQL(FormulaAST node, FormulaContext context, String[] args, String[] guards, TableAliasRegistry registry) {
String guard = SQLPair.generateGuard(guards, args[0] + "<1");
String guard = SQLPair.generateGuard(guards, "(" + args[0] + "<1 OR " + args[0] + ">1114111)");
return new SQLPair(String.format(getSqlHooks(context).sqlChr(), args[0]), guard);
}

Expand Down
4 changes: 2 additions & 2 deletions impl/src/test/goldfiles/FormulaFields/v2/postgres/testChr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<JsOutput highPrec="true" nullAsNull="true">(context.record.customnumber__c&amp;&amp;context.record.customnumber__c.toNumber()&gt;0?String.fromCodePoint(Math.trunc(context.record.customnumber__c.toNumber())):null)</JsOutput>
<SqlOutput nullAsNull="false">
<Sql>CHR(TRUNC(COALESCE($!s0s!$.customnumber__c, 0))::integer)</Sql>
<Guard>COALESCE($!s0s!$.customnumber__c, 0)&lt;1</Guard>
<Guard>(COALESCE($!s0s!$.customnumber__c, 0)&lt;1 OR COALESCE($!s0s!$.customnumber__c, 0)&gt;1114111)</Guard>
</SqlOutput>
<SqlOutput nullAsNull="true">
<Sql>CHR(TRUNC($!s0s!$.customnumber__c)::integer)</Sql>
<Guard>$!s0s!$.customnumber__c&lt;1</Guard>
<Guard>($!s0s!$.customnumber__c&lt;1 OR $!s0s!$.customnumber__c&gt;1114111)</Guard>
</SqlOutput>
</testCase>
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,8 @@
<module>api</module>
<module>impl</module>
<module>test-utils</module>
<module>oracle-test</module>
<!-- Oracle tests run from within core -->
<!--<module>oracle-test</module>-->
<!-- <module>mysql-test</module> -->
<!-- MYSQL tests having issues in handling regular expressions, so excluding these tests from maven build process-->
<!-- These tests can be executed by using the "mysql" profile e.g. `mvn -P mysql clean verify -B` -->
Expand Down