-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Support Glue catalog in Iceberg connector #10845
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
Changes from all commits
dc6bc05
ae1e4bc
118dfa0
08887f5
7678da0
e85fe98
516c0a2
fb7124f
30ab6ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -459,6 +459,15 @@ jobs: | |
| if: matrix.modules == 'plugin/trino-bigquery' && env.BIGQUERY_CASE_INSENSITIVE_CREDENTIALS_KEY != '' | ||
| run: | | ||
| $MAVEN test ${MAVEN_TEST} -pl :trino-bigquery -Pcloud-tests-case-insensitive-mapping -Dbigquery.credentials-key="${BIGQUERY_CASE_INSENSITIVE_CREDENTIALS_KEY}" | ||
| - name: Iceberg Glue Catalog Tests | ||
| env: | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESSKEY }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRETKEY }} | ||
| AWS_REGION: us-east-2 | ||
| S3_BUCKET: presto-ci-test | ||
| if: contains(matrix.modules, 'plugin/trino-iceberg') && (env.AWS_ACCESS_KEY_ID != '' || env.AWS_SECRET_ACCESS_KEY != '') | ||
| run: | | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: no need for
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| $MAVEN test ${MAVEN_TEST} -pl :trino-iceberg -P test-glue-catalog -Ds3.bucket=${S3_BUCKET} | ||
| - name: Sanitize artifact name | ||
| if: always() | ||
| run: | | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -587,6 +587,7 @@ public void invalidateTable(String databaseName, String tableName) | |
| .filter(userTableKey -> userTableKey.matches(databaseName, tableName)) | ||
| .forEach(tablePrivilegesCache::invalidate); | ||
| invalidateTableStatisticsCache(databaseName, tableName); | ||
| invalidateTablesWithParameterCache(databaseName, tableName); | ||
| invalidatePartitionCache(databaseName, tableName); | ||
| } | ||
|
|
||
|
|
@@ -604,6 +605,17 @@ private void invalidateTableStatisticsCache(String databaseName, String tableNam | |
| .forEach(tableCache::invalidate); | ||
| } | ||
|
|
||
| private void invalidateTablesWithParameterCache(String databaseName, String tableName) | ||
| { | ||
| tablesWithParameterCache.asMap().keySet().stream() | ||
| .filter(cacheKey -> cacheKey.getDatabaseName().equals(databaseName)) | ||
| .filter(cacheKey -> { | ||
| List<String> cacheValue = tablesWithParameterCache.getIfPresent(cacheKey); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we implement
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| return cacheValue != null && cacheValue.contains(tableName); | ||
| }) | ||
| .forEach(tablesWithParameterCache::invalidate); | ||
| } | ||
|
|
||
| private Partition getExistingPartition(Table table, List<String> partitionValues) | ||
| { | ||
| return getPartition(table, partitionValues) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,7 @@ | |
| import io.trino.plugin.hive.HiveApplyProjectionUtil; | ||
| import io.trino.plugin.hive.HiveApplyProjectionUtil.ProjectedColumnRepresentation; | ||
| import io.trino.plugin.hive.HiveWrittenPartitions; | ||
| import io.trino.plugin.iceberg.catalog.TrinoCatalog; | ||
| import io.trino.plugin.iceberg.procedure.IcebergOptimizeHandle; | ||
| import io.trino.plugin.iceberg.procedure.IcebergTableExecuteHandle; | ||
| import io.trino.plugin.iceberg.procedure.IcebergTableProcedureId; | ||
|
|
@@ -141,9 +142,9 @@ | |
| import static io.trino.plugin.iceberg.PartitionFields.parsePartitionFields; | ||
| import static io.trino.plugin.iceberg.PartitionFields.toPartitionFields; | ||
| import static io.trino.plugin.iceberg.TableType.DATA; | ||
| import static io.trino.plugin.iceberg.TrinoHiveCatalog.DEPENDS_ON_TABLES; | ||
| import static io.trino.plugin.iceberg.TypeConverter.toIcebergType; | ||
| import static io.trino.plugin.iceberg.TypeConverter.toTrinoType; | ||
| import static io.trino.plugin.iceberg.catalog.hms.TrinoHiveCatalog.DEPENDS_ON_TABLES; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TrinoHiveCatalog is not HMS-specific, so should not be in hms package.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you have a better name for the package that has the HMS and File Hive Metastore classes?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe just put it in |
||
| import static io.trino.plugin.iceberg.procedure.IcebergTableProcedureId.OPTIMIZE; | ||
| import static io.trino.spi.StandardErrorCode.NOT_SUPPORTED; | ||
| import static io.trino.spi.connector.RetryMode.NO_RETRIES; | ||
|
|
||
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.
@nineinchnick can you take a look at this? This step didn't run on the CI where I was expecting it to
https://github.com/trinodb/trino/runs/5423189712?check_suite_focus=true
Uh oh!
There was an error while loading. Please reload this page.
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.
Ah, I think I see it.
env.AWS_ACCESSKEYshould beenv.AWS_ACCESS_KEY_ID. Same for secret key