Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-50322

Cannot resolve parameterized identifier in a sub-query

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0
    • SQL

    Description

      The example below portraits the issue:

      Unable to find source-code formatter for language: sq. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      create table tt1(c1 int);
      insert into tt1 values (1);
      execute immediate 'with v1 as (select * from tt1 where 1 = (Select * from identifier(:tab))) select * from v1' using 'tt1' as tab;
      [UNBOUND_SQL_PARAMETER] Found the unbound parameter: tab. Please, fix `args` and provide a mapping of the parameter to either a SQL literal or collection constructor functions such as `map()`, `array()`, `struct()`. SQLSTATE: 42P02; line 1 pos 66;
      'Project [*]
      +- 'SubqueryAlias v1
         +- 'SubqueryAlias v1
            +- 'Project [*]
               +- 'Filter (1 = scalar-subquery#10 [])
                  :  +- 'Project [*]
                  :     +- 'PlanWithUnresolvedIdentifier namedparameter(tab), org.apache.spark.sql.catalyst.parser.AstBuilder$$Lambda$3404/0x000000f802380000@45ec7633
                  +- SubqueryAlias spark_catalog.default.tt1
                     +- Relation spark_catalog.default.tt1[c1#4] parquet
      

      Attachments

        Issue Links

          Activity

            People

              maxgekk Max Gekk
              maxgekk Max Gekk
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: