Skip to content

Commit 83bcafb

Browse files
committed
Fix Rust import order and skip INSERT OVERWRITE DIRECTORY in Comet
1 parent e50e077 commit 83bcafb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

native/spark-expr/src/string_funcs/contains.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
//! scalar path in arrow-rs.
2727
2828
use arrow::array::{Array, ArrayRef, AsArray, BooleanArray};
29-
use arrow::datatypes::DataType;
3029
use arrow::compute::kernels::comparison::contains as arrow_contains;
30+
use arrow::datatypes::DataType;
3131
use datafusion::common::{exec_err, Result, ScalarValue};
3232
use datafusion::logical_expr::{
3333
ColumnarValue, ScalarFunctionArgs, ScalarUDFImpl, Signature, Volatility,

spark/src/main/scala/org/apache/comet/serde/operator/CometDataWritingCommand.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ object CometDataWritingCommand extends CometOperatorSerde[DataWritingCommandExec
5050
override def getSupportLevel(op: DataWritingCommandExec): SupportLevel = {
5151
op.cmd match {
5252
case cmd: InsertIntoHadoopFsRelationCommand =>
53+
// Skip INSERT OVERWRITE DIRECTORY operations (catalogTable is None for directory writes)
54+
if (cmd.catalogTable.isEmpty) {
55+
return Unsupported(Some("INSERT OVERWRITE DIRECTORY is not supported"))
56+
}
57+
5358
cmd.fileFormat match {
5459
case _: ParquetFileFormat =>
5560
if (!cmd.outputPath.toString.startsWith("file:")) {

0 commit comments

Comments
 (0)