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

cwylie pushed a commit to branch 0.19.0
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/0.19.0 by this push:
     new 6a9890a  ui: fix missing columns during Transform step (#10086) 
(#10151)
6a9890a is described below

commit 6a9890a9d38b5821ef8350cc68779b57a22c39a2
Author: Clint Wylie <[email protected]>
AuthorDate: Tue Jul 7 18:08:15 2020 -0700

    ui: fix missing columns during Transform step (#10086) (#10151)
    
    Co-authored-by: egor-ryashin <[email protected]>
    
    Co-authored-by: Egor Riashin <[email protected]>
    Co-authored-by: egor-ryashin <[email protected]>
---
 web-console/src/utils/druid-type.ts | 6 +++---
 web-console/src/utils/utils.spec.ts | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/web-console/src/utils/druid-type.ts 
b/web-console/src/utils/druid-type.ts
index 35e4cac..821dddc 100644
--- a/web-console/src/utils/druid-type.ts
+++ b/web-console/src/utils/druid-type.ts
@@ -30,7 +30,7 @@ export function guessTypeFromSample(sample: any[]): string {
     if (definedValues.every(v => v % 1 === 0)) {
       return 'long';
     } else {
-      return 'float';
+      return 'double';
     }
   } else {
     return 'string';
@@ -62,7 +62,7 @@ export function getDimensionSpecs(
   });
 }
 
-export function getMetricSecs(headerAndRows: HeaderAndRows): MetricSpec[] {
+export function getMetricSpecs(headerAndRows: HeaderAndRows): MetricSpec[] {
   return [{ name: 'count', type: 'count' }].concat(
     filterMap(headerAndRows.header, h => {
       if (h === '__time') return;
@@ -101,7 +101,7 @@ export function updateSchemaWithSample(
   if (rollup) {
     newSpec = deepSet(newSpec, 
'spec.dataSchema.granularitySpec.queryGranularity', 'HOUR');
 
-    const metrics = getMetricSecs(headerAndRows);
+    const metrics = getMetricSpecs(headerAndRows);
     if (metrics) {
       newSpec = deepSet(newSpec, 'spec.dataSchema.metricsSpec', metrics);
     }
diff --git a/web-console/src/utils/utils.spec.ts 
b/web-console/src/utils/utils.spec.ts
index 56eccd9..cc85278 100644
--- a/web-console/src/utils/utils.spec.ts
+++ b/web-console/src/utils/utils.spec.ts
@@ -20,7 +20,7 @@ import { getDruidErrorMessage, parseHtmlError, parseQueryPlan 
} from './druid-qu
 import {
   getColumnTypeFromHeaderAndRows,
   getDimensionSpecs,
-  getMetricSecs,
+  getMetricSpecs,
   guessTypeFromSample,
   updateSchemaWithSample,
 } from './druid-type';
@@ -207,7 +207,7 @@ describe('druid-type.ts', () => {
   });
 
   it('spec-utils getMetricSecs', () => {
-    expect(getMetricSecs({ header: ['header'], rows: [] 
})).toMatchInlineSnapshot(`
+    expect(getMetricSpecs({ header: ['header'], rows: [] 
})).toMatchInlineSnapshot(`
       Array [
         Object {
           "name": "count",


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to