[
https://issues.apache.org/jira/browse/BEAM-7013?focusedWorklogId=330561&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-330561
]
ASF GitHub Bot logged work on BEAM-7013:
----------------------------------------
Author: ASF GitHub Bot
Created on: 18/Oct/19 15:20
Start Date: 18/Oct/19 15:20
Worklog Time Spent: 10m
Work Description: zfraa commented on pull request #9778: [BEAM-7013]
Update BigQueryHllSketchCompatibilityIT to cover empty sketch cases
URL: https://github.com/apache/beam/pull/9778#discussion_r336542489
##########
File path:
sdks/java/extensions/zetasketch/src/test/java/org/apache/beam/sdk/extensions/zetasketch/BigQueryHllSketchCompatibilityIT.java
##########
@@ -65,23 +66,32 @@
private static final List<String> TEST_DATA =
Arrays.asList("Apple", "Orange", "Banana", "Orange");
- // Data Table: used by testReadSketchFromBigQuery())
+ // Data Table: used by tests reading sketches from BigQuery
// Schema: only one STRING field named "data".
- // Content: prepopulated with 4 rows: "Apple", "Orange", "Banana", "Orange"
- 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;
- // Sketch Table: used by testWriteSketchToBigQuery()
+ // Content: prepopulated with 4 rows: "Apple", "Orange", "Banana", "Orange"
+ private static final String DATA_TABLE_ID_NON_EMPTY = "hll_data_non_empty";
+ private static final Long EXPECTED_COUNT_NON_EMPTY = 3L;
+
+ // Content: empty
+ private static final String DATA_TABLE_ID_EMPTY = "hll_data_empty";
Review comment:
Does the aggregation (HLL_COUNT.INIT) over an empty table return a NULL
sketch, as expected? I.e., did the test fail before you modified
'parseQueryResultToByteArray' to deal with NULLs? I think it should (according
to
https://plx.corp.google.com/scripts2/script_5d._6fe78c_0000_2144_8a38_883d24fc4a60,
last SELECT), but double-checking.
I'd wish we could add an assert, but that doesn't work with the utility
method.
----------------------------------------------------------------
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: 330561)
Time Spent: 34h 50m (was: 34h 40m)
> 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: 34h 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)