Skip to content

Commit

Permalink
Add toString and sql.
Browse files Browse the repository at this point in the history
  • Loading branch information
ueshin committed Dec 14, 2018
1 parent e63599d commit 48233a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Expand Up @@ -44,6 +44,10 @@ case class UnresolvedNamedLambdaVariable(nameParts: Seq[String])
override def toAttribute: Attribute = throw new UnresolvedException(this, "toAttribute")
override def newInstance(): NamedExpression = throw new UnresolvedException(this, "newInstance")
override lazy val resolved = false

override def toString: String = s"lambda '$name"

override def sql: String = name
}

/**
Expand Down
Expand Up @@ -85,7 +85,7 @@ FROM various_maps
struct<>
-- !query 5 output
org.apache.spark.sql.AnalysisException
cannot resolve 'map_zip_with(various_maps.`decimal_map1`, various_maps.`decimal_map2`, lambdafunction(named_struct(NamePlaceholder(), unresolvednamedlambdavariable(), NamePlaceholder(), unresolvednamedlambdavariable(), NamePlaceholder(), unresolvednamedlambdavariable()), unresolvednamedlambdavariable(), unresolvednamedlambdavariable(), unresolvednamedlambdavariable()))' due to argument data type mismatch: The input to function map_zip_with should have been two maps with compatible key types, but the key types are [decimal(36,0), decimal(36,35)].; line 1 pos 7
cannot resolve 'map_zip_with(various_maps.`decimal_map1`, various_maps.`decimal_map2`, lambdafunction(named_struct(NamePlaceholder(), k, NamePlaceholder(), v1, NamePlaceholder(), v2), k, v1, v2))' due to argument data type mismatch: The input to function map_zip_with should have been two maps with compatible key types, but the key types are [decimal(36,0), decimal(36,35)].; line 1 pos 7


-- !query 6
Expand Down Expand Up @@ -113,7 +113,7 @@ FROM various_maps
struct<>
-- !query 8 output
org.apache.spark.sql.AnalysisException
cannot resolve 'map_zip_with(various_maps.`decimal_map2`, various_maps.`int_map`, lambdafunction(named_struct(NamePlaceholder(), unresolvednamedlambdavariable(), NamePlaceholder(), unresolvednamedlambdavariable(), NamePlaceholder(), unresolvednamedlambdavariable()), unresolvednamedlambdavariable(), unresolvednamedlambdavariable(), unresolvednamedlambdavariable()))' due to argument data type mismatch: The input to function map_zip_with should have been two maps with compatible key types, but the key types are [decimal(36,35), int].; line 1 pos 7
cannot resolve 'map_zip_with(various_maps.`decimal_map2`, various_maps.`int_map`, lambdafunction(named_struct(NamePlaceholder(), k, NamePlaceholder(), v1, NamePlaceholder(), v2), k, v1, v2))' due to argument data type mismatch: The input to function map_zip_with should have been two maps with compatible key types, but the key types are [decimal(36,35), int].; line 1 pos 7


-- !query 9
Expand Down

0 comments on commit 48233a5

Please sign in to comment.