Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-6146

Support more datatype in SqlParser

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 1.3.1, 1.4.0
    • SQL
    • None

    Description

      Right now, I cannot do

      df.selectExpr("cast(a as bigint)")
      

      because only the following data types are supported in SqlParser

      protected lazy val dataType: Parser[DataType] =
          ( STRING ^^^ StringType
          | TIMESTAMP ^^^ TimestampType
          | DOUBLE ^^^ DoubleType
          | fixedDecimalType
          | DECIMAL ^^^ DecimalType.Unlimited
          | DATE ^^^ DateType
          | INT ^^^ IntegerType
          )
      

      Attachments

        Issue Links

          Activity

            People

              yhuai Yin Huai
              yhuai Yin Huai
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: