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

Example code errors in SparkR documentation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.1, 1.5.0
    • Component/s: Documentation, SparkR
    • Labels:
      None

      Description

      There are errors in SparkR related documentation.
      1. in https://spark.apache.org/docs/latest/sql-programming-guide.html#hive-tables, for R part,

      results = sqlContext.sql("FROM src SELECT key, value").collect()
      

      should be

      results <- collect(sql(sqlContext, "FROM src SELECT key, value"))
      

      2. in https://spark.apache.org/docs/latest/sparkr.html#from-hive-tables,

      results <- hiveContext.sql("FROM src SELECT key, value")
      

      should be

      results <- sql(hiveContext, "FROM src SELECT key, value")
      

        Attachments

          Activity

            People

            • Assignee:
              sunrui Sun Rui
              Reporter:
              sunrui Sun Rui
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: