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

[I] [Bug] Multi-Catalog read Hive csv table result only one column [doris]

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

   ### 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
   
   2.0.3
   
   ### What's Wrong?
   
   When I read the CSV table through hms catalog, the result is only one column, and the other columns are all null values.
   
   
   
   
   ### What You Expected?
   
   The query columns is likely hive
   
   ### How to Reproduce?
   
   My hive version is Hive 2.1.1-cdh6.3.2
   Steps for bug occurrence
   
   **create hms catalog** 
   ```sql
   CREATE CATALOG hive PROPERTIES (
       'type'='hms',
       'hive.metastore.uris' = 'thrift://******:9083',
       'hive.metastore.sasl.enabled' = 'true',
       'hive.metastore.kerberos.principal' = 'hive/_HOST@******',
       'dfs.nameservices'='nameservice1',
       'dfs.ha.namenodes.nameservice1'='namenode63,namenode65',
       'dfs.namenode.rpc-address.nameservice1.namenode63'='cdh6-leader-01.**:8020',
       'dfs.namenode.rpc-address.nameservice1.namenode65'='cdh6-leader-02.**:8020',
       'dfs.client.failover.proxy.provider.nameservice1'='org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider',
       'hadoop.security.authentication' = 'kerberos',
       'hadoop.kerberos.keytab' = '/data/keytab/**.keytab',   
       'hadoop.kerberos.principal' = '**/**@**',
       'yarn.resourcemanager.principal' = 'yarn/_HOST@**' ,
       'file.meta.cache.ttl-second' = '60',
       'hive.version' = '2.1.1'
   );
   ```
   **user hive Beeline Cli create a one table and insert two line data:**
   ```sql
   create table employee_gz(name string,salary string)
   row format serde 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
   with serdeproperties 
   ('quoteChar'='\"'
   ,'seperatorChar'=',');
   
   insert into employee_gz values ('a', '1.1'), ('b', '2.2');
   +-------------------+---------------------+
   | employee_gz.name  | employee_gz.salary  |
   +-------------------+---------------------+
   | a                 | 1.1                 |
   | b                 | 2.2                 |
   +-------------------+---------------------+
   
   ```
   **where I read table by doris,I has a one column result**
   ```sql
   SELECT * FROM hive.test.employee_gz
   
    +-------------------+---------------------+
   | name  | salary  |
   +-------------------+---------------------+
   | "a","1.1"                 | null                 |
   | "b","2.2"                 | null                 |
   +-------------------+---------------------+
   ```
   ![image](https://github.com/apache/doris/assets/22388118/f8d8ea05-ee44-4341-a519-133afd675547)
   
   The query results I expect are as follows:
   
   ```text
   +-------------------+---------------------+
   | name  | salary  |
   +-------------------+---------------------+
   | a                 | 1.1                 |
   | b                 | 2.2                 |
   +-------------------+---------------------+
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] 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


Re: [I] [Bug] Multi-Catalog read Hive csv table result only one column [doris]

Posted by "LemonLiTree (via GitHub)" <gi...@apache.org>.
LemonLiTree commented on issue #29712:
URL: https://github.com/apache/doris/issues/29712#issuecomment-1882691360

   Have you tried refresh CATALOG?


-- 
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

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


Re: [I] [Bug] Multi-Catalog read Hive csv table result only one column [doris]

Posted by "xujunwei916 (via GitHub)" <gi...@apache.org>.
xujunwei916 commented on issue #29712:
URL: https://github.com/apache/doris/issues/29712#issuecomment-1882728901

   > Have you tried refresh CATALOG?
   
   YES, I Query Fisrt Refresh Use
   ```sql
   REFRESH DATABASE hive.test PROPERTIES("invalid_cache" = "true");
   ```


-- 
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

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