Skip to content

Commit

Permalink
Fix function name for try expression
Browse files Browse the repository at this point in the history
  • Loading branch information
hellium01 authored and highker committed Aug 22, 2019
1 parent ef724d2 commit dc11cda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,12 @@ public boolean isSubscriptFunction(FunctionHandle functionHandle)

public FunctionHandle tryFunction(Type returnType)
{
return functionManager.lookupFunction("TRY", fromTypes(returnType));
return functionManager.lookupFunction("$internal$try", fromTypes(returnType));
}

public boolean isTryFunction(FunctionHandle functionHandle)
{
return functionManager.getFunctionMetadata(functionHandle).getName().equals("TRY");
return functionManager.getFunctionMetadata(functionHandle).getName().equals("$internal$try");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ protected RowExpression visitIfExpression(IfExpression node, Void context)
@Override
protected RowExpression visitTryExpression(TryExpression node, Void context)
{
return call("TRY", functionResolution.tryFunction(getType(node)), getType(node), process(node.getInnerExpression(), context));
throw new UnsupportedOperationException("Must desugar TryExpression before translate it into RowExpression");
}

@Override
Expand Down

0 comments on commit dc11cda

Please sign in to comment.