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

Throw out exception when use sql: 'update table select\n...'

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.1
    • Component/s: None
    • Labels:
      None

      Description

      When use below sql to update table:

      UPDATE IUD_table2 a
       SET (a.IUD_table2_country, a.IUD_table2_salary) = (select
       b.IUD_table1_country, b.IUD_table1_salary from IUD_table1 b where b.IUD_table1_id = 8)
       WHERE a.IUD_table2_id < 6 or a.IUD_table2_id > 15

      It will throw out exception: 

      Exception in thread "main" org.apache.spark.sql.AnalysisException: == Parse1 ==
      mismatched input '.' expecting <EOF>(line 2, pos 1)
      == SQL ==
       select select
       b.IUD_table1_country, b.IUD_table1_salary from IUD_table1 b where b.IUD_table1_id = 8 from iud_table2 a
       -^^^
      == Parse2 ==
       [1.1] failure: identifier matching regex (?i)ALTER expected
      select select
      

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                zzcclp Zhichao Zhang
                Reporter:
                zzcclp Zhichao Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 50m
                  4h 50m