Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GenomicDataset.scala #2412

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,22 @@ trait GenomicDataset[T, U <: Product, V <: GenomicDataset[T, U, V]] extends Logg
* the SpecificRecordBase abstract class, or the SpecificRecord interface.
* As such, we must force the user to pass in the schema.
*
* @tparam U The type of the specific record we are saving.
* The `ClassTag` parameter is required to support reflection, which allows
* us to instantiate a specific Avro record type (`U`) at runtime. This is
* crucial for operations on generic types, enabling the code to work with
* specific Avro record types while retaining type safety and avoiding
* reflection-based issues.
*
* @tparam U The type of the specific record we are saving. This must be a
* subtype of `SpecificRecordBase`, which represents the Avro
* record being saved.
* @param pathName Path to save records to.
* @param sc SparkContext used for identifying underlying file system.
* @param schema Schema of records we are saving.
* @param avro Seq of records we are saving.
* @param tUag Implicit `ClassTag` for the type `U`, required to handle
* reflection and ensure proper handling of specific Avro record
* types at runtime.
*/
protected def saveAvro[U <: SpecificRecordBase](pathName: String,
sc: SparkContext,
Expand Down
Loading