diff --git a/src/gateway/demo/USING_SCALA.md b/src/gateway/demo/USING_SCALA.md index c7dcb3d..5c99b61 100644 --- a/src/gateway/demo/USING_SCALA.md +++ b/src/gateway/demo/USING_SCALA.md @@ -25,7 +25,7 @@ SPARK_REMOTE=sc://localhost:50051 spark-connect-repl ```commandline -var lineitem = spark.read.parquet("/Users/davids/projects/voltrondata-spark-substrait-gateway/third_party/tpch/parquet/lineitem") +var lineitem = spark.read.parquet("third_party/tpch/parquet/lineitem") var result = lineitem.filter($"l_shipdate" <= "1998-09-02").groupBy($"l_returnflag", $"l_linestatus").agg(sum($"l_quantity"), sum($"l_extendedprice"), sum($"l_extendedprice" * ($"l_discount" + -1) * -1), sum($"l_extendedprice" * ($"l_discount" + -1) * ($"l_tax" + 1) * -1), avg($"l_quantity"), avg($"l_extendedprice"), avg($"l_discount"), count($"l_quantity")).sort($"l_returnflag", $"l_linestatus") diff --git a/src/gateway/server.py b/src/gateway/server.py index 25da529..f73491e 100644 --- a/src/gateway/server.py +++ b/src/gateway/server.py @@ -303,7 +303,14 @@ def AddArtifacts(self, request_iterator, context): """Add the given artifacts to the server.""" self._statistics.add_artifacts_requests += 1 _LOGGER.info('AddArtifacts') - return pb2.AddArtifactsResponse() + response = pb2.AddArtifactsResponse() + for request in request_iterator: + _LOGGER.info(' batch: %s', request) + for artifact in request.batch.artifacts: + response.artifacts.append(pb2.AddArtifactsResponse.ArtifactSummary( + name=artifact.name, is_crc_successful=True + )) + return response def ArtifactStatus(self, request, context): """Get the status of the given artifact."""