Null Point while expanding VDS

Hello, dremio is throwing an com.dremio.common.exceptions.UserException caused by a Null exception while expanding a view. The query works when I click to edit the VDS, but in the VDS its throwing an exception.

2022-10-10 15:33:11,372 [1cbbc4c8-7542-bf1a-f07e-33c9f7a11f00/0:foreman-planning] ERROR c.d.s.commandpool.CommandWrapper - command 1cbbc4c8-7542-bf1a-f07e-33c9f7a11f00/0:foreman-planning failed
com.dremio.common.exceptions.UserException: Error while expanding view vds_reports
        at com.dremio.common.exceptions.UserException$Builder.build(UserException.java:890)
        at com.dremio.exec.planner.sql.DremioToRelContext$2.expandView(DremioToRelContext.java:93)
        at com.dremio.exec.planner.logical.ViewTable.toRel(ViewTable.java:108)
        at com.dremio.exec.catalog.DremioPrepareTable.toRel(DremioPrepareTable.java:95)
        at com.dremio.exec.planner.sql.DremioSqlToRelConverter.toRel(DremioSqlToRelConverter.java:88)
        at org.apache.calcite.sql2rel.SqlToRelConverter.convertIdentifier(SqlToRelConverter.java:2435)
        at org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2057)
        at org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:1999)
        at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:662)
        at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:643)
        at org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:3300)
        at com.dremio.exec.planner.sql.DremioSqlToRelConverter.convertQueryRecursive(DremioSqlToRelConverter.java:120)
        at org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:579)
        at com.dremio.exec.planner.sql.SqlValidatorAndToRelContext.toConvertibleRelRoot(SqlValidatorAndToRelContext.java:137)
        at com.dremio.exec.planner.sql.SqlValidatorAndToRelContext.toConvertibleRelRoot(SqlValidatorAndToRelContext.java:118)
        at com.dremio.exec.planner.sql.handlers.PrelTransformer.toConvertibleRelRoot(PrelTransformer.java:956)
        at com.dremio.exec.planner.sql.handlers.PrelTransformer.convertToRelRoot(PrelTransformer.java:1050)
        at com.dremio.exec.planner.sql.handlers.PrelTransformer.convertToRel(PrelTransformer.java:1082)
        at com.dremio.exec.planner.sql.handlers.PrelTransformer.validateAndConvert(PrelTransformer.java:192)
        at com.dremio.exec.planner.sql.handlers.PrelTransformer.validateAndConvert(PrelTransformer.java:178)
        at com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan(NormalHandler.java:67)
        at com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan(HandlerToExec.java:59)
        at com.dremio.exec.work.foreman.AttemptManager.plan(AttemptManager.java:494)
        at com.dremio.exec.work.foreman.AttemptManager.lambda$run$4(AttemptManager.java:392)
        at com.dremio.service.commandpool.ReleasableBoundCommandPool.lambda$getWrappedCommand$3(ReleasableBoundCommandPool.java:138)
        at com.dremio.service.commandpool.CommandWrapper.run(CommandWrapper.java:62)
        at com.dremio.context.RequestContext.run(RequestContext.java:95)
        at com.dremio.common.concurrent.ContextMigratingExecutorService.lambda$decorate$3(ContextMigratingExecutorService.java:199)
        at com.dremio.common.concurrent.ContextMigratingExecutorService$ComparableRunnable.run(ContextMigratingExecutorService.java:180)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.NullPointerException: requires identity
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:907)
        at com.dremio.service.namespace.NamespaceServiceImpl$Factory.get(NamespaceServiceImpl.java:142)
        at com.dremio.exec.catalog.CatalogImpl.<init>(CatalogImpl.java:179)
        at com.dremio.exec.catalog.CatalogImpl.resolveCatalog(CatalogImpl.java:877)
        at com.dremio.exec.catalog.SourceAccessChecker.resolveCatalog(SourceAccessChecker.java:414)
        at com.dremio.exec.catalog.CachingCatalog.resolveCatalog(CachingCatalog.java:118)
        at com.dremio.exec.planner.sql.SqlValidatorAndToRelContext$Builder.withUser(SqlValidatorAndToRelContext.java:249)
        at com.dremio.exec.planner.sql.DremioSqlToRelConverter.getExpandedRelNode(DremioSqlToRelConverter.java:265)
        at com.dremio.exec.planner.sql.DremioSqlToRelConverter.expandView(DremioSqlToRelConverter.java:304)
        at com.dremio.exec.planner.sql.DremioToRelContext$2.expandView(DremioToRelContext.java:87)
        ... 32 common frames omitted

Hi @tramontini

I think the owner of the view might have been removed from the system. You can check the owner in sys.views. You can also try transferring ownership to another user Dremio I logged an internal bug to investigate.

1 Like