You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "danhuawang (via GitHub)" <gi...@apache.org> on 2025/06/06 11:16:32 UTC
[I] [Bug report] Some tables loaded in postgre catalog but can't list in Trino [gravitino]
danhuawang opened a new issue, #7355:
URL: https://github.com/apache/gravitino/issues/7355
### Version
main branch
### Describe what's wrong
Some tables loaded in postgre catalog as following
<img width="338" alt="Image" src="https://github.com/user-attachments/assets/0e1dc42d-310e-4e4d-90f1-bbfa2cce13fd" />
But in Trino , I can't list these tables , and this break data preview process:
<img width="526" alt="Image" src="https://github.com/user-attachments/assets/1dd5bdfe-d41a-4a71-86c8-2d1fd848dd4c" />
### Error message and/or stacktrace
```
[
"java.lang.RuntimeException: java.sql.SQLException: Query failed (#20250605_201352_00061_d9xb2): line 1:15: Table '\"\"\"test.hadoop_pg\"\"\".public.delegation_tokens' does not exist",
"\tat com.datastrato.gravitino.preview.TrinoJdbcDataPreviewOperator.preview(TrinoJdbcDataPreviewOperator.java:86)",
"\tat com.datastrato.gravitino.catalog.DatastratoTableOperationDispatcher.preview(DatastratoTableOperationDispatcher.java:71)",
"\tat com.datastrato.gravitino.catalog.DatastratoTableHookDispatcher.preview(DatastratoTableHookDispatcher.java:34)",
"\tat com.datastrato.gravitino.catalog.DatastratoTableNormalizeDispatcher.preview(DatastratoTableNormalizeDispatcher.java:49)",
"\tat com.datastrato.gravitino.listener.DatastratoTableEventDispatcher.preview(DatastratoTableEventDispatcher.java:56)",
"\tat com.datastrato.gravitino.server.web.rest.DataPreviewOperations.lambda$previewTable$0(DataPreviewOperations.java:77)",
"\tat java.base/java.security.AccessController.doPrivileged(AccessController.java:712)",
"\tat java.base/javax.security.auth.Subject.doAs(Subject.java:439)",
"\tat org.apache.gravitino.utils.PrincipalUtils.doAs(PrincipalUtils.java:39)",
"\tat org.apache.gravitino.server.web.Utils.doAs(Utils.java:198)",
"\tat com.datastrato.gravitino.server.web.rest.DataPreviewOperations.previewTable(DataPreviewOperations.java:71)",
"\tat jdk.internal.reflect.GeneratedMethodAccessor144.invoke(Unknown Source)",
"\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
"\tat java.base/java.lang.reflect.Method.invoke(Method.java:568)",
"\tat org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)",
"\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:146)",
"\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:189)",
"\tat org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)",
"\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:93)",
"\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478)",
"\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400)",
"\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81)",
"\tat org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:256)",
"\tat org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)",
"\tat org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)",
"\tat org.glassfish.jersey.internal.Errors.process(Errors.java:292)",
"\tat org.glassfish.jersey.internal.Errors.process(Errors.java:274)",
"\tat org.glassfish.jersey.internal.Errors.process(Errors.java:244)",
"\tat org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)",
"\tat org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235)",
"\tat org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684)",
"\tat org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)",
"\tat org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)",
"\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:358)",
"\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:311)",
"\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)",
"\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)",
"\tat org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656)",
"\tat org.apache.gravitino.server.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:86)",
"\tat org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)",
"\tat org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)",
"\tat org.apache.gravitino.server.web.VersioningFilter.doFilter(VersioningFilter.java:111)",
"\tat org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)",
"\tat org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)",
"\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
"\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)",
"\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)",
"\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)",
"\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)",
"\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)",
"\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)",
"\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
"\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)",
"\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)",
"\tat org.eclipse.jetty.server.Server.handle(Server.java:516)",
"\tat org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)",
"\tat org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)",
"\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)",
"\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)",
"\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)",
"\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)",
"\tat org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)",
"\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)",
"\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)",
"\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)",
"\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)",
"\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)",
"\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)",
"\tat org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)",
"\tat java.base/java.lang.Thread.run(Thread.java:833)",
"Caused by: java.sql.SQLException: Query failed (#20250605_201352_00061_d9xb2): line 1:15: Table '\"\"\"test.hadoop_pg\"\"\".public.delegation_tokens' does not exist",
"\tat io.trino.jdbc.AbstractTrinoResultSet.resultsException(AbstractTrinoResultSet.java:1937)",
"\tat io.trino.jdbc.TrinoResultSet.getColumns(TrinoResultSet.java:318)",
"\tat io.trino.jdbc.TrinoResultSet.create(TrinoResultSet.java:61)",
"\tat io.trino.jdbc.TrinoStatement.internalExecute(TrinoStatement.java:262)",
"\tat io.trino.jdbc.TrinoStatement.execute(TrinoStatement.java:240)",
"\tat io.trino.jdbc.TrinoStatement.executeQuery(TrinoStatement.java:77)",
"\tat org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:318)",
"\tat org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:318)",
"\tat com.datastrato.gravitino.preview.TrinoJdbcDataPreviewOperator.preview(TrinoJdbcDataPreviewOperator.java:79)",
"\t... 75 more",
"Caused by: io.trino.spi.TrinoException: line 1:15: Table '\"\"\"test.hadoop_pg\"\"\".public.delegation_tokens' does not exist",
"\tat io.trino.sql.analyzer.SemanticExceptions.semanticException(SemanticExceptions.java:52)",
"\tat io.trino.sql.analyzer.SemanticExceptions.semanticException(SemanticExceptions.java:46)",
"\tat io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitTable(StatementAnalyzer.java:2289)",
"\tat io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitTable(StatementAnalyzer.java:521)",
"\tat io.trino.sql.tree.Table.accept(Table.java:60)",
"\tat io.trino.sql.tree.AstVisitor.process(AstVisitor.java:27)",
"\tat io.trino.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:540)",
"\tat io.trino.sql.analyzer.StatementAnalyzer$Visitor.analyzeFrom(StatementAnalyzer.java:4869)",
"\tat io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitQuerySpecification(StatementAnalyzer.java:3062)",
"\tat io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitQuerySpecification(StatementAnalyzer.java:521)",
"\tat io.trino.sql.tree.QuerySpecification.accept(QuerySpecification.java:155)",
"\tat io.trino.sql.tree.AstVisitor.process(AstVisitor.java:27)",
"\tat io.trino.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:540)",
"\tat io.trino.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:548)",
"\tat io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitQuery(StatementAnalyzer.java:1558)",
"\tat io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitQuery(StatementAnalyzer.java:521)",
"\tat io.trino.sql.tree.Query.accept(Query.java:118)",
"\tat io.trino.sql.tree.AstVisitor.process(AstVisitor.java:27)",
"\tat io.trino.sql.analyzer.StatementAnalyzer$Visitor.process(StatementAnalyzer.java:540)",
"\tat io.trino.sql.analyzer.StatementAnalyzer.analyze(StatementAnalyzer.java:500)",
"\tat io.trino.sql.analyzer.StatementAnalyzer.analyze(StatementAnalyzer.java:489)",
"\tat io.trino.sql.analyzer.Analyzer.analyze(Analyzer.java:97)",
"\tat io.trino.sql.analyzer.Analyzer.analyze(Analyzer.java:86)",
"\tat io.trino.execution.SqlQueryExecution.analyze(SqlQueryExecution.java:274)",
"\tat io.trino.execution.SqlQueryExecution.<init>(SqlQueryExecution.java:209)",
"\tat io.trino.execution.SqlQueryExecution$SqlQueryExecutionFactory.createQueryExecution(SqlQueryExecution.java:850)",
"\tat io.trino.dispatcher.LocalDispatchQueryFactory.lambda$createDispatchQuery$0(LocalDispatchQueryFactory.java:153)",
"\tat io.trino.$gen.Trino_435____20250605_110226_2.call(Unknown Source)",
"\tat com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)",
"\tat com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:76)",
"\tat com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)",
"\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)",
"\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)",
"\tat java.base/java.lang.Thread.run(Thread.java:1583)"
]
```
### How to reproduce
1. Load the a postgres (pg 11) catalog in Gravitino, table in pg database as following:
```
I have no name!@hadoop-postgresql-0:/$ psql -U hive -W hive -d metastore
psql: warning: extra command-line argument "hive" ignored
Password:
psql (11.10)
Type "help" for help.
metastore=> \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
metastore | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres +
| | | | | postgres=CTc/postgres+
| | | | | hive=CTc/postgres
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(4 rows)
metastore=> \c metastore;
Password:
You are now connected to database "metastore" as user "hive".
metastore=> \dt
public | BUCKETING_COLS | table | hive
public | CDS | table | hive
public | COLUMNS_V2 | table | hive
public | DATABASE_PARAMS | table | hive
public | DBS | table | hive
public | DB_PRIVS | table | hive
public | DELEGATION_TOKENS | table | hive
public | FUNCS | table | hive
public | FUNC_RU | table | hive
public | GLOBAL_PRIVS | table | hive
public | IDXS | table | hive
public | INDEX_PARAMS | table | hive
public | KEY_CONSTRAINTS | table | hive
public | MASTER_KEYS | table | hive
public | NOTIFICATION_LOG | table | hive
public | NOTIFICATION_SEQUENCE | table | hive
public | NUCLEUS_TABLES | table | hive
public | PARTITIONS | table | hive
public | PARTITION_EVENTS | table | hive
public | PARTITION_KEYS | table | hive
public | PARTITION_KEY_VALS | table | hive
public | PARTITION_PARAMS | table | hive
public | PART_COL_PRIVS | table | hive
public | PART_COL_STATS | table | hive
public | PART_PRIVS | table | hive
public | ROLES | table | hive
public | ROLE_MAP | table | hive
public | SDS | table | hive
public | SD_PARAMS | table | hive
public | SEQUENCE_TABLE | table | hive
public | SERDES | table | hive
public | SERDE_PARAMS | table | hive
public | SKEWED_COL_NAMES | table | hive
public | SKEWED_COL_VALUE_LOC_MAP | table | hive
public | SKEWED_STRING_LIST | table | hive
public | SKEWED_STRING_LIST_VALUES | table | hive
public | SKEWED_VALUES | table | hive
public | SORT_COLS | table | hive
public | TABLE_PARAMS | table | hive
public | TAB_COL_STATS | table | hive
public | TBLS | table | hive
public | TBL_COL_PRIVS | table | hive
public | TBL_PRIVS | table | hive
public | TYPES | table | hive
public | TYPE_FIELDS | table | hive
public | VERSION | table | hive
public | aux_table | table | hive
public | compaction_queue | table | hive
public | completed_compactions | table | hive
public | completed_txn_components | table | hive
public | hive_locks | table | hive
public | next_compaction_queue_id | table | hive
public | next_lock_id | table | hive
public | next_txn_id | table | hive
public | txn_components | table | hive
public | txns | table | hive
public | write_set | table | hive
metastore=>
```
2. Use Trino (trino gravitino connector) to check these tables
### Additional context
_No response_
--
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: commits-unsubscribe@gravitino.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug report] Some tables loaded in gravitino postgres catalog but can't show in Trino [gravitino]
Posted by "diqiu50 (via GitHub)" <gi...@apache.org>.
diqiu50 commented on issue #7355:
URL: https://github.com/apache/gravitino/issues/7355#issuecomment-3199510649
In PostgreSQL, table names with uppercase characters are not well supported in Trino. The Gravitino Trino connector does not support this scenario for now.
It is recommended to use lowercase table names.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug report] Some tables loaded in gravitino postgres catalog but can't show in Trino [gravitino]
Posted by "diqiu50 (via GitHub)" <gi...@apache.org>.
diqiu50 commented on issue #7355:
URL: https://github.com/apache/gravitino/issues/7355#issuecomment-3199594095
Because Trino converts database, table, and column names to lowercase, we can consider a unified approach later to support case-sensitive catalogs.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug report] Some tables loaded in gravitino postgres catalog but can't show in Trino [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on issue #7355:
URL: https://github.com/apache/gravitino/issues/7355#issuecomment-2955767528
I recall that this appears to be a case sensitivity issue in Trino.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug report] Some tables loaded in gravitino postgres catalog but can't show in Trino [gravitino]
Posted by "danhuawang (via GitHub)" <gi...@apache.org>.
danhuawang commented on issue #7355:
URL: https://github.com/apache/gravitino/issues/7355#issuecomment-2948931154
@diqiu50 Can you help check this issue?
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug report] Some tables loaded in gravitino postgres catalog but can't show in Trino [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao closed issue #7355: [Bug report] Some tables loaded in gravitino postgres catalog but can't show in Trino
URL: https://github.com/apache/gravitino/issues/7355
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org