Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-4310

select query fails with struct datatype column from presto session

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.2.0
    • None
    • data-query
    • None
    • Presto 333

    Description

      query :-

      query from Spark session :

      drop table if exists test_rename;
      CREATE TABLE test_rename (str1 struct<a:int>, intfield int) STORED AS carbondata;
      insert into test_rename values(named_struct('a', 2),1);
      select str1 from test_rename;

      Query from Presto session :
      select str1.a from test_rename;

       

      error :-

      presto:ranjan> select str1.a from test_rename;

      Query 20211027_070655_00009_xmn8v, FAILED, 1 node
      Splits: 17 total, 0 done (0.00%)
      0:00 [0 rows, 0B] [0 rows/s, 0B/s]

      Query 20211027_070655_00009_xmn8v failed: str1#a column not found in the table test_rename

       log:

      java.lang.RuntimeException: str1#a column not found in the table test_renamejava.lang.RuntimeException: str1#a column not found in the table test_rename at org.apache.carbondata.core.scan.model.QueryModelBuilder.projectColumns(QueryModelBuilder.java:78) at org.apache.carbondata.hadoop.api.CarbonInputFormat.createQueryModel(CarbonInputFormat.java:745) at org.apache.carbondata.hadoop.api.CarbonInputFormat.createQueryModel(CarbonInputFormat.java:723) at org.apache.carbondata.presto.CarbondataPageSource.createQueryModel(CarbondataPageSource.java:406) at org.apache.carbondata.presto.CarbondataPageSource.createReaderForColumnar(CarbondataPageSource.java:356) at org.apache.carbondata.presto.CarbondataPageSource.initializeForColumnar(CarbondataPageSource.java:139) at org.apache.carbondata.presto.CarbondataPageSource.initialize(CarbondataPageSource.java:132) at org.apache.carbondata.presto.CarbondataPageSource.<init>(CarbondataPageSource.java:122) at org.apache.carbondata.presto.CarbondataPageSourceProvider.createPageSource(CarbondataPageSourceProvider.java:99) at io.prestosql.plugin.base.classloader.ClassLoaderSafeConnectorPageSourceProvider.createPageSource(ClassLoaderSafeConnectorPageSourceProvider.java:57) at io.prestosql.split.PageSourceManager.createPageSource(PageSourceManager.java:64) at io.prestosql.operator.TableScanOperator.getOutput(TableScanOperator.java:299) at io.prestosql.operator.Driver.processInternal(Driver.java:379) at io.prestosql.operator.Driver.lambda$processFor$8(Driver.java:283) at io.prestosql.operator.Driver.tryWithLock(Driver.java:675) at io.prestosql.operator.Driver.processFor(Driver.java:276) at io.prestosql.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:1075)

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            pwx944901 PRIYESH RANJAN
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: