Skip to content

Cannot startup a demo application with datafusion-java  #90

Description

@fishblue

Maven Pom.xml

<dependency>
      <groupId>io.github.datafusion-contrib</groupId>
      <artifactId>datafusion-java</artifactId>
      <version>0.15.0</version>
</dependency>

Code:

SessionContext context = SessionContexts.create();
System.out.println(context.sql("select 1.5 + sqrt(2.0)").get());

Exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /private/var/folders/jg/1m0ncz_12ls78p9f8lq094880000gn/T/datafusion_jni6452691470670684444.dylib: dlopen(/private/var/folders/jg/1m0ncz_12ls78p9f8lq094880000gn/T/datafusion_jni6452691470670684444.dylib, 0x0001): tried: '/private/var/folders/jg/1m0ncz_12ls78p9f8lq094880000gn/T/datafusion_jni6452691470670684444.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/jg/1m0ncz_12ls78p9f8lq094880000gn/T/datafusion_jni6452691470670684444.dylib' (no such file), '/private/var/folders/jg/1m0ncz_12ls78p9f8lq094880000gn/T/datafusion_jni6452691470670684444.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
no datafusion_jni in java.library.path
Unsupported OS/arch (`Osx' detected), cannot find `/jni_libs/libdatafusion_jni.dylib' or load `datafusion_jni' from system libraries. Please try building from source the jar or providing datafusion_jni in your system.
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
	at java.lang.Runtime.loadLibrary0(Runtime.java:843)
	at java.lang.System.loadLibrary(System.java:1136)
	at org.apache.arrow.datafusion.JNILoader.load(JNILoader.java:95)
	at org.apache.arrow.datafusion.SessionContexts.<clinit>(SessionContexts.java:23)
	at com.tencent.metric.DatafusionMQL.main(DatafusionMQL.java:29)

Environment
System: Mac Apple M1 Pro
JDK: 1.8 & 11

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions