[ https://issues.apache.org/jira/browse/BEAM-7013?focusedWorklogId=301523&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-301523 ]
ASF GitHub Bot logged work on BEAM-7013: ---------------------------------------- Author: ASF GitHub Bot Created on: 26/Aug/19 21:22 Start Date: 26/Aug/19 21:22 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_r317804729 ########## File path: sdks/java/extensions/zetasketch/src/test/java/org/apache/beam/sdk/extensions/zetasketch/BigQueryHllSketchCompatibilityIT.java ########## @@ -49,26 +57,74 @@ @RunWith(JUnit4.class) public class BigQueryHllSketchCompatibilityIT { - private static final String DATASET_NAME = "zetasketch_compatibility_test"; + private static final String APP_NAME; + private static final String PROJECT_ID; + private static final String DATASET_ID; - // Table for testReadSketchFromBigQuery() + private static final List<String> TEST_DATA = + Arrays.asList("Apple", "Orange", "Banana", "Orange"); + + // Data Table: used by testReadSketchFromBigQuery()) // Schema: only one STRING field named "data". // Content: prepopulated with 4 rows: "Apple", "Orange", "Banana", "Orange" - private static final String DATA_TABLE_NAME = "hll_data"; + private static final String DATA_TABLE_ID = "hll_data"; private static final String DATA_FIELD_NAME = "data"; + private static final String DATA_FIELD_TYPE = "STRING"; private static final String QUERY_RESULT_FIELD_NAME = "sketch"; private static final Long EXPECTED_COUNT = 3L; - // Table for testWriteSketchToBigQuery() + // Sketch Table: used by testWriteSketchToBigQuery() // Schema: only one BYTES field named "sketch". // Content: will be overridden by the sketch computed by the test pipeline each time the test runs - private static final String SKETCH_TABLE_NAME = "hll_sketch"; + private static final String SKETCH_TABLE_ID = "hll_sketch"; private static final String SKETCH_FIELD_NAME = "sketch"; - private static final List<String> TEST_DATA = - Arrays.asList("Apple", "Orange", "Banana", "Orange"); + private static final String SKETCH_FIELD_TYPE = "BYTES"; // SHA-1 hash of string "[3]", the string representation of a row that has only one field 3 in it private static final String EXPECTED_CHECKSUM = "f1e31df9806ce94c5bdbbfff9608324930f4d3f1"; + static { + ApplicationNameOptions options = + TestPipeline.testingPipelineOptions().as(ApplicationNameOptions.class); + APP_NAME = options.getAppName(); + PROJECT_ID = options.as(GcpOptions.class).getProject(); + DATASET_ID = String.format("zetasketch_%tY_%<tm_%<td_%<tH_%<tM_%<tS", new Date()); Review comment: Done (in a different way: use millisecond precision) ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 301523) Time Spent: 28h (was: 27h 50m) > 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: 28h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.2#803003)