Skip to content

[feature-wip](iceberg) Step3: Support query iceberg external table - #8179

Merged
morningman merged 2 commits into
apache:masterfrom
qidaye:iceberg_sp_3
Feb 26, 2022
Merged

[feature-wip](iceberg) Step3: Support query iceberg external table#8179
morningman merged 2 commits into
apache:masterfrom
qidaye:iceberg_sp_3

Conversation

@qidaye

Copy link
Copy Markdown
Contributor

Proposed changes

Issue Number: close#8178

Problem Summary:

  1. Add Iceberg scan node
  2. Add Iceberg/Hive table type in thrift
  3. Support querying Iceberg tables of format types parquet and orc

Checklist(Required)

  1. Does it affect the original behavior: (Yes/No/I Don't know)
  2. Has unit tests been added: (Yes/No/No Need)
  3. Has document been added or modified: (Yes/No/No Need)
  4. Does it need to update dependencies: (Yes/No)
  5. Are there any changes that cannot be rolled back: (Yes/No)

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...

Comment threadfe/fe-core/pom.xml
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.10.1</version>
</dependency>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add it to fe/pom.xml and reference it here.

IcebergCatalog icebergCatalog = IcebergCatalogMgr.getCatalog(icebergProperty);
try {
this.icebergTable = icebergCatalog.loadTable(TableIdentifier.of(icebergDb, icebergTbl));
LOG.info("finished to load table: {}", name);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LOG.info("finished to load table: {}", name);
LOG.info("finished to load iceberg table: {}", name);

this.icebergTable = icebergCatalog.loadTable(TableIdentifier.of(icebergDb, icebergTbl));
LOG.info("finished to load table: {}", name);
} catch (Exception e) {
LOG.warn("failed to load table {} from {}", name, icebergProperty.getHiveMetastoreUris(), e);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LOG.warn("failed to load table {} from {}", name, icebergProperty.getHiveMetastoreUris(), e);
LOG.warn("failed to load iceberg table {} from {}", name, icebergProperty.getHiveMetastoreUris(), e);

targetTable = icebergTable;
}

@Override

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a example in comment about the format for returned url

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And what if the iceberg is located on AWS S3 or other oss, instead of hdfs?

fileStatusesList.add(fileStatuses);
filesAdded += fileStatuses.size();
for (TBrokerFileStatus fstatus : fileStatuses) {
LOG.info("Add file status is {}", fstatus);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LOG.info("Add file status is {}", fstatus);
LOG.debug("Add file status is {}", fstatus);


import avro.shaded.com.google.common.collect.Maps;
import avro.shaded.com.google.common.collect.Sets;
import com.google.common.collect.Maps;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pay attention to import order

Change-Id: I2b7a4ae72df4e24e75d7151ab9644e6adc04d58d
@morningmanmorningman added the dev/backlog waiting to be merged in future dev branch label Feb 25, 2022

@morningmanmorningman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Feb 25, 2022
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@morningman
morningman merged commit 87b96cf into apache:masterFeb 26, 2022
@qidaye
qidaye deleted the iceberg_sp_3 branch February 28, 2022 02:18
morningman pushed a commit that referenced this pull request Mar 14, 2022
1. Add Iceberg scan node 2. Add Iceberg/Hive table type in thrift 3. Support querying Iceberg tables of format types `parquet` and `orc`
@morningmanmorningman added dev/merged-1.0.1-deprecated PR has been merged into dev-1.0.1 and removed dev/backlog waiting to be merged in future dev branch labels Mar 14, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.area/icebergdev/merged-1.0.1-deprecatedPR has been merged into dev-1.0.1reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Support query Iceberg table

2 participants

@qidaye@morningman