Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@W-17066806 add guard to CHR function #151

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dougdew64
Copy link
Collaborator

Added guard for CHR function so that inputs larger than 1114111 cause error.

Also, commented out some oracle tests, per our goal of focusing this repo on postgres.

@@ -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");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can make it safer.
"(" + args[0] + "<1 OR " + args[0] + ">1114111)"

@bairenlong-sfdc
Copy link
Collaborator

@dougdew64 Your commit is not signed!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants