Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-15546

Obscure error message from ScalarOperatorGens::generateCast

    XMLWordPrintableJSON

Details

    Description

      Consider the following case:

      Flink SQL> describe foo;
      root
       |-- x: ROW<`f1` DOUBLE, `f2` VARCHAR(10)>
      
      
      Flink SQL> insert into foo select row(1.1,'abc');
      [INFO] Submitting SQL update statement to the cluster...
      [ERROR] Could not execute SQL statement. Reason:
      org.apache.flink.table.planner.codegen.CodeGenException: Unsupported cast from 'ROW' to 'ROW'.
      

      Users are unlikely to figure out what goes wrong from the above error message. Something like Unsupported cast from 'ROW<DECIMAL(2,1), CHAR(3)>' to 'ROW<DOUBLE, VARCHAR(10)>' will be more helpful.

      Attachments

        Issue Links

          Activity

            People

              docete Zhenghua Gao
              lirui Rui Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 20m
                  20m