parthchandra commented on code in PR #2372: URL: https://github.com/apache/datafusion-comet/pull/2372#discussion_r2350084785
########## native/core/src/lib.rs: ########## @@ -100,6 +100,35 @@ pub extern "system" fn Java_org_apache_comet_NativeBase_init( const LOG_PATTERN: &str = "{d(%y/%m/%d %H:%M:%S)} {l} {f}: {m}{n}"; +/// JNI method to check if a specific feature is enabled in the native Rust code. +/// # Arguments +/// * `feature_name` - The name of the feature to check. Supported features: +/// - "jemalloc" - tikv-jemallocator memory allocator +/// - "hdfs" - HDFS object store support +/// - "hdfs-opendal" - HDFS support via OpenDAL +/// # Returns +/// * `1` (true) if the feature is enabled +/// * `0` (false) if the feature is disabled or unknown +#[no_mangle] +pub extern "system" fn Java_org_apache_comet_NativeBase_isFeatureEnabled( Review Comment: The name of the feature comes from the features specified in `cargo.toml`. And no, this is one feature at a time. ########## spark/src/test/scala/org/apache/comet/parquet/ParquetReadFromFakeHadoopFsSuite.scala: ########## @@ -74,7 +74,18 @@ class ParquetReadFromFakeHadoopFsSuite extends CometTestBase with AdaptiveSparkP .startsWith(FakeHDFSFileSystem.PREFIX)) } - ignore("test native_datafusion scan on fake fs") { + // This test fails for 'hdfs' but succeeds for 'open-dal'. 'hdfs' requires this fix + // https://github.com/datafusion-contrib/fs-hdfs/pull/29 + test("test native_datafusion scan on fake fs") { + // Skip test if HDFS feature is not enabled in native library + val hdfsEnabled = + try { Review Comment: Good idea. Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org