Skip to content

Commit

Permalink
Add check for named expressions without associated ExecChecks
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Grove <andygrove@nvidia.com>
  • Loading branch information
andygrove committed Aug 11, 2021
1 parent 92bd4b6 commit 2b46a96
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -812,9 +812,17 @@ class ExecChecks private(
meta.childPlans.flatMap(_.outputAttributes.map(toStructField)),
"unsupported data types in input: %s")

val namedChildExprs = meta.namedChildExprs

val missing = namedChildExprs.keys.filterNot(extendedChecks.contains)
if (missing.nonEmpty) {
throw new IllegalStateException(s"${meta.getClass.getSimpleName} " +
s"is missing ExecChecks for ${missing.mkString(",")}")
}

extendedChecks.foreach {
case (fieldName, typeSig) =>
val fieldMeta = meta.namedChildExprs(fieldName)
val fieldMeta = namedChildExprs(fieldName)
.flatMap(_.typeMeta.dataType)
.zipWithIndex
.map(t => StructField(s"c${t._2}", t._1))
Expand Down

0 comments on commit 2b46a96

Please sign in to comment.