-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
_databricks_internal
check to shim layer [databricks] (#6813)
* check _databricks_internal in shim layer Signed-off-by: Cindy Jiang <[email protected]> * check _databricks_internal in shim layer Signed-off-by: Cindy Jiang <[email protected]> * updated DeltaLakeUtils order in import Signed-off-by: Cindy Jiang <[email protected]> * changed copyright year Signed-off-by: Cindy Jiang <[email protected]> * update function name Signed-off-by: Cindy Jiang <[email protected]> Signed-off-by: Cindy Jiang <[email protected]> Co-authored-by: Cindy Jiang <[email protected]>
- Loading branch information
1 parent
2871f71
commit 1b7f437
Showing
4 changed files
with
77 additions
and
3 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
sql-plugin/src/main/311+-nondb/scala/com/nvidia/spark/rapids/shims/DeltaLakeUtils.scala
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,23 @@ | ||
/* | ||
* Copyright (c) 2022, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.nvidia.spark.rapids.shims | ||
|
||
import org.apache.spark.sql.execution.FileSourceScanExec | ||
|
||
object DeltaLakeUtils { | ||
def isDatabricksDeltaLakeScan(f: FileSourceScanExec): Boolean = false | ||
} |
26 changes: 26 additions & 0 deletions
26
sql-plugin/src/main/312db/scala/com/nvidia/spark/rapids/shims/DeltaLakeUtils.scala
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,26 @@ | ||
/* | ||
* Copyright (c) 2022, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.nvidia.spark.rapids.shims | ||
|
||
import org.apache.spark.sql.execution.FileSourceScanExec | ||
|
||
object DeltaLakeUtils { | ||
/* Check for _databricks_internal when running on Databricks */ | ||
def isDatabricksDeltaLakeScan(f: FileSourceScanExec): Boolean = { | ||
f.requiredSchema.fields.exists(_.name.startsWith("_databricks_internal")) | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
sql-plugin/src/main/321db/scala/com/nvidia/spark/rapids/shims/DeltaLakeUtils.scala
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,26 @@ | ||
/* | ||
* Copyright (c) 2022, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.nvidia.spark.rapids.shims | ||
|
||
import org.apache.spark.sql.execution.FileSourceScanExec | ||
|
||
object DeltaLakeUtils { | ||
/* Check for _databricks_internal when running on Databricks */ | ||
def isDatabricksDeltaLakeScan(f: FileSourceScanExec): Boolean = { | ||
f.requiredSchema.fields.exists(_.name.startsWith("_databricks_internal")) | ||
} | ||
} |
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