You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "xylaaaaa (via GitHub)" <gi...@apache.org> on 2026/04/24 05:59:45 UTC
[PR] [fix](fe) Preserve JDBC external column defaults [doris]
xylaaaaa opened a new pull request, #62781:
URL: https://github.com/apache/doris/pull/62781
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
JDBC external catalogs were dropping `COLUMN_DEF` when FE converted JDBC column metadata into Doris `Column` objects. As a result, external JDBC tables lost their default values in Doris metadata, and downstream tools such as Metabase could not read `database_default` for those columns.
### Release note
Preserve default values for JDBC external table columns in FE metadata.
### Check List (For Author)
- Test: FE unit test / Manual test
- Unit Test: `./run-fe-ut.sh --run org.apache.doris.datasource.jdbc.util.JdbcFieldSchemaTest`
- Unit Test: `./run-fe-ut.sh --run org.apache.doris.datasource.jdbc.client.JdbcMySQLClientTest`
- Manual test: `./build.sh --fe`
- Manual test: verified `SHOW FULL COLUMNS FROM doris_jdbc_catalog.regression_test_jdbc_catalog_p0.test_insert_order` returns defaults (`aid=0`, `pname=其他`)
- Manual test: verified fresh Metabase metadata now shows `database_default=0` for `aid` and `database_default=其他` for `pname`
- Behavior changed: Yes (external JDBC column defaults are now preserved in FE metadata)
- Does this need documentation: No
--
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: [PR] [fix](fe) Preserve JDBC external column defaults [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #62781:
URL: https://github.com/apache/doris/pull/62781#issuecomment-6330377091
We're closing this PR because it hasn't been updated in a while.
This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and feel free a maintainer to remove the Stale tag!
--
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: [PR] [fix](fe) Preserve JDBC external column defaults [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #62781:
URL: https://github.com/apache/doris/pull/62781#issuecomment-4312757006
# FE Regression Coverage Report
Increment line coverage ` 11.63% (5/43)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/62781_7090a222db66e9d00cbeddfff5ef33c604a0f6a1_merge_fe/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/62781_7090a222db66e9d00cbeddfff5ef33c604a0f6a1_merge_fe/report/index.html)
--
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: [PR] [fix](fe) Preserve JDBC external column defaults [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #62781:
URL: https://github.com/apache/doris/pull/62781#issuecomment-4311031349
Thank you for your contribution to Apache Doris.
Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR).
Please clearly describe your PR:
1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
3. What features were added. Why was this function added?
4. Which code was refactored and why was this part of the code refactored?
5. Which functions were optimized and what is the difference before and after the optimization?
--
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: [PR] [fix](fe) Preserve JDBC external column defaults [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #62781:
URL: https://github.com/apache/doris/pull/62781#issuecomment-4312351862
# FE UT Coverage Report
Increment line coverage ` 42.86% (3/7)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/62781_7090a222db66e9d00cbeddfff5ef33c604a0f6a1/fe_increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/62781_7090a222db66e9d00cbeddfff5ef33c604a0f6a1/fe_report/index.html)
--
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: [PR] [fix](fe) Preserve JDBC external column defaults [doris]
Posted by "xylaaaaa (via GitHub)" <gi...@apache.org>.
xylaaaaa commented on PR #62781:
URL: https://github.com/apache/doris/pull/62781#issuecomment-4311782992
run buildall
--
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: [PR] [fix](fe) Preserve JDBC external column defaults [doris]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #62781:
URL: https://github.com/apache/doris/pull/62781#discussion_r3135774453
##########
fe/fe-core/src/test/java/org/apache/doris/datasource/jdbc/client/JdbcMySQLClientTest.java:
##########
@@ -0,0 +1,76 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.datasource.jdbc.client;
+
+import org.apache.doris.catalog.PrimitiveType;
+import org.apache.doris.catalog.Type;
+import org.apache.doris.datasource.jdbc.util.JdbcFieldSchema;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.objenesis.ObjenesisStd;
+
+import java.lang.reflect.Field;
+import java.util.Optional;
Review Comment:
The import block has a blank line splitting third-party imports (org.apache.doris.* vs org.junit/org.mockito/org.objenesis). FE checkstyle's CustomImportOrder groups all non-java imports together, so this separation is likely to fail checkstyle. Please remove the extra blank line and keep all third-party imports in a single group (then a blank line before java.*).
##########
thirdparty/vars.sh:
##########
@@ -48,6 +48,7 @@ export TP_JAR_DIR="${TP_INSTALL_DIR}/lib/jar"
# source of all dependencies, default unuse it
# export REPOSITORY_URL=
+DORIS_THIRDPARTY_REPOSITORY_URL="${DORIS_THIRDPARTY_REPOSITORY_URL:-https://doris-regression-hk.oss-cn-hongkong.aliyuncs.com/regression/datalake/thirdparty/juicefs}"
Review Comment:
This PR is described as fixing FE JDBC external column defaults, but this hunk introduces a new JuiceFS third-party mirror URL configuration (and related download fallback support elsewhere in the PR). Please either update the PR title/description to cover these additional changes or split the JuiceFS/thirdparty download changes into a separate PR so the review and release notes stay accurate.
##########
thirdparty/vars.sh:
##########
@@ -48,6 +48,7 @@ export TP_JAR_DIR="${TP_INSTALL_DIR}/lib/jar"
# source of all dependencies, default unuse it
# export REPOSITORY_URL=
+DORIS_THIRDPARTY_REPOSITORY_URL="${DORIS_THIRDPARTY_REPOSITORY_URL:-https://doris-regression-hk.oss-cn-hongkong.aliyuncs.com/regression/datalake/thirdparty/juicefs}"
Review Comment:
`DORIS_THIRDPARTY_REPOSITORY_URL` is named like a global thirdparty mirror, but its default value is JuiceFS-specific and it's only used to build `JUICEFS_DOWNLOAD`. This is easy to misconfigure/confuse (especially since docker scripts use `JUICEFS_THIRDPARTY_REPOSITORY_URL`). Consider renaming this variable to something JuiceFS-specific (or reusing `REPOSITORY_URL`) to make the scope clear and keep env var naming consistent across scripts.
--
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