8 Replies Latest reply on Sep 23, 2014 5:34 AM by Joseph CHIDIAC

    Teiid Embedded, TIMESTAMPDIFF with MYSQL DataBase

    Joseph CHIDIAC Novice


      I'm using TeiidEmbedded Server with a MYSQL DataBase


      when i execute the following query :

                SELECT TIMESTAMPDIFF(SQL_TSI_MONTH, tborders.OrderDate, tborders.ShipDate)

                  FROM OrdersModel.Orders.tborders tborders

            LIMIT 10


      i got the following error :

      WARNING: TEIID30020 Processing exception for request or8iFEOILVPu.0 'TEIID30070

      The function 'TIMESTAMPDIFF(SQL_TSI_MONTH, tborders.OrderDate, tborders.ShipDate)' is a valid function form,

      but the arguments do not match a known type signature and cannot be converted using implicit type conversions.'.

      Originally QueryResolverException ResolverVisitor.java:606. Enable more detailed logging to see the entire stacktrace.


      When i debug the code, i found that the system found 2 functions with the same Name :

      Class      :: FunctionLibrary.java

      Function :: FunctionDescriptor[] determineNecessaryConversions(String name, Class<?> returnType, Expression[] args, Class<?>[] types, boolean hasUnknownType)


      1 - titimestampdiff(string interval, timestamp timestamp1, timestamp timestamp2) : long result

      2 - mysql.timestampdiff(string param1, timestamp param2, timestamp param3) : integer result


      and end of the function, the ambiguous variable equal a true and raise a GENERIC_EXCEPTION.