josephperez3 opened a new pull request, #9415:
URL: https://github.com/apache/gravitino/pull/9415

   <!--
   1. Title: [#<issue>] <type>(<scope>): <subject>
      Examples:
        - "[#123] feat(operator): support xxx"
        - "[#233] fix: check null before access result in xxx"
        - "[MINOR] refactor: fix typo in variable name"
        - "[MINOR] docs: fix typo in README"
        - "[#255] test: fix flaky test NameOfTheTest"
      Reference: https://www.conventionalcommits.org/en/v1.0.0/
   2. If the PR is unfinished, please mark this PR as draft.
   -->
   
   ### What changes were proposed in this pull request?
   
   Added `getSystemTable()` override in `GravitinoMetadata` to delegate system 
table lookups to internal connector. This enables querying Iceberg metadata 
tables like `$snapshots` and `$manifests`, with trino connector.
   
   ### Why are the changes needed?
   
   For a bug fix - as of right now iceberg metadata tables are not queryable 
with the gravitino trino connector.
   
   Fix: #9414
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, users will now be able to query iceberg metatables.
   
   ### How was this patch tested?
   
   Without fix, unit test fails:
   ```
   TestGravitinoMetadataGetSystemTable > 
testGetSystemTableDelegatesToInternalMetadata() FAILED
       org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
           at 
app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
           at 
app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
           at 
app//org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
           at 
app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
           at 
app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:31)
           at 
app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:179)
           at 
app//org.apache.gravitino.trino.connector.TestGravitinoMetadataGetSystemTable.testGetSystemTableDelegatesToInternalMetadata(TestGravitinoMetadataGetSystemTable.java:58)
   ```
   
   Also, made a targz of the change with ```./gradlew assembleTrinoConnector 
``` and added trino deployment, then querying snapshots worked.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to