Qihoo360 / Quicksql

A Flexible, Fast, Federated(3F) SQL Analysis Middleware for Multiple Data Sources
https://quicksql.readthedocs.io
MIT License
2.06k stars 583 forks source link

UnsupportedOperationException when running CsvScanExample locally #248

Open davidpaperclicks opened 3 years ago

davidpaperclicks commented 3 years ago

Versions

0.7.1

Describe the bug

I am getting an UnsupportedOperationException when running locally from IntelliJ the CsvScanExample.java.

To Reproduce

Before hand I have commented out the maven-dependency-plugin from parser and meta because otherwise it wouldn't compile. Then I ran:

  1. Ran mvn clean -DskipTests=true package
  2. Ran mvn clean -DskipTests=true install
  3. Ran CsvScanExample.java from IDE

Expected behavior

Expected to receive output on stdout, but instead an UnsupportedOperationException i thrown.

Full Output Logs

lasticsearch Embedded Server is starting up, waiting....
[masterService#updateTask][T#1]] GatewayService                 INFO  recovered [0] indices into cluster_state
[masterService#updateTask][T#1]] MetaDataCreateIndexService     INFO  [student] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
Elasticsearch Embedded Server has started!! Your query is running...
java.lang.RuntimeException: java.lang.UnsupportedOperationException
    at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:168)
    at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
    at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
    at com.qihoo.qsql.codegen.ClassBodyWrapper$WithClassPathInMemoryCompiler.compile(ClassBodyWrapper.java:156)
    at com.qihoo.qsql.codegen.ClassBodyWrapper$WithClassPathInMemoryCompiler.singleCompile(ClassBodyWrapper.java:123)
    at com.qihoo.qsql.codegen.ClassBodyWrapper.compileSourceAndLoadClass(ClassBodyWrapper.java:64)
    at com.qihoo.qsql.codegen.ClassBodyWrapper.compile(ClassBodyWrapper.java:101)
    at com.qihoo.qsql.exec.AbstractPipeline.compileRequirement(AbstractPipeline.java:51)
    at com.qihoo.qsql.exec.spark.SparkPipeline.show(SparkPipeline.java:105)
    at com.qihoo.qsql.CsvScanExample.main(CsvScanExample.java:25)
Caused by: java.lang.UnsupportedOperationException
    at com.github.picadoh.imc.compiler.InMemoryClassManager.getJavaFileForInput(InMemoryClassManager.java:40)
    at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$WrappedJavaFileManager.getJavaFileForInput(ClientCodeWrapper.java:288)
    at jdk.compiler/com.sun.tools.javac.code.ModuleFinder.getModuleInfoFromLocation(ModuleFinder.java:285)
    at jdk.compiler/com.sun.tools.javac.code.ModuleFinder.findModuleInfo(ModuleFinder.java:363)
    at jdk.compiler/com.sun.tools.javac.code.ModuleFinder.findAllModules(ModuleFinder.java:191)
    at jdk.compiler/com.sun.tools.javac.comp.Modules.getUnnamedModuleCompleter(Modules.java:1433)
    at jdk.compiler/com.sun.tools.javac.comp.Modules.setCompilationUnitModules(Modules.java:471)
    at jdk.compiler/com.sun.tools.javac.comp.Modules.enter(Modules.java:265)
    at jdk.compiler/com.sun.tools.javac.comp.Modules.initModules(Modules.java:231)
    at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.initModules(JavaCompiler.java:1048)
    at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:938)
    at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
    at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
    ... 9 more