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

extend hint syntax to support any expression, not just identifiers or strings

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.2.0
    • 2.2.0
    • SQL
    • None

    Description

      Currently the SQL hint syntax supports as parameters only identifiers while the Dataset hint syntax supports only strings.

      They should support any expression as parameters, for example numbers. This is useful for implementing other hints in the future.

      Examples:

      df.hint("hint1", Seq(1, 2, 3))
      df.hint("hint2", "A", 10000)
      
      sql("select /*+ hint1((1,2,3)) */")
      sql("select /*+ hint2('A', 10000) */")
      

      Attachments

        Activity

          People

            bograd Bogdan Raducanu
            bograd Bogdan Raducanu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: