-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[feature-wip](iceberg) Step1: Support create Iceberg external table #7391
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
fe/fe-core/src/main/java/org/apache/doris/analysis/CreateDbStmt.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/catalog/IcebergDatabase.java
Outdated
Show resolved
Hide resolved
| if (db.getDbProperties().getIcebergProperty().isExist()) { | ||
| IcebergProperty icebergProperty = db.getDbProperties().getIcebergProperty(); | ||
| IcebergCatalog icebergCatalog = IcebergCatalogMgr.getCatalog(icebergProperty); | ||
| List<TableIdentifier> icebergTables = icebergCatalog.listTables(icebergProperty.getDatabase()); |
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.
What if the listTables throw exception?
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.
not resolved?
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.
Added a new DorisIcebergException which is a RuntimeException in IcebergCatalog.listTable.
fe/fe-core/src/main/java/org/apache/doris/external/iceberg/IcebergTableCreationRecordMgr.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/external/iceberg/IcebergTableCreationRecordMgr.java
Show resolved
Hide resolved
| if (db.getDbProperties().getIcebergProperty().isExist()) { | ||
| IcebergProperty icebergProperty = db.getDbProperties().getIcebergProperty(); | ||
| IcebergCatalog icebergCatalog = IcebergCatalogMgr.getCatalog(icebergProperty); | ||
| List<TableIdentifier> icebergTables = icebergCatalog.listTables(icebergProperty.getDatabase()); |
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.
not resolved?
fe/fe-core/src/main/java/org/apache/doris/external/iceberg/IcebergTableCreationRecordMgr.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/external/iceberg/IcebergTableCreationRecordMgr.java
Outdated
Show resolved
Hide resolved
docs/zh-CN/sql-reference/sql-statements/Data Manipulation/SHOW TABLE CREATION.md
Show resolved
Hide resolved
| Database db = new Database(id, fullDbName); | ||
| db.setClusterName(clusterName); | ||
| // check and analyze database properties before create database | ||
| db.getDbProperties().putAll(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.
merge these 2 methods:
db.getDbProperties().putAll(properties);
db.getDbProperties().checkAndBuildProperties();
to
db.addAndBuildProperties(properties);
Change-Id: I42882d37bbb6f78bf06273bcd07f47d0802ca65c
Change-Id: I8df2943f3043d0a0abcc298297e14a4bd88a3904
Change-Id: I9735de2849fd1c802b727ec8fc9c1016049dfb40
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
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
…t instead of admin (#7914) * [improvement](show) Support that user can use show data skew statement instead of admin This PR mainly do two things: 1. Support that user can use show data skew statement instead of admin 2. Fix fe ut failed caused by pr [improvement](rewrite) Make RewriteDateLiteralRule to be compatible with mysql #7876 and pr [feature-wip](iceberg) Step1: Support create Iceberg external table #7391 Co-authored-by: caiconghui1 <caiconghui1@jd.com>
Proposed changes
Close related #7389
Support create Iceberg external table in Doris.
This is the first step to support Iceberg external table.
Create Iceberg external table
This pr describes two ways to create Iceberg external tables. Both ways do not require explicitly specifying column definitions, Doris automatically converts them based on Iceberg's column definitions.
CREATE [EXTERNAL] TABLE table_name ENGINE = ICEBERG [COMMENT "comment"] PROPERTIES ( "iceberg.database" = "iceberg_db_name", "iceberg.table" = "icberg_table_name", "iceberg.hive.metastore.uris" = "thrift://192.168.0.1:9083", "iceberg.catalog.type" = "HIVE_CATALOG" );Show table creation
help show create table.help show table creation.This is a new syntax.
Show table creation records in Iceberg database:
Syntax:
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.Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...