[
https://issues.apache.org/jira/browse/BEAM-7013?focusedWorklogId=287351&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-287351
]
ASF GitHub Bot logged work on BEAM-7013:
----------------------------------------
Author: ASF GitHub Bot
Created on: 01/Aug/19 23:10
Start Date: 01/Aug/19 23:10
Worklog Time Spent: 10m
Work Description: robinyqiu commented on pull request #9144: [BEAM-7013]
Integrating ZetaSketch's HLL++ algorithm with Beam
URL: https://github.com/apache/beam/pull/9144#discussion_r309930825
##########
File path:
sdks/java/extensions/zetasketch/src/test/java/org/apache/beam/sdk/extensions/zetasketch/HllCountTest.java
##########
@@ -0,0 +1,373 @@
+/*
+ * 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.zetasketch;
+
+import com.google.zetasketch.HyperLogLogPlusPlus;
+import com.google.zetasketch.shaded.com.google.protobuf.ByteString;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.apache.beam.sdk.Pipeline.PipelineExecutionException;
+import org.apache.beam.sdk.testing.NeedsRunner;
+import org.apache.beam.sdk.testing.PAssert;
+import org.apache.beam.sdk.testing.TestPipeline;
+import org.apache.beam.sdk.transforms.Create;
+import org.apache.beam.sdk.values.KV;
+import org.apache.beam.sdk.values.PCollection;
+import org.apache.beam.sdk.values.TypeDescriptor;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+/** Tests for {@link HllCount}. */
+@RunWith(JUnit4.class)
+public class HllCountTest {
Review comment:
The tests currently included in `HllCountTest` are intended to be at
unit-test level. I looked into the config files you linked here and it seems be
for Dataflow ValidateRunner tests. I am not sure if we want to add these tests
into that list, because
- `HllCount` itself lives in a extension module that is outside of
`:sdks:java:core`. If we want to run them on Dataflow post-commit tests we will
need the `:runners:google-cloud-dataflow-java` module to depend on this
extension module, which seems weird to me.
- `HllCount` is just another aggregation transform built on top on the
`Combine` transform, similar to `Sum`, `Mean`, or `Latest` (a more
comprehensive list:
https://beam.apache.org/documentation/transforms/java/overview/#aggregation). I
checked the test list here
https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/3162/testReport/org.apache.beam.sdk.transforms/
and non of those transforms are included (only fundamental transforms like
`ParDo`, `Combine`, `GroupByKey` etc. are tested).
However, I totally agree that we should have some tests against the target
DataflowRunner for this feature. I am working on an integration test that tests
not only `HllCount` works on Dataflow, but also it can interoperate with
`BigQuery` with the same sketch format. There are some work need to be done,
and I would like to put that integration test in a separate PR, to avoid
blocking the review progress of this PR.
----------------------------------------------------------------
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: 287351)
Time Spent: 7.5h (was: 7h 20m)
> A new count distinct transform based on BigQuery compatible HyperLogLog++
> implementation
> ----------------------------------------------------------------------------------------
>
> Key: BEAM-7013
> URL: https://issues.apache.org/jira/browse/BEAM-7013
> Project: Beam
> Issue Type: New Feature
> Components: extensions-java-sketching, sdk-java-core
> Reporter: Yueyang Qiu
> Assignee: Yueyang Qiu
> Priority: Major
> Fix For: 2.16.0
>
> Time Spent: 7.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)