You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/01/10 12:21:37 UTC

[GitHub] [incubator-doris] EmmyMiao87 opened a new pull request #2730: Ignore the null type when getCmpType

EmmyMiao87 opened a new pull request #2730: Ignore the null type when getCmpType
URL: https://github.com/apache/incubator-doris/pull/2730
 
 
   In previous versions, if the children of the IN predicate included NULL, all child types would be converted to DOUBLE for calculation.
   For example:
   select * from t1 where k1 in ('TABLE', NULL);
   But children like varchar cannot be converted to double, so the query cannot be executed.
   The error is "TABLE is not a number"
   
   The current version, if null exists in the child, it will not enter the calculation of compatibility type.
   For the above query, the compatibility type is varchar, so the 'TABLE' is not converted to double, and the query could be executed.
   
   Also, for JDBC. It will convert 'show tables;' to :
   ```
   SELECT
   TABLE_SCHEMA AS TABLE_CAT, NULL AS TABLE_SCHEM, TABLE_NAME,
    CASE WHEN TABLE_TYPE='BASE TABLE'
    THEN CASE WHEN TABLE_SCHEMA = 'mysql' OR TABLE_SCHEMA = 'performance_schema'
    THEN 'SYSTEM TABLE' ELSE 'TABLE'END WHEN TABLE_TYPE='TEMPORARY'
    THEN 'LOCAL_TEMPORARY' ELSE TABLE_TYPE END AS TABLE_TYPE, TABLE_COMMENT AS REMARKS, NULL AS TYPE_CAT, NULL AS TYPE_SCHEM, NULL AS TYPE_NAME, NULL AS SELF_REFERENCING_COL_NAME, NULL AS REF_GENERATION
    FROM INFORMATION_SCHEMA.TABLES
    WHERE TABLE_SCHEMA LIKE 'test_db'
    AND TABLE_NAME LIKE '%'
    HAVING TABLE_TYPE IN ('TABLE','VIEW',null,null,null)
    ORDER BY TABLE_TYPE, TABLE_SCHEMA, TABLE_NAME
   ```
   In previous version, Doris could not return the correct tables to JDBC. It will thrown the error "'TABLE' is not a number".
   After this commit, #2729 is fixed. Doris could return the tables schema by JDBC.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] imay merged pull request #2730: Ignore the null type when getCmpType

Posted by GitBox <gi...@apache.org>.
imay merged pull request #2730: Ignore the null type when getCmpType
URL: https://github.com/apache/incubator-doris/pull/2730
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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