Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion native-engine/blaze/src/rt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ use datafusion_ext_plans::{
use futures::{FutureExt, StreamExt};
use jni::objects::{GlobalRef, JObject};
use prost::Message;
use raw_cpuid::CpuId;
use tokio::{runtime::Runtime, task::JoinHandle};

use crate::{
Expand Down Expand Up @@ -106,6 +105,7 @@ impl NativeExecutionRuntime {
all(target_arch = "x86_64", not(target_env = "sgx"))
))]
{
use raw_cpuid::CpuId;
let has_htt = CpuId::new()
.get_feature_info()
.map(|info| info.has_htt())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package org.apache.spark.sql.blaze
import java.io.File
import java.util.UUID
import org.apache.commons.lang3.reflect.FieldUtils
import org.apache.hadoop.fs.Path
import org.apache.spark.OneToOneDependency
import org.apache.spark.ShuffleDependency
import org.apache.spark.SparkEnv
Expand Down Expand Up @@ -837,6 +836,7 @@ class ShimsImpl extends Shims with Logging {
filePath: String,
offset: Long,
size: Long): PartitionedFile = {
import org.apache.hadoop.fs.Path
import org.apache.spark.paths.SparkPath
PartitionedFile(partitionValues, SparkPath.fromPath(new Path(filePath)), offset, size)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,12 @@ class BlazeCelebornShuffleManager(conf: SparkConf, isDriver: Boolean)
val shuffleIdTracker = FieldUtils
.readField(celebornShuffleManager, "shuffleIdTracker", true)
.asInstanceOf[ExecutorShuffleIdTracker]
val writer = new BlazeCelebornShuffleWriter(shuffleClient, context, celebornHandle, metrics, shuffleIdTracker)
val writer = new BlazeCelebornShuffleWriter(
shuffleClient,
context,
celebornHandle,
metrics,
shuffleIdTracker)
writer.asInstanceOf[BlazeRssShuffleWriterBase[K, V]]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,20 @@ class BlazeQuerySuite extends org.apache.spark.sql.QueryTest with BaseBlazeSQLSu
withTable("t1") {
sql("create table t1 using parquet as select '2024-12-18' as event_time")
checkAnswer(
sql(
"""
sql("""
|select year, count(*)
|from (select event_time, year(event_time) as year from t1) t
|where year <= 2024
|group by year
|""".stripMargin),
Seq(Row(2024, 1))
)
Seq(Row(2024, 1)))
}
}

test("test select multiple spark ext functions with the same signature") {
withTable("t1") {
sql("create table t1 using parquet as select '2024-12-18' as event_time")
checkAnswer(
sql("select year(event_time), month(event_time) from t1"),
Seq(Row(2024, 12))
)
checkAnswer(sql("select year(event_time), month(event_time) from t1"), Seq(Row(2024, 12)))
}
}
}