ueshin commented on code in PR #49424:
URL: https://github.com/apache/spark/pull/49424#discussion_r1913910492
##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -3759,6 +3759,18 @@ class SparkConnectPlanner(
UnresolvedScalarSubqueryPlanId(planId)
case proto.SubqueryExpression.SubqueryType.SUBQUERY_TYPE_EXISTS =>
UnresolvedExistsPlanId(planId)
+ case proto.SubqueryExpression.SubqueryType.SUBQUERY_TYPE_TABLE_ARG =>
+ val options = getSubqueryExpression.getTableArgOptions
+ UnresolvedTableArgPlanId(
+ planId,
+ partitionSpec = options.getPartitionSpecList.asScala
+ .map(transformExpression)
+ .toSeq,
+ orderSpec = options.getOrderSpecList.asScala
+ .map(transformSortOrder)
+ .toSeq,
+ withSinglePartition = options.getWithSinglePartition
Review Comment:
Need to check if it has `with_single_partition`?
##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -3759,6 +3759,18 @@ class SparkConnectPlanner(
UnresolvedScalarSubqueryPlanId(planId)
case proto.SubqueryExpression.SubqueryType.SUBQUERY_TYPE_EXISTS =>
UnresolvedExistsPlanId(planId)
+ case proto.SubqueryExpression.SubqueryType.SUBQUERY_TYPE_TABLE_ARG =>
+ val options = getSubqueryExpression.getTableArgOptions
Review Comment:
Need to check if it has `table_arg_options`?
##########
python/pyspark/sql/tests/connect/test_parity_udtf.py:
##########
@@ -76,7 +76,6 @@ def test_udtf_with_analyze_using_file(self):
def test_udtf_access_spark_session(self):
super().test_udtf_access_spark_session()
- @unittest.skip("TODO(SPARK-50393): support df.asTable() in Spark Connect")
def test_df_asTable(self):
super().test_df_asTable()
Review Comment:
Also `test_df_asTable_chaining_methods`?
##########
python/pyspark/sql/tests/connect/test_parity_udtf.py:
##########
@@ -76,7 +76,6 @@ def test_udtf_with_analyze_using_file(self):
def test_udtf_access_spark_session(self):
super().test_udtf_access_spark_session()
- @unittest.skip("TODO(SPARK-50393): support df.asTable() in Spark Connect")
def test_df_asTable(self):
super().test_df_asTable()
Review Comment:
We can remove this now?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]