[ 
https://issues.apache.org/jira/browse/BEAM-11659?focusedWorklogId=559166&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-559166
 ]

ASF GitHub Bot logged work on BEAM-11659:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Mar/21 03:20
            Start Date: 01/Mar/21 03:20
    Worklog Time Spent: 10m 
      Work Description: amaliujia commented on a change in pull request #13920:
URL: https://github.com/apache/beam/pull/13920#discussion_r584423788



##########
File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/pubsublite/PubsubLiteTopicTable.java
##########
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.extensions.sql.meta.provider.pubsublite;
+
+import com.google.cloud.pubsublite.TopicPath;
+import com.google.cloud.pubsublite.proto.PubSubMessage;
+import org.apache.beam.sdk.extensions.sql.impl.BeamTableStatistics;
+import org.apache.beam.sdk.extensions.sql.meta.SchemaBaseBeamTable;
+import org.apache.beam.sdk.io.gcp.pubsublite.PublisherOptions;
+import org.apache.beam.sdk.io.gcp.pubsublite.PubsubLiteIO;
+import org.apache.beam.sdk.options.PipelineOptions;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.transforms.PTransform;
+import org.apache.beam.sdk.values.PBegin;
+import org.apache.beam.sdk.values.PCollection;
+import org.apache.beam.sdk.values.PCollection.IsBounded;
+import org.apache.beam.sdk.values.POutput;
+import org.apache.beam.sdk.values.Row;
+
+class PubsubLiteTopicTable extends SchemaBaseBeamTable {
+  private final TopicPath topic;
+  private final PTransform<PCollection<? extends Row>, 
PCollection<PubSubMessage>> transform;
+
+  PubsubLiteTopicTable(
+      Schema schema,
+      TopicPath topic,
+      PTransform<PCollection<? extends Row>, PCollection<PubSubMessage>> 
transform) {
+    super(schema);
+    this.topic = topic;
+    this.transform = transform;
+  }
+
+  @Override
+  public PCollection<Row> buildIOReader(PBegin begin) {
+    throw new UnsupportedOperationException(

Review comment:
       Is there a test for this?

##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/Schema.java
##########
@@ -949,6 +950,40 @@ public int hashCode() {
             getMetadata()
           });
     }
+
+    @Override
+    public String toString() {

Review comment:
       I am not sure here: without this toString(), what is the default 
toString output for, say ROW type?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 559166)
    Time Spent: 17h 50m  (was: 17h 40m)

> Integrate Pub/Sub Lite with beam SQL
> ------------------------------------
>
>                 Key: BEAM-11659
>                 URL: https://issues.apache.org/jira/browse/BEAM-11659
>             Project: Beam
>          Issue Type: Improvement
>          Components: dsl-sql, io-java-gcp
>            Reporter: Daniel Collins
>            Assignee: Daniel Collins
>            Priority: P2
>          Time Spent: 17h 50m
>  Remaining Estimate: 0h
>
> Pub/Sub Lite should be a valid source and sink for beam SQL.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to