Skip to content
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

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

Merged
merged 2 commits into from
Feb 26, 2022

Conversation

qidaye
Copy link
Contributor

@qidaye qidaye commented Feb 21, 2022

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

<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.10.1</version>
</dependency>
Copy link
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
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
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
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
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
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);

@@ -17,8 +17,8 @@

package org.apache.doris.qe;

import avro.shaded.com.google.common.collect.Maps;
import avro.shaded.com.google.common.collect.Sets;
import com.google.common.collect.Maps;
Copy link
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
@morningman morningman added the dev/backlog waiting to be merged in future dev branch label Feb 25, 2022
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Feb 25, 2022
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@morningman morningman merged commit 87b96cf into apache:master Feb 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`
@morningman morningman 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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. area/iceberg dev/merged-1.0.1-deprecated PR has been merged into dev-1.0.1 reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Support query Iceberg table
2 participants