[
https://issues.jboss.org/browse/TEIID-1705?page=com.atlassian.jira.plugin...
]
Mark Drilling commented on TEIID-1705:
--------------------------------------
I was looking at the cast and convert handling in the sqlStringVisitor which does similar
handling for null constant. We can look into changing expression builder as well to
create valid args - but currently it creates the function first with null args, then the
user defines the args.
Encountered NPE in SQLStringVisitor for TIMESTAMPADD and
TIMESTAMPDIFF
----------------------------------------------------------------------
Key: TEIID-1705
URL:
https://issues.jboss.org/browse/TEIID-1705
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.4
Reporter: Mark Drilling
Assignee: Steven Hawkins
Attachments: SQLStringVisitor-Patch.txt
I was using expression builder in Designer when I encountered this NPE.
java.lang.NullPointerException
at org.teiid.query.sql.visitor.SQLStringVisitor.visit(SQLStringVisitor.java:1280)
at org.teiid.query.sql.symbol.Function.acceptVisitor(Function.java:182)
at org.teiid.query.sql.visitor.SQLStringVisitor.getSQLString(SQLStringVisitor.java:164)
at
com.metamatrix.query.internal.ui.builder.util.LanguageObjectLabelProvider.getText(LanguageObjectLabelProvider.java:129)
I think the visit method for FUNCTION in SQLStringVisitor just needs to do a null check
on the first arg. I'm attaching a code patch.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira