-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'branch-23.12' into rebase_datatime
- Loading branch information
Showing
42 changed files
with
4,811 additions
and
69 deletions.
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
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
25 changes: 25 additions & 0 deletions
25
delta-lake/delta-spark321db/src/main/scala/com/nvidia/spark/rapids/delta/DeltaProbe.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,25 @@ | ||
/* | ||
* Copyright (c) 2023, 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.delta | ||
|
||
/** | ||
* Implements the Delta Probe interface for probing the Delta Lake provider on Databricks. | ||
* @note This is instantiated via reflection from ShimLoader. | ||
*/ | ||
class DeltaProbeImpl extends DeltaProbe { | ||
// Delta Lake is built-in for Databricks instances, so no probing is necessary. | ||
override def getDeltaProvider: DeltaProvider = DeltaSpark321DBProvider | ||
} |
57 changes: 57 additions & 0 deletions
57
...lta-spark321db/src/main/scala/com/nvidia/spark/rapids/delta/DeltaSpark321DBProvider.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,57 @@ | ||
/* | ||
* Copyright (c) 2023, 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.delta | ||
|
||
import com.databricks.sql.transaction.tahoe.rapids.GpuDeltaCatalog | ||
import com.nvidia.spark.rapids.{AtomicCreateTableAsSelectExecMeta, AtomicReplaceTableAsSelectExecMeta, GpuExec} | ||
|
||
import org.apache.spark.sql.execution.datasources.v2.{AtomicCreateTableAsSelectExec, AtomicReplaceTableAsSelectExec} | ||
import org.apache.spark.sql.execution.datasources.v2.rapids.{GpuAtomicCreateTableAsSelectExec, GpuAtomicReplaceTableAsSelectExec} | ||
|
||
object DeltaSpark321DBProvider extends DatabricksDeltaProviderBase { | ||
|
||
override def convertToGpu( | ||
cpuExec: AtomicCreateTableAsSelectExec, | ||
meta: AtomicCreateTableAsSelectExecMeta): GpuExec = { | ||
GpuAtomicCreateTableAsSelectExec( | ||
cpuExec.output, | ||
new GpuDeltaCatalog(cpuExec.catalog, meta.conf), | ||
cpuExec.ident, | ||
cpuExec.partitioning, | ||
cpuExec.plan, | ||
meta.childPlans.head.convertIfNeeded(), | ||
cpuExec.tableSpec, | ||
cpuExec.writeOptions, | ||
cpuExec.ifNotExists) | ||
} | ||
|
||
override def convertToGpu( | ||
cpuExec: AtomicReplaceTableAsSelectExec, | ||
meta: AtomicReplaceTableAsSelectExecMeta): GpuExec = { | ||
GpuAtomicReplaceTableAsSelectExec( | ||
cpuExec.output, | ||
new GpuDeltaCatalog(cpuExec.catalog, meta.conf), | ||
cpuExec.ident, | ||
cpuExec.partitioning, | ||
cpuExec.plan, | ||
meta.childPlans.head.convertIfNeeded(), | ||
cpuExec.tableSpec, | ||
cpuExec.writeOptions, | ||
cpuExec.orCreate, | ||
cpuExec.invalidateCache) | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...e/delta-spark321db/src/main/scala/com/nvidia/spark/rapids/delta/shims/MetadataShims.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,20 @@ | ||
/* | ||
* Copyright (c) 2023, 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.delta.shims | ||
|
||
import com.databricks.sql.transaction.tahoe.stats.UsesMetadataFields | ||
|
||
trait ShimUsesMetadataFields extends UsesMetadataFields |
25 changes: 25 additions & 0 deletions
25
delta-lake/delta-spark330db/src/main/scala/com/nvidia/spark/rapids/delta/DeltaProbe.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,25 @@ | ||
/* | ||
* Copyright (c) 2023, 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.delta | ||
|
||
/** | ||
* Implements the Delta Probe interface for probing the Delta Lake provider on Databricks. | ||
* @note This is instantiated via reflection from ShimLoader. | ||
*/ | ||
class DeltaProbeImpl extends DeltaProbe { | ||
// Delta Lake is built-in for Databricks instances, so no probing is necessary. | ||
override def getDeltaProvider: DeltaProvider = DeltaSpark330DBProvider | ||
} |
57 changes: 57 additions & 0 deletions
57
...lta-spark330db/src/main/scala/com/nvidia/spark/rapids/delta/DeltaSpark330DBProvider.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,57 @@ | ||
/* | ||
* Copyright (c) 2023, 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.delta | ||
|
||
import com.databricks.sql.transaction.tahoe.rapids.GpuDeltaCatalog | ||
import com.nvidia.spark.rapids.{AtomicCreateTableAsSelectExecMeta, AtomicReplaceTableAsSelectExecMeta, GpuExec} | ||
|
||
import org.apache.spark.sql.execution.datasources.v2.{AtomicCreateTableAsSelectExec, AtomicReplaceTableAsSelectExec} | ||
import org.apache.spark.sql.execution.datasources.v2.rapids.{GpuAtomicCreateTableAsSelectExec, GpuAtomicReplaceTableAsSelectExec} | ||
|
||
object DeltaSpark330DBProvider extends DatabricksDeltaProviderBase { | ||
|
||
override def convertToGpu( | ||
cpuExec: AtomicCreateTableAsSelectExec, | ||
meta: AtomicCreateTableAsSelectExecMeta): GpuExec = { | ||
GpuAtomicCreateTableAsSelectExec( | ||
cpuExec.output, | ||
new GpuDeltaCatalog(cpuExec.catalog, meta.conf), | ||
cpuExec.ident, | ||
cpuExec.partitioning, | ||
cpuExec.plan, | ||
meta.childPlans.head.convertIfNeeded(), | ||
cpuExec.tableSpec, | ||
cpuExec.writeOptions, | ||
cpuExec.ifNotExists) | ||
} | ||
|
||
override def convertToGpu( | ||
cpuExec: AtomicReplaceTableAsSelectExec, | ||
meta: AtomicReplaceTableAsSelectExecMeta): GpuExec = { | ||
GpuAtomicReplaceTableAsSelectExec( | ||
cpuExec.output, | ||
new GpuDeltaCatalog(cpuExec.catalog, meta.conf), | ||
cpuExec.ident, | ||
cpuExec.partitioning, | ||
cpuExec.plan, | ||
meta.childPlans.head.convertIfNeeded(), | ||
cpuExec.tableSpec, | ||
cpuExec.writeOptions, | ||
cpuExec.orCreate, | ||
cpuExec.invalidateCache) | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...e/delta-spark330db/src/main/scala/com/nvidia/spark/rapids/delta/shims/MetadataShims.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,20 @@ | ||
/* | ||
* Copyright (c) 2023, 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.delta.shims | ||
|
||
import com.databricks.sql.transaction.tahoe.stats.UsesMetadataFields | ||
|
||
trait ShimUsesMetadataFields extends UsesMetadataFields |
25 changes: 25 additions & 0 deletions
25
delta-lake/delta-spark332db/src/main/scala/com/nvidia/spark/rapids/delta/DeltaProbe.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,25 @@ | ||
/* | ||
* Copyright (c) 2023, 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.delta | ||
|
||
/** | ||
* Implements the Delta Probe interface for probing the Delta Lake provider on Databricks. | ||
* @note This is instantiated via reflection from ShimLoader. | ||
*/ | ||
class DeltaProbeImpl extends DeltaProbe { | ||
// Delta Lake is built-in for Databricks instances, so no probing is necessary. | ||
override def getDeltaProvider: DeltaProvider = DeltaSpark332DBProvider | ||
} |
Oops, something went wrong.