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

"case class must be static and globally accessible" is too constrained

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      The following code can reproduce this issue.

      object BatchJob {
        def main(args: Array[String]) {
          // set up the batch execution environment
          val env = ExecutionEnvironment.getExecutionEnvironment
          val tenv = TableEnvironment.getTableEnvironment(env)
          case class Person(id:Int, name:String)
          val ds = env.fromElements(Person(1,"jeff"), Person(2, "andy"))
          tenv.registerDataSet("table_1", ds);
        }
      }
      

      Although I have workaround to declare case class outside of the main method, this workaround won't work in scala-shell.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              zjffdu Jeff Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: