You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "dongjoon-hyun (via GitHub)" <gi...@apache.org> on 2025/05/03 16:12:34 UTC
Re: [PR] [SPARK-51991] Add `SparkConnect.md`, `GettingStarted.md` and `SparkSession.md` [spark-connect-swift]
dongjoon-hyun commented on code in PR #107:
URL: https://github.com/apache/spark-connect-swift/pull/107#discussion_r2072422211
##########
Sources/SparkConnect/DataFrame.swift:
##########
@@ -23,7 +23,158 @@ import GRPCNIOTransportHTTP2
import GRPCProtobuf
import Synchronization
-/// A DataFrame which supports only SQL queries
+/// A distributed collection of data organized into named columns.
+///
+/// A DataFrame is equivalent to a relational table in Spark SQL, and can be created using various
+/// functions in ``SparkSession``. Once created, it can be manipulated using the various domain-specific
+/// language (DSL) functions defined in: ``DataFrame``, ``Column``, and functions.
+///
+/// ## Creating DataFrames
+///
+/// DataFrames can be created from various sources:
+///
+/// ```swift
+/// // From a range
+/// let df1 = try await spark.range(1, 100)
+///
+/// // From a SQL query
+/// let df2 = try await spark.sql("SELECT * FROM users")
+///
+/// // From files
+/// let df3 = try await spark.read.csv("data.csv")
+/// ```
+///
+/// ## Common Operations
+///
+/// ### Transformations
+///
+/// ```swift
+/// // Select specific columns
+/// let names = try await df.select("name", "age")
+///
+/// // Filter rows
+/// let adults = try await df.filter("age >= 18")
+///
+/// // Group and aggregate
+/// let stats = try await df.groupBy("department").agg("avg(salary)", "count(*)")
+/// ```
+///
+/// ### Actions
+///
+/// ```swift
+/// // Show the first 20 rows
+/// try await df.show()
+///
+/// // Collect all data to the driver
+/// let rows = try await df.collect()
+///
+/// // Count rows
+/// let count = try await df.count()
+/// ```
+///
+/// ## Topics
+///
+/// ### Basic Information
+/// - ``columns``
+/// - ``schema``
+/// - ``dtypes``
+/// - ``sparkSession``
+///
+/// ### Data Collection
+/// - ``count()``
+/// - ``collect()``
+/// - ``head(_:)``
+/// - ``tail(_:)``
+/// - ``show()``
+/// - ``show(_:)``
+/// - ``show(_:_:)``
+/// - ``show(_:_:_:)``
+///
+/// ### Transformation Operations
+/// - ``select(_:)``
+/// - ``selectExpr(_:)``
+/// - ``filter(_:)``
+/// - ``where(_:)``
+/// - ``sort(_:)``
+/// - ``orderBy(_:)``
+/// - ``limit(_:)``
+/// - ``offset(_:)``
+/// - ``drop(_:)``
+/// - ``withColumnRenamed(_:_:)``
+///
+/// ### Join Operations
+/// - ``join(_:)``
+/// - ``join(_:_:_:)``
+/// - ``join(_:_:_:)-3b88j``
+/// - ``join(_:joinExprs:)``
+/// - ``join(_:joinExprs:joinType:)``
+/// - ``crossJoin(_:)``
+/// - ``lateralJoin(_:)``
+/// - ``lateralJoin(_:joinType:)``
+/// - ``lateralJoin(_:joinExprs:)``
+/// - ``lateralJoin(_:joinExprs:joinType:)``
+///
+/// ### Set Operations
+/// - ``union(_:)``
+/// - ``unionAll(_:)``
+/// - ``unionByName(_:_:)``
+/// - ``intersect(_:)``
+/// - ``intersectAll(_:)``
+/// - ``except(_:)``
+/// - ``exceptAll(_:)``
+///
+/// ### Partitioning
+/// - ``repartition(_:)``
+/// - ``repartition(_:)-5wxc7``
+/// - ``repartition(_:_:)``
+/// - ``repartitionByExpression(_:_:)``
+/// - ``coalesce(_:)``
+///
+/// ### Grouping Operations
+/// - ``groupBy(_:)``
+/// - ``rollup(_:)``
+/// - ``cube(_:)``
+///
+/// ### Persistence
+/// - ``cache()``
+/// - ``persist(storageLevel:)``
+/// - ``unpersist(blocking:)``
+/// - ``storageLevel``
+///
+/// ### Schema Information
+/// - ``printSchema()``
+/// - ``printSchema(_:)``
+/// - ``explain()``
+/// - ``explain(_:)``
+/// - ``explain(_:)-6r4o9``
Review Comment:
Let me remove that. It was added due to overloaded method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org