Skip to content

Commit

Permalink
Merge branch 'implement-buildScan' of https://github.com/GoogleCloudD…
Browse files Browse the repository at this point in the history
…ataproc/spark-spanner-connector into implement-buildScan
  • Loading branch information
halio-g committed Sep 7, 2023
2 parents ba42f4f + 3804b28 commit 451d35e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ public InputPartition[] planInputPartitions() {
// TODO: Receive the columns and filters that were pushed down.
BatchClientWithCloser batchClient = SpannerUtils.batchClientFromProperties(this.opts);
String sqlStmt = "SELECT * FROM " + this.opts.get("table");
Filter[] filters = this.pushedFilters();
if (filters.length > 0) {
sqlStmt += " WHERE " + SparkFilterUtils.getCompiledFilter(true, filters);
}
try (BatchReadOnlyTransaction txn =
batchClient.batchClient.batchReadOnlyTransaction(TimestampBound.strong())) {
String mapAsJSON = SpannerUtils.serializeMap(this.opts.asCaseSensitiveMap());
Expand Down

0 comments on commit 451d35e

Please sign in to comment.