You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "tengdazheng (via GitHub)" <gi...@apache.org> on 2023/06/09 06:27:36 UTC

[GitHub] [doris] tengdazheng opened a new issue, #20636: [Bug] Query with java jdbcTemplate ERROR : PreparedStatementCallback; uncategorized SQLException for SQL [select * from sdb.dim_cwkb_xbb_fmdm_full_monthly where QYDM=? AND YF=?]; SQL state [HY000]; error code [1105]; errCode = 2, detailMessage = Incorrect datetime value: '9133010572XXXXXX' in expression: `QYDM` = '9133010572XXXXXX'

tengdazheng opened a new issue, #20636:
URL: https://github.com/apache/doris/issues/20636

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   1.2.4.1 (Stable)
   
   ### What's Wrong?
   
   Using Spring jdbcTemplate query data in doris with this kind of function:
   
   for example:
   org.springframework.jdbc.core.JdbcTemplate
   public Map<String, Object> queryForMap(String sql, Object[] args, int[] argTypes) throws DataAccessException;
   
   with parameter : int[] argTypes 
   
    * @param argTypes the SQL types of the arguments
    *  * (constants from {@code java.sql.Types})
   
   doris may not recognize.
   
   When i  use argTypes = {12}, for  java.sql.Types represent for varchar, the error message like:
   
   org.springframework.jdbc.UncategorizedSQLException
   ERROR : PreparedStatementCallback; uncategorized SQLException for SQL [select * from sdb.dim_cwkb_xbb_fmdm_full_monthly where QYDM=? ]; SQL state [HY000]; error code [1105]; errCode = 2, detailMessage = Incorrect datetime value: '9133010572XXXXXX' in expression: `QYDM` = '9133010572XXXXXX'
   
   
   ### What You Expected?
   
   Can use Spring jdbcTemplate query data in doris.
   
   
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org