-
Notifications
You must be signed in to change notification settings - Fork 116
Conversation
src/main/scala/com/microsoft/hyperspace/index/sources/interfaces.scala
Outdated
Show resolved
Hide resolved
| * @tparam A Type of the initial value. | ||
| * @tparam B Type of the final value. | ||
| */ | ||
| class CacheWithTransform[A, B](val init: () => A, val transform: A => B) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to add a test for this class.
| * - The relation is [[HadoopFsRelation]] with [[PartitioningAwareFileIndex]] as file index. | ||
| * - Its file format implements [[DataSourceRegister]]. | ||
| */ | ||
| class DefaultFileBasedSource(private val spark: SparkSession) extends FileBasedSourceProvider { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to create a test for this class.
| * | ||
| * @param spark Spark session. | ||
| */ | ||
| class FileBasedSourceProviderManager(spark: SparkSession) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to create a test for this.
| spark.sessionState.conf | ||
| .getConfString( | ||
| "spark.hyperspace.index.sources.fileBasedBuilders", | ||
| "com.microsoft.hyperspace.index.sources.default.DefaultFileBasedSourceBuilder") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this config is necessary? Can we just create all builders?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To control what builders are being loaded similar to how plugins, listeners, etc. are loaded in SparkContext. What's the benefit of creating all builders available? The only benefit I can think of is not having to specify this config, but having a tight control seems better to me.
imback82
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a offline chat with @sezruby and will merge this PR to unblock other PRs related to Delta Lake. I will create issues to do follow up PRs to address comments in this PR.
What is the context for this pull request?
Introduce pluggable source provider.
What changes were proposed in this pull request?
This PR proposes to introduce pluggable source provider APIs so that new source such as Delta Lake can be easily plugged in.
Does this PR introduce any user-facing change?
Yes. This PR exposes a new way to plug in a source from which an index can be created.
How was this patch tested?
Existing tests