org.apache.spark.sql.catalyst.parser.ParseException: DataType numeric() is not supported.(line 1, pos 103) == SQL == SELECT `carat`, `cut`, `color`, `clarity`, `depth`, `table`, `price`, `x`, `y`, `z`, CAST(`x` > 4.0 AS NUMERIC) AS `binary` -------------------------------------------------------------------------------------------------------^^^ FROM `diamonds`

GitHub | kevinushey | 11 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    cannot cast columns to `numeric` on creation

    GitHub | 11 months ago | kevinushey
    org.apache.spark.sql.catalyst.parser.ParseException: DataType numeric() is not supported.(line 1, pos 103) == SQL == SELECT `carat`, `cut`, `color`, `clarity`, `depth`, `table`, `price`, `x`, `y`, `z`, CAST(`x` > 4.0 AS NUMERIC) AS `binary` -------------------------------------------------------------------------------------------------------^^^ FROM `diamonds`

    Root Cause Analysis

    1. org.apache.spark.sql.catalyst.parser.ParseException

      DataType numeric() is not supported.(line 1, pos 103) == SQL == SELECT `carat`, `cut`, `color`, `clarity`, `depth`, `table`, `price`, `x`, `y`, `z`, CAST(`x` > 4.0 AS NUMERIC) AS `binary` -------------------------------------------------------------------------------------------------------^^^ FROM `diamonds`

      at org.apache.spark.sql.catalyst.parser.AstBuilder$$anonfun$visitPrimitiveDataType$1.apply()
    2. org.apache.spark
      SqlBaseParser$PrimitiveDataTypeContext.accept
      1. org.apache.spark.sql.catalyst.parser.AstBuilder$$anonfun$visitPrimitiveDataType$1.apply(AstBuilder.scala:1418)
      2. org.apache.spark.sql.catalyst.parser.AstBuilder$$anonfun$visitPrimitiveDataType$1.apply(AstBuilder.scala:1400)
      3. org.apache.spark.sql.catalyst.parser.ParserUtils$.withOrigin(ParserUtils.scala:89)
      4. org.apache.spark.sql.catalyst.parser.AstBuilder.visitPrimitiveDataType(AstBuilder.scala:1399)
      5. org.apache.spark.sql.catalyst.parser.AstBuilder.visitPrimitiveDataType(AstBuilder.scala:42)
      6. org.apache.spark.sql.catalyst.parser.SqlBaseParser$PrimitiveDataTypeContext.accept(SqlBaseParser.java:11989)
      6 frames