-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#3187] feat(spark-connector): Support SparkSQL extended syntax in Ic…
…eberg
- Loading branch information
Showing
5 changed files
with
524 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
.../gravitino/spark/connector/iceberg/extensions/GravitinoIcebergSparkSessionExtensions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright 2024 Datastrato Pvt Ltd. | ||
* This software is licensed under the Apache License version 2. | ||
*/ | ||
package com.datastrato.gravitino.spark.connector.iceberg.extensions; | ||
|
||
import org.apache.spark.sql.SparkSessionExtensions; | ||
import scala.Function1; | ||
|
||
public class GravitinoIcebergSparkSessionExtensions | ||
implements Function1<SparkSessionExtensions, Void> { | ||
|
||
@Override | ||
public Void apply(SparkSessionExtensions extensions) { | ||
|
||
// planner extensions | ||
extensions.injectPlannerStrategy(IcebergExtendedDataSourceV2Strategy::new); | ||
|
||
// There must be a return value, and Void only supports returning null, not other types. | ||
return null; | ||
} | ||
} |
Oops, something went wrong.