yyanyy commented on code in PR #59662:
URL: https://github.com/apache/spark/pull/59662#discussion_r4365399447
##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/SupportsRead.java:
##########
@@ -40,4 +41,21 @@ public interface SupportsRead extends Table {
* string-to-string map.
*/
ScanBuilder newScanBuilder(CaseInsensitiveStringMap options);
+
+ /**
+ * Returns a {@link ScanBuilder} configured with read options and planning
context.
+ *
+ * <p>The default implementation delegates to
+ * {@link #newScanBuilder(CaseInsensitiveStringMap)}. Data sources can
override this method to use
+ * the planning context during builder creation. Calls to the options-only
overload do not provide
+ * subquery context.
+ *
+ * @param context the planning context for this scan
+ * @param options the options for reading, which is an immutable
case-insensitive
+ * string-to-string map
+ * @since 4.4.0
+ */
+ default ScanBuilder newScanBuilder(ScanBuilderContext context,
CaseInsensitiveStringMap options) {
Review Comment:
Tried pushing for a change to include other callers but decided to make this
PR to focus on ordinary batch table scans, since there seems to not be known
use case for them so far. Will update the PR description to narrow the scope
--
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]