Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot startup a demo application with datafusion-java #90

Open
fishblue opened this issue Sep 15, 2023 · 1 comment
Open

Cannot startup a demo application with datafusion-java #90

fishblue opened this issue Sep 15, 2023 · 1 comment

Comments

@fishblue
Copy link

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

@fishblue fishblue changed the title Cannot starup a demo application with datafusion-java Cannot startup a demo application with datafusion-java Sep 15, 2023
@jimexist
Copy link
Collaborator

M1 is not a supported hardware type by GitHub action which is used to build the final artifacts https://repo.maven.apache.org/maven2/io/github/datafusion-contrib/datafusion-java/0.15.0/ - as you can see, only x86_64 is built and packaged.

to run the example, try ./gradlew clean copyDevLibrary run from the checked out source root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants