Skip to content

chore: fix warnings in scala part #523

Description

@SemyonSinchenko

I don't think it is critical, but it would be nice to analyze and fix incomplete pattern matching:

[warn] /home/runner/work/graphframes/graphframes/src/main/scala/org/graphframes/pattern/patterns.scala:33:69: match may not be exhaustive.
[warn] It would fail on the following inputs: ~(~(~(~(~(~(_, "-"), "["), _), "]"), (x: String forSome x not in "->")), _), ~(~(~(~(~(~(_, "-"), "["), _), (x: String forSome x not in "]")), "->"), _), ~(~(~(~(~(~(_, "-"), "["), _), (x: String forSome x not in "]")), (x: String forSome x not in "->")), _), ~(~(~(~(~(~(_, "-"), (x: String forSome x not in "[")), _), "]"), "->"), _), ~(~(~(~(~(~(_, "-"), (x: String forSome x not in "[")), _), "]"), (x: String forSome x not in "->")), _), ~(~(~(~(~(~(_, "-"), (x: String forSome x not in "[")), _), (x: String forSome x not in "]")), "->"), _), ~(~(~(~(~(~(_, "-"), (x: String forSome x not in "[")), _), (x: String forSome x not in "]")), (x: String forSome x not in "->")), _), ~(~(~(~(~(~(_, (x: String forSome x not in "-")), "["), _), "]"), "->"), _), ~(~(~(~(~(~(_, (x: String forSome x not in "-")), "["), _), "]"), (x: String forSome x not in "->")), _), ~(~(~(~(~(~(_, (x: String forSome x not in "-")), "["), _), (x: String forSome x not i
[warn]     vertex ~ "-" ~ "[" ~ "[a-zA-Z0-9_]+".r ~ "]" ~ "->" ~ vertex ^^ {
[warn]                                                                     ^
[warn] /home/runner/work/graphframes/graphframes/src/main/scala/org/graphframes/pattern/patterns.scala:37:49: match may not be exhaustive.
[warn] It would fail on the following inputs: ~(~(~(~(~(_, "-"), "["), "]"), (x: String forSome x not in "->")), _), ~(~(~(~(~(_, "-"), "["), (x: String forSome x not in "]")), "->"), _), ~(~(~(~(~(_, "-"), "["), (x: String forSome x not in "]")), (x: String forSome x not in "->")), _), ~(~(~(~(~(_, "-"), (x: String forSome x not in "[")), "]"), "->"), _), ~(~(~(~(~(_, "-"), (x: String forSome x not in "[")), "]"), (x: String forSome x not in "->")), _), ~(~(~(~(~(_, "-"), (x: String forSome x not in "[")), (x: String forSome x not in "]")), "->"), _), ~(~(~(~(~(_, "-"), (x: String forSome x not in "[")), (x: String forSome x not in "]")), (x: String forSome x not in "->")), _), ~(~(~(~(~(_, (x: String forSome x not in "-")), "["), "]"), "->"), _), ~(~(~(~(~(_, (x: String forSome x not in "-")), "["), "]"), (x: String forSome x not in "->")), _), ~(~(~(~(~(_, (x: String forSome x not in "-")), "["), (x: String forSome x not in "]")), "->"), _), ~(~(~(~(~(_, (x: String forSome x not in
[warn]     vertex ~ "-" ~ "[" ~ "]" ~ "->" ~ vertex ^^ { case src ~ "-" ~ "[" ~ "]" ~ "->" ~ dst =>
[warn]                                                 ^
[warn] two warnings found

At least something like "UnreachableException" may be introduced here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions