zy-kkk opened a new pull request, #20566:
URL: https://github.com/apache/doris/pull/20566
## Proposed changes
Issue Number: close #xxx
This PR addresses the refactoring of common methods that were originally
located within the ODBC classes, but were used by the JDBC classes. These
methods have now been moved to the JDBC classes to improve code readability and
maintainability.
In addition, we have disabled the creation of ODBC external tables by
default. However, this will not affect the existing usage of ODBC. You can
still enable the ODBC external tables through the `enable_odbc_table` setting.
Please be aware that we plan to completely remove the ODBC external tables in
future versions, so we recommend using the JDBC Catalog as a priority.
Please note that these changes do not alter the existing behavior of the
application. They are intended to make the code more clean, efficient, and
manageable.
```
mysql> CREATE EXTERNAL TABLE `baseall_oracle` (
-> `k1` decimal(9, 3) NOT NULL COMMENT "",
-> `k2` char(10) NOT NULL COMMENT "",
-> `k3` datetime NOT NULL COMMENT "",
-> `k5` varchar(20) NOT NULL COMMENT "",
-> `k6` double NOT NULL COMMENT ""
-> ) ENGINE=ODBC
-> COMMENT "ODBC"
-> PROPERTIES (
-> "host" = "192.168.0.1",
-> "port" = "8086",
-> "user" = "test",
-> "password" = "test",
-> "database" = "test",
-> "table" = "baseall",
-> "driver" = "Oracle 19 ODBC driver",
-> "odbc_type" = "oracle"
-> );
ERROR 1105 (HY000): errCode = 2, detailMessage = Do not support odbc
external table, please set enable_odbc_table as true
mysql> CREATE EXTERNAL RESOURCE `oracle_odbc`
-> PROPERTIES (
-> "type" = "odbc_catalog",
-> "host" = "192.168.0.1",
-> "port" = "8086",
-> "user" = "test",
-> "password" = "test",
-> "database" = "test",
-> "odbc_type" = "oracle",
-> "driver" = "Oracle 19 ODBC driver"
-> );
ERROR 1105 (HY000): errCode = 2, detailMessage = Do not support odbc
external table, please set enable_odbc_table as true
```
## Further comments
If this is a relatively large or complex change, kick off the discussion at
[[email protected]](mailto:[email protected]) by explaining why you
chose the solution you did and what alternatives you considered, etc...
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]