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

chore(spark): fix typo in writer #648

Merged
merged 3 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
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 @@ -185,7 +185,7 @@ class GraphWriter() {
* @param spark
* the spark session for the writing.
* @param name
* the name of graph, default is 'grpah'
* the name of graph, default is 'graph'
* @param vertex_chunk_size
* the chunk size for vertices, default is 2^18
* @param edge_chunk_size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,11 @@ class EdgeWriter(
)
}
// check the src index and dst index column exist
val src_filed = StructField(GeneralParams.srcIndexCol, LongType)
val dst_filed = StructField(GeneralParams.dstIndexCol, LongType)
val src_field = StructField(GeneralParams.srcIndexCol, LongType)
val dst_field = StructField(GeneralParams.dstIndexCol, LongType)
val schema = edgeDf.schema
if (
schema.contains(src_filed) == false || schema.contains(dst_filed) == false
schema.contains(src_field) == false || schema.contains(dst_field) == false
) {
throw new IllegalArgumentException(
"edge DataFrame must contain src index column and dst index column."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ class VertexWriter(
chunks.persist(GeneralParams.defaultStorageLevel)

private def validate(): Unit = {
// check if vertex DataFrame contains the index_filed
val index_filed = StructField(GeneralParams.vertexIndexCol, LongType)
if (vertexDf.schema.contains(index_filed) == false) {
// check if vertex DataFrame contains the index_field
val index_field = StructField(GeneralParams.vertexIndexCol, LongType)
if (vertexDf.schema.contains(index_field) == false) {
throw new IllegalArgumentException(
"vertex DataFrame must contain index column."
)
Expand Down
Loading