You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2021/03/04 14:23:48 UTC

[incubator-doris] branch master updated: [ODBC] Let the type conversion of the fail in query in ODBC of MySQL table to prompt the information of the column (#5422)

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 4e1b6b3  [ODBC] Let the type conversion of the fail in query in ODBC of MySQL table to prompt the information of the column (#5422)
4e1b6b3 is described below

commit 4e1b6b3eef51a26e5ac851ac469f2082e372ab16
Author: HappenLee <ha...@hotmail.com>
AuthorDate: Thu Mar 4 22:23:37 2021 +0800

    [ODBC] Let the type conversion of the fail in query in ODBC of MySQL table to prompt the information of the column (#5422)
    
    Let the type conversion of the fail in query in ODBC of MySQL table to prompt the information of the column
---
 be/src/exec/mysql_scan_node.cpp             | 2 +-
 be/src/exec/odbc_scan_node.cpp              | 2 +-
 docs/en/extending-doris/odbc-of-doris.md    | 4 ++--
 docs/zh-CN/extending-doris/odbc-of-doris.md | 6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/be/src/exec/mysql_scan_node.cpp b/be/src/exec/mysql_scan_node.cpp
index 9e3c39d..8288263 100644
--- a/be/src/exec/mysql_scan_node.cpp
+++ b/be/src/exec/mysql_scan_node.cpp
@@ -136,7 +136,7 @@ Status MysqlScanNode::write_text_slot(char* value, int value_length, SlotDescrip
     if (!_text_converter->write_slot(slot, _tuple, value, value_length, true, false,
                                      _tuple_pool.get())) {
         std::stringstream ss;
-        ss << "fail to convert mysql value '" << value << "' TO " << slot->type();
+        ss << "Fail to convert mysql value:'" << value << "' to " << slot->type() << " on column:`" << slot->col_name() + "`";
         return Status::InternalError(ss.str());
     }
 
diff --git a/be/src/exec/odbc_scan_node.cpp b/be/src/exec/odbc_scan_node.cpp
index 3e09a8f..7986e8a 100644
--- a/be/src/exec/odbc_scan_node.cpp
+++ b/be/src/exec/odbc_scan_node.cpp
@@ -115,7 +115,7 @@ Status OdbcScanNode::write_text_slot(char* value, int value_length, SlotDescript
     if (!_text_converter->write_slot(slot, _tuple, value, value_length, true, false,
                                      _tuple_pool.get())) {
         std::stringstream ss;
-        ss << "fail to convert odbc value '" << value << "' TO " << slot->type();
+		ss << "Fail to convert odbc value:'" << value << "' to " << slot->type() << " on column:`" << slot->col_name() + "`";
         return Status::InternalError(ss.str());
     }
 
diff --git a/docs/en/extending-doris/odbc-of-doris.md b/docs/en/extending-doris/odbc-of-doris.md
index 9680dab..c02ab79 100644
--- a/docs/en/extending-doris/odbc-of-doris.md
+++ b/docs/en/extending-doris/odbc-of-doris.md
@@ -238,9 +238,9 @@ Currently, Doris only adapts to MySQL and Oracle. The adaptation of other databa
 
    The driver for the corresponding data is not installed on each BE, or it is not installed in the be/conf/odbcinst.ini configure the correct path, or create the table with the driver namebe/conf/odbcinst.ini different
 
-7. Report Errors: `fail to convert odbc value 'PALO ' TO INT`
+7. Report Errors: `Fail to convert odbc value 'PALO ' TO INT on column:'A'`
 
-    Type conversion error, type mapping of column needs to be modified
+    Type conversion error, type of column `A` mapping of actual column type is different, needs to be modified
 
 8. BE crash occurs when using old MySQL table and ODBC external driver at the same time
 
diff --git a/docs/zh-CN/extending-doris/odbc-of-doris.md b/docs/zh-CN/extending-doris/odbc-of-doris.md
index 91374db..2e3480e 100644
--- a/docs/zh-CN/extending-doris/odbc-of-doris.md
+++ b/docs/zh-CN/extending-doris/odbc-of-doris.md
@@ -234,9 +234,9 @@ set enable_odbc_transcation = true;
 
     没有在每一个BE上安装好对应数据的Driver,或者是没有在be/conf/odbcinst.ini配置正确的路径,亦或是建表是Driver名与be/conf/odbcinst.ini不同
 
-7. 报错 `fail to convert odbc value 'PALO ' TO INT`
+7. 报错 `Fail to convert odbc value 'PALO ' TO INT on column:'A'`
 
-    类型转换出错,需要修改列的类型映射
+    ODBC外表的A列类型转换出错,说明外表的实际列与ODBC的映射列的数据类型不同,需要修改列的类型映射
     
 8. 同时使用旧的MySQL表与ODBC外表的Driver时出现程序Crash
 
@@ -249,4 +249,4 @@ set enable_odbc_transcation = true;
     
 10. 报错`driver connect Err: xxx`
 
-    通常是连接数据库失败,Err部分代表了不同的数据库连接失败的报错。这种情况通常是配置存在问题。可以检查是否错配了ip地址,端口或账号密码。
\ No newline at end of file
+    通常是连接数据库失败,Err部分代表了不同的数据库连接失败的报错。这种情况通常是配置存在问题。可以检查是否错配了ip地址,端口或账号密码。


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