-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[ODBC SCAN NODE] 4/4 Add ODBC_SCAN_NODE and Odbc_Scanner in BE and add ODBC_SCAN_NODE docs #4438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…d odbc external table doc.
be/src/exec/odbc_scan_node.cpp
Outdated
| } | ||
|
|
||
| // Before we fix the problem utf8 encode sql query in SQLexecDirect | ||
| // we need to check some filter can not encode in asii code, like chinese |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asii --> ascii
be/src/exec/odbc_scan_node.cpp
Outdated
| } | ||
|
|
||
| _tuple = reinterpret_cast<Tuple*>(tuple_buffer); | ||
| // Indicates whether there are more rows to process. Set in _hbase_scanner.next(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_hbase_scanner?
be/src/exec/odbc_scanner.cpp
Outdated
|
|
||
| LOG(INFO) << "execute success:" << query << " column count:" << _field_num; | ||
|
|
||
| // check materialize num equeal _field_num |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
equeal -> equal
| return Status::InternalError(msg.str()); | ||
| } | ||
|
|
||
| std::string ODBCScanner::handle_diagnostic_record(SQLHANDLE hHandle, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add some comments
| | DOUBLE | DOUBLE | | | ||
| | DATE | DATE | | | ||
| | DECIMAL | DECIMAL | | | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hll data type?
datetime data type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mysql now do not support hll, i will add datetime type in doc
|
|
||
| 4. 通过Oracle访问出现乱码 | ||
|
|
||
| 尝试在BE启动脚本之中添加如下参数:`export NLS_LANG=AMERICAN_AMERICA.AL32UTF8`, 并重新启动所有BE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个参数如果直接放到be的启动脚本里会有啥影响?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不会有什么影响,但是原则上不使用oracle数据库的话是用不到这个环境变量的
be/src/exec/odbc_scanner.cpp
Outdated
| ODBC_DISPOSE(_dbc, SQL_HANDLE_DBC, SQLDriverConnect(_dbc, NULL, (SQLCHAR*)_connect_string.c_str(), SQL_NTS, | ||
| NULL, 0, NULL, SQL_DRIVER_COMPLETE_REQUIRED), "driver connect"); | ||
|
|
||
| LOG(INFO) << "connect success:"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add more detail informaton in log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
be/src/exec/odbc_scan_node.h
Outdated
| // converting text data in MySQL cells to binary data. | ||
| virtual Status get_next(RuntimeState* state, RowBatch* row_batch, bool* eos); | ||
|
|
||
| // Close the _mysql_scanner, and report errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modify the comment
be/src/exec/odbc_scanner.cpp
Outdated
| // Now we only treat HLL, CHAR, VARCHAR as big column | ||
| static constexpr uint32_t BIG_COLUMN_SIZE_BUFFER = 65535; | ||
|
|
||
| static std::u16string utf8_to_wstring (const std::string& str) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| static std::u16string utf8_to_wstring (const std::string& str) | |
| static std::u16string utf8_to_wstring(const std::string& str) |
| #### 2. 通过ODBC_Resource来创建ODBC外表 (推荐使用的方式) | ||
| ``` | ||
| create external resource "oracle_odbc" | ||
| properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent
morningman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…d ODBC_SCAN_NODE docs (apache#4438)
#4376 issue
Proposed changes
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
Types of changes
What types of changes does your code introduce to Doris?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.