You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2023/08/04 17:13:46 UTC

[superset] 13/16: fix(annotation): Address regression from #24694 (#24874)

This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 21764f9ae37c72cf35bda7a4547c8ff539b51094
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Thu Aug 3 05:33:03 2023 -0700

    fix(annotation): Address regression from #24694 (#24874)
    
    (cherry picked from commit f05638ba845596faef088efa3ee98686d26dad26)
---
 .../packages/superset-ui-core/src/query/types/AnnotationLayer.ts       | 3 +--
 .../packages/superset-ui-core/test/query/types/AnnotationLayer.test.ts | 1 -
 .../plugins/plugin-chart-echarts/test/utils/annotation.test.ts         | 1 -
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/superset-frontend/packages/superset-ui-core/src/query/types/AnnotationLayer.ts b/superset-frontend/packages/superset-ui-core/src/query/types/AnnotationLayer.ts
index bac743cb25..d5b2981163 100644
--- a/superset-frontend/packages/superset-ui-core/src/query/types/AnnotationLayer.ts
+++ b/superset-frontend/packages/superset-ui-core/src/query/types/AnnotationLayer.ts
@@ -159,7 +159,6 @@ export function isTableAnnotationLayer(
 }
 
 export type RecordAnnotationResult = {
-  columns: string[];
   records: DataRecord[];
 };
 
@@ -181,7 +180,7 @@ export function isTimeseriesAnnotationResult(
 export function isRecordAnnotationResult(
   result: any,
 ): result is RecordAnnotationResult {
-  return Array.isArray(result?.columns) && Array.isArray(result?.records);
+  return Array.isArray(result?.records);
 }
 
 export type AnnotationData = { [key: string]: AnnotationResult };
diff --git a/superset-frontend/packages/superset-ui-core/test/query/types/AnnotationLayer.test.ts b/superset-frontend/packages/superset-ui-core/test/query/types/AnnotationLayer.test.ts
index c586239fd7..f6a695eb91 100644
--- a/superset-frontend/packages/superset-ui-core/test/query/types/AnnotationLayer.test.ts
+++ b/superset-frontend/packages/superset-ui-core/test/query/types/AnnotationLayer.test.ts
@@ -93,7 +93,6 @@ describe('AnnotationLayer type guards', () => {
     },
   ];
   const recordAnnotationResult: RecordAnnotationResult = {
-    columns: ['col1', 'col2'],
     records: [
       { a: 1, b: 2 },
       { a: 2, b: 3 },
diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/utils/annotation.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/utils/annotation.test.ts
index bef98483be..59afebd736 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/test/utils/annotation.test.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/test/utils/annotation.test.ts
@@ -130,7 +130,6 @@ describe('extractAnnotationLabels', () => {
     ];
     const results: AnnotationData = {
       'My Interval': {
-        columns: ['col'],
         records: [{ col: 1 }],
       },
       'My Line': [