(druid) branch master updated: Docs: update descriptions and default values (#17473)

2024-11-13 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 75d9ece6654 Docs: update descriptions and default values (#17473)
75d9ece6654 is described below

commit 75d9ece665460fdfab119576bae707ba7f60bbcd
Author: Katya Macedo <38017980+ektra...@users.noreply.github.com>
AuthorDate: Wed Nov 13 18:29:27 2024 -0600

Docs: update descriptions and default values (#17473)
---
 docs/querying/sql-query-context.md | 50 --
 1 file changed, 26 insertions(+), 24 deletions(-)

diff --git a/docs/querying/sql-query-context.md 
b/docs/querying/sql-query-context.md
index e003ceec69d..775bd4ca48f 100644
--- a/docs/querying/sql-query-context.md
+++ b/docs/querying/sql-query-context.md
@@ -33,34 +33,36 @@ See [Query context](query-context.md) for general query 
context parameters for a
 
 ## SQL query context parameters
 
-Configure Druid SQL query planning using the parameters in the table below.
+The following table lists query context parameters you can use to configure 
Druid SQL planning.
+You can override a parameter's default value by setting a runtime property in 
the format `druid.query.default.context.{query_context_key}`.
+For more information, see [Overriding default query context 
values](../configuration/index.md#overriding-default-query-context-values).
 
 |Parameter|Description|Default value|
 |-|---|-|
-|`sqlQueryId`|Unique identifier given to this SQL query. For HTTP client, it 
will be returned in `X-Druid-SQL-Query-Id` header.To specify a unique 
identifier for SQL query, use `sqlQueryId` instead of 
[`queryId`](query-context.md). Setting `queryId` for a SQL request has no 
effect. All native queries underlying SQL use an auto-generated 
`queryId`.|auto-generated|
-|`sqlTimeZone`|Sets the time zone for this connection, which will affect how 
time functions and timestamp literals behave. Should be a time zone name like 
"America/Los_Angeles" or offset like "-08:00".|`druid.sql.planner.sqlTimeZone` 
on the Broker (default: UTC)|
-|`sqlStringifyArrays`|When set to true, result columns which return array 
values will be serialized into a JSON string in the response instead of as an 
array|true, except for JDBC connections, where it is always false|
-|`useApproximateCountDistinct`|Whether to use an approximate cardinality 
algorithm for `COUNT(DISTINCT 
foo)`.|`druid.sql.planner.useApproximateCountDistinct` on the Broker (default: 
true)|
-|`useGroupingSetForExactDistinct`|Whether to use grouping sets to execute 
queries with multiple exact distinct 
aggregations.|`druid.sql.planner.useGroupingSetForExactDistinct` on the Broker 
(default: false)|
-|`useApproximateTopN`|Whether to use approximate [TopN queries](topnquery.md) 
when a SQL query could be expressed as such. If false, exact [GroupBy 
queries](groupbyquery.md) will be used 
instead.|`druid.sql.planner.useApproximateTopN` on the Broker (default: true)|
-|`enableTimeBoundaryPlanning`|If true, SQL queries will get converted to 
TimeBoundary queries wherever possible. TimeBoundary queries are very efficient 
for min-max calculation on `__time` column in a datasource 
|`druid.query.default.context.enableTimeBoundaryPlanning` on the Broker 
(default: false)|
-|`useNativeQueryExplain`|If true, `EXPLAIN PLAN FOR` will return the explain 
plan as a JSON representation of equivalent native query(s), else it will 
return the original version of explain plan generated by Calcite.This property is provided for backwards compatibility. It is not recommended 
to use this parameter unless you were depending on the older 
behavior.|`druid.sql.planner.useNativeQueryExplain` on the Broker (default: 
true)|
-|`sqlFinalizeOuterSketches`|If false (default behavior in Druid 25.0.0 and 
later), `DS_HLL`, `DS_THETA`, and `DS_QUANTILES_SKETCH` return sketches in 
query results, as documented. If true (default behavior in Druid 24.0.1 and 
earlier), sketches from these functions are finalized when they appear in query 
results.This property is provided for backwards compatibility with 
behavior in Druid 24.0.1 and earlier. It is not recommended to use this 
parameter unless you were depending [...]
-|`sqlUseBoundAndSelectors`|If false (default behavior if 
`druid.generic.useDefaultValueForNull=false` in Druid 27.0.0 and later), the 
SQL planner will use [equality](./filters.md#equality-filter), 
[null](./filters.md#null-filter), and [range](./filters.md#range-filter) 
filters instead of [selector](./filters.md#selector-filter) and 
[bounds](./filters.md#bound-filter). This value must be set to `false` for 
correct behavior for filtering `ARRAY` typed values. | Defaults to same value 
as `d [...]
-|`sqlReverseLookup`|Whether to consider the [reverse-lookup 
rewrite](lookups.md#reverse-l

(druid) branch master updated: [Kafka Ingestion Tutorial] Update docs for Schema Config (#17409)

2024-10-29 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 1be2b852e9d [Kafka Ingestion Tutorial] Update docs for Schema Config 
(#17409)
1be2b852e9d is described below

commit 1be2b852e9d0a3bc5dfeca920f5ff423863441b0
Author: Ashwin Tumma 
AuthorDate: Tue Oct 29 08:23:20 2024 -0700

[Kafka Ingestion Tutorial] Update docs for Schema Config (#17409)

Co-authored-by: Ashwin Tumma 
---
 docs/assets/tutorial-kafka-data-loader-05.png  | Bin 206028 -> 506701 bytes
 docs/assets/tutorial-kafka-data-loader-05b.png | Bin 202167 -> 0 bytes
 docs/tutorials/tutorial-kafka.md   |  11 +--
 3 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/docs/assets/tutorial-kafka-data-loader-05.png 
b/docs/assets/tutorial-kafka-data-loader-05.png
index 4d4efc6c978..c920f056585 100644
Binary files a/docs/assets/tutorial-kafka-data-loader-05.png and 
b/docs/assets/tutorial-kafka-data-loader-05.png differ
diff --git a/docs/assets/tutorial-kafka-data-loader-05b.png 
b/docs/assets/tutorial-kafka-data-loader-05b.png
deleted file mode 100644
index cc24fbc08e0..000
Binary files a/docs/assets/tutorial-kafka-data-loader-05b.png and /dev/null 
differ
diff --git a/docs/tutorials/tutorial-kafka.md b/docs/tutorials/tutorial-kafka.md
index 4bad708d57d..a9cdd99ac1f 100644
--- a/docs/tutorials/tutorial-kafka.md
+++ b/docs/tutorials/tutorial-kafka.md
@@ -129,16 +129,7 @@ To use the console data loader:
 
![Data loader schema](../assets/tutorial-kafka-data-loader-05.png "Data 
loader schema")
 
-7. In the **Configure schema** step, you can select data types for the columns 
and configure [dimensions](../ingestion/schema-model.md#dimensions) and 
[metrics](../ingestion/schema-model.md#metrics) to ingest into Druid. The 
console does most of this for you, but you need to create JSON-type dimensions 
for the three nested columns in the data. 
-
-Click **Add dimension** and enter the following information. You can only 
add one dimension at a time.
-- Name: `event`, Type: `json`
-- Name: `agent`, Type: `json`
-- Name: `geo_ip`, Type: `json`
-  
-After you create the dimensions, you can scroll to the right in the 
preview window to see the nested columns:
-
-![Nested columns schema](../assets/tutorial-kafka-data-loader-05b.png 
"Nested columns schema")
+7. In the **Configure schema** step, you can select data types for the columns 
and configure [dimensions](../ingestion/schema-model.md#dimensions) and 
[metrics](../ingestion/schema-model.md#metrics) to ingest into Druid. The 
console does most of this for you. Notice that the dimensions `event`, `agent` 
and `geo_ip` are of the type `json`. 
 
 8.  Click **Next: Partition** to configure how Druid partitions the data into 
segments.
 


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 03/07: small fixes

2024-10-28 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 52b02d9fc0efe7b9732ca73bc570aa65cfd74cba
Author: Vadim Ogievetsky 
AuthorDate: Wed Oct 23 13:42:06 2024 -0700

small fixes
---
 web-console/src/components/segment-timeline/segment-timeline.scss | 1 +
 web-console/src/components/segment-timeline/segment-timeline.tsx  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/web-console/src/components/segment-timeline/segment-timeline.scss 
b/web-console/src/components/segment-timeline/segment-timeline.scss
index f739277bea7..6239e717ae8 100644
--- a/web-console/src/components/segment-timeline/segment-timeline.scss
+++ b/web-console/src/components/segment-timeline/segment-timeline.scss
@@ -28,6 +28,7 @@
 
   .side-control {
 @include card-like;
+height: 100%;
 padding: 10px;
   }
 
diff --git a/web-console/src/components/segment-timeline/segment-timeline.tsx 
b/web-console/src/components/segment-timeline/segment-timeline.tsx
index 56f6801b426..edb7dfcf60f 100644
--- a/web-console/src/components/segment-timeline/segment-timeline.tsx
+++ b/web-console/src/components/segment-timeline/segment-timeline.tsx
@@ -564,7 +564,7 @@ ORDER BY "start" DESC`;
   items={datasourcesWzAll}
   onItemSelect={handleItemSelected}
   itemRenderer={datasourceRenderer}
-  noResults={}
+  noResults={}
   itemPredicate={filterDatasource}
   fill
 >


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 07/07: improve segment view

2024-10-28 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 224ca761175e86dd7818f5fcaa4edb02d71dc4a1
Author: Vadim Ogievetsky 
AuthorDate: Mon Oct 28 14:04:44 2024 -0700

improve segment view
---
 web-console/src/utils/table-helpers.ts |  11 +-
 .../src/views/segments-view/segments-view.tsx  | 148 +
 2 files changed, 93 insertions(+), 66 deletions(-)

diff --git a/web-console/src/utils/table-helpers.ts 
b/web-console/src/utils/table-helpers.ts
index 45e8758bf6f..117b34f2d1a 100644
--- a/web-console/src/utils/table-helpers.ts
+++ b/web-console/src/utils/table-helpers.ts
@@ -18,7 +18,7 @@
 
 import type { QueryResult, SqlExpression } from '@druid-toolkit/query';
 import { C } from '@druid-toolkit/query';
-import type { Filter } from 'react-table';
+import type { Filter, SortingRule } from 'react-table';
 
 import { filterMap, formatNumber, isNumberLike, oneOf } from './general';
 import { deepSet } from './object-change';
@@ -67,19 +67,14 @@ export function getNumericColumnBraces(
   return numericColumnBraces;
 }
 
-export interface Sorted {
-  id: string;
-  desc: boolean;
-}
-
 export interface TableState {
   page: number;
   pageSize: number;
   filtered: Filter[];
-  sorted: Sorted[];
+  sorted: SortingRule[];
 }
 
-export function sortedToOrderByClause(sorted: Sorted[]): string | undefined {
+export function sortedToOrderByClause(sorted: SortingRule[]): string | 
undefined {
   if (!sorted.length) return;
   return 'ORDER BY ' + sorted.map(sort => `${C(sort.id)} ${sort.desc ? 'DESC' 
: 'ASC'}`).join(', ');
 }
diff --git a/web-console/src/views/segments-view/segments-view.tsx 
b/web-console/src/views/segments-view/segments-view.tsx
index 74373e097a7..18a44e66180 100644
--- a/web-console/src/views/segments-view/segments-view.tsx
+++ b/web-console/src/views/segments-view/segments-view.tsx
@@ -21,7 +21,7 @@ import { IconNames } from '@blueprintjs/icons';
 import { C, L, SqlComparison, SqlExpression } from '@druid-toolkit/query';
 import * as JSONBig from 'json-bigint-native';
 import React from 'react';
-import type { Filter } from 'react-table';
+import type { Filter, SortingRule } from 'react-table';
 import ReactTable from 'react-table';
 
 import {
@@ -127,6 +127,43 @@ function formatRangeDimensionValue(dimension: any, value: 
any): string {
   return `${C(String(dimension))}=${L(String(value))}`;
 }
 
+function segmentFiltersToExpression(filters: Filter[]): SqlExpression {
+  return SqlExpression.and(
+...filterMap(filters, filter => {
+  if (filter.id === 'shard_type') {
+// Special handling for shard_type that needs to be searched for in 
the shard_spec
+// Creates filters like `shard_spec LIKE '%"type":"numbered"%'`
+const modeAndNeedle = parseFilterModeAndNeedle(filter);
+if (!modeAndNeedle) return;
+const shardSpecColumn = C('shard_spec');
+switch (modeAndNeedle.mode) {
+  case '=':
+return SqlComparison.like(shardSpecColumn, 
`%"type":"${modeAndNeedle.needle}"%`);
+
+  case '!=':
+return SqlComparison.notLike(shardSpecColumn, 
`%"type":"${modeAndNeedle.needle}"%`);
+
+  default:
+return SqlComparison.like(shardSpecColumn, 
`%"type":"${modeAndNeedle.needle}%`);
+}
+  } else if (filter.id.startsWith('is_')) {
+switch (filter.value) {
+  case '=false':
+return C(filter.id).equal(0);
+
+  case '=true':
+return C(filter.id).equal(1);
+
+  default:
+return;
+}
+  } else {
+return sqlQueryCustomTableFilter(filter);
+  }
+}),
+  );
+}
+
 interface SegmentsQuery extends TableState {
   visibleColumns: LocalStorageBackedVisibility;
   capabilities: Capabilities;
@@ -167,11 +204,16 @@ export interface SegmentsViewState {
   segmentTableActionDialogId?: string;
   datasourceTableActionDialogId?: string;
   actions: BasicAction[];
-  terminateSegmentId?: string;
-  terminateDatasourceId?: string;
+
   visibleColumns: LocalStorageBackedVisibility;
   groupByInterval: boolean;
   showSegmentTimeline: boolean;
+  page: number;
+  pageSize: number;
+  sorted: SortingRule[];
+
+  terminateSegmentId?: string;
+  terminateDatasourceId?: string;
   showFullShardSpec?: string;
 }
 
@@ -237,8 +279,6 @@ END AS "time_span"`,
 
   private readonly segmentsQueryManager: QueryManager;
 
-  private lastTableState: TableState | undefined;
-
   constructor(props: SegmentsViewProps

(druid) 06/07: fix

2024-10-28 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 6b9cc0d59a2de3fa8e781cf455f292aebf5b8658
Author: Vadim Ogievetsky 
AuthorDate: Mon Oct 28 10:37:56 2024 -0700

fix
---
 .../src/components/segment-timeline/chart-axis.tsx |   2 +-
 .../segment-timeline/segment-bar-chart-render.scss |  21 +++
 .../segment-timeline/segment-bar-chart-render.tsx  | 152 -
 .../segment-timeline/segment-bar-chart.tsx |  24 ++--
 web-console/src/utils/general.tsx  |   9 --
 5 files changed, 149 insertions(+), 59 deletions(-)

diff --git a/web-console/src/components/segment-timeline/chart-axis.tsx 
b/web-console/src/components/segment-timeline/chart-axis.tsx
index 0e48e10fde8..b8ee4e9cbb1 100644
--- a/web-console/src/components/segment-timeline/chart-axis.tsx
+++ b/web-console/src/components/segment-timeline/chart-axis.tsx
@@ -20,9 +20,9 @@ import type { Axis } from 'd3-axis';
 import { select } from 'd3-selection';
 
 interface ChartAxisProps {
+  className?: string;
   transform?: string;
   axis: Axis;
-  className?: string;
 }
 
 export const ChartAxis = function ChartAxis(props: ChartAxisProps) {
diff --git 
a/web-console/src/components/segment-timeline/segment-bar-chart-render.scss 
b/web-console/src/components/segment-timeline/segment-bar-chart-render.scss
index 9cd7742e851..a30ee800f0a 100644
--- a/web-console/src/components/segment-timeline/segment-bar-chart-render.scss
+++ b/web-console/src/components/segment-timeline/segment-bar-chart-render.scss
@@ -50,6 +50,27 @@
   stroke-width: 1px;
 }
 
+.shifter {
+  fill: white;
+  fill-opacity: 0.2;
+  filter: blur(1px);
+}
+
+.time-shift-indicator {
+  fill: white;
+  fill-opacity: 0.001;
+  cursor: grab;
+
+  &:hover {
+fill-opacity: 0.1;
+  }
+
+  &.shifting {
+fill-opacity: 0.2;
+cursor: grabbing;
+  }
+}
+
 .gridline-x {
   line {
 stroke-dasharray: 5, 5;
diff --git 
a/web-console/src/components/segment-timeline/segment-bar-chart-render.tsx 
b/web-console/src/components/segment-timeline/segment-bar-chart-render.tsx
index 4c17c5d44b1..f1e67c9665a 100644
--- a/web-console/src/components/segment-timeline/segment-bar-chart-render.tsx
+++ b/web-console/src/components/segment-timeline/segment-bar-chart-render.tsx
@@ -17,14 +17,24 @@
  */
 
 import type { NonNullDateRange } from '@blueprintjs/datetime';
+import classNames from 'classnames';
 import { max } from 'd3-array';
 import { axisBottom, axisLeft } from 'd3-axis';
-import { scaleLinear, scaleUtc } from 'd3-scale';
+import { scaleLinear, scaleOrdinal, scaleUtc } from 'd3-scale';
 import type React from 'react';
-import { useRef, useState } from 'react';
+import { useMemo, useRef, useState } from 'react';
 
 import { useGlobalEventListener } from '../../hooks';
-import { ceilDay, floorDay, formatBytes, formatInteger } from '../../utils';
+import {
+  capitalizeFirst,
+  ceilDay,
+  clamp,
+  floorDay,
+  formatByteRate,
+  formatBytes,
+  formatInteger,
+  formatNumber,
+} from '../../utils';
 import type { Margin, Stage } from '../../utils/stage';
 
 import { ChartAxis } from './chart-axis';
@@ -32,7 +42,7 @@ import type { SegmentBar, SegmentStat } from './common';
 
 import './segment-bar-chart-render.scss';
 
-const CHART_MARGIN: Margin = { top: 40, right: 5, bottom: 20, left: 10 };
+const CHART_MARGIN: Margin = { top: 40, right: 5, bottom: 20, left: 80 };
 
 const COLORS = [
   '#b33040',
@@ -53,10 +63,14 @@ const COLORS = [
   '#87606c',
 ];
 
+function offsetDateRange(dateRange: NonNullDateRange, offset: number): 
NonNullDateRange {
+  return [new Date(dateRange[0].valueOf() + offset), new 
Date(dateRange[1].valueOf() + offset)];
+}
+
 interface SegmentBarChartRenderProps {
   stage: Stage;
   dateRange: NonNullDateRange;
-  changeDateRange(newDateRange: NonNullDateRange): void;
+  changeDateRange(dateRange: NonNullDateRange): void;
   shownSegmentStat: SegmentStat;
   segmentBars: SegmentBar[];
   changeActiveDatasource(datasource: string | undefined): void;
@@ -74,13 +88,25 @@ export const SegmentBarChartRender = function 
SegmentBarChartRender(
 changeActiveDatasource,
   } = props;
   const [hoverOn, setHoverOn] = useState();
-  const [mouseDownAt, setMouseDownAt] = useState();
+  const [mouseDownAt, setMouseDownAt] = useState<
+{ time: Date; action: 'select' | 'shift' } | undefined
+  >();
   const [dragging, setDragging] = useState();
+  const [shiftOffset, setShiftOffset] = useState();
   const svgRef = useRef(null);
 
   const innerStage = stage.applyMargin(CHART_MARGIN);
 

(druid) branch segment_timeline2 created (now 224ca761175)

2024-10-28 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch segment_timeline2
in repository https://gitbox.apache.org/repos/asf/druid.git


  at 224ca761175 improve segment view

This branch includes the following new commits:

 new 22043fc67cf init refactor of segment timeline
 new d3a53716750 more cleanup
 new 52b02d9fc0e small fixes
 new 2987bea12d6 check in
 new 0314aa5697a step
 new 6b9cc0d59a2 fix
 new 224ca761175 improve segment view

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 04/07: check in

2024-10-28 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 2987bea12d64b1bcf0873707b09f63bbff0cbef3
Author: Vadim Ogievetsky 
AuthorDate: Fri Oct 25 15:03:53 2024 -0700

check in
---
 .../src/components/rule-editor/rule-editor.tsx |   4 +-
 .../src/components/segment-timeline/bar-group.tsx  |  70 ---
 .../src/components/segment-timeline/common.ts  |  34 +-
 ...ar-chart.scss => segment-bar-chart-render.scss} |   8 +-
 .../segment-timeline/segment-bar-chart-render.tsx  | 155 +
 .../segment-timeline/segment-bar-chart.scss}   |  10 +-
 .../segment-timeline/segment-bar-chart.tsx | 194 ++
 .../segment-timeline/segment-timeline.scss |  12 +-
 .../segment-timeline/segment-timeline.spec.tsx |  25 -
 .../segment-timeline/segment-timeline.tsx  | 685 -
 .../segment-timeline/stacked-bar-chart.tsx | 148 -
 .../dialogs/retention-dialog/retention-dialog.tsx  |   2 +-
 web-console/src/druid-models/index.ts  |   1 +
 .../{utils => druid-models/load-rule}/load-rule.ts |   2 +-
 .../{views/explore-view/models => utils}/stage.ts  |  14 +
 .../views/datasources-view/datasources-view.tsx|   5 +-
 .../components/module-pane/module-pane.tsx |   3 +-
 web-console/src/views/explore-view/models/index.ts |   1 -
 .../module-repository/module-repository.ts |   3 +-
 19 files changed, 520 insertions(+), 856 deletions(-)

diff --git a/web-console/src/components/rule-editor/rule-editor.tsx 
b/web-console/src/components/rule-editor/rule-editor.tsx
index c5dfb24ddf0..0181e4341ba 100644
--- a/web-console/src/components/rule-editor/rule-editor.tsx
+++ b/web-console/src/components/rule-editor/rule-editor.tsx
@@ -30,9 +30,9 @@ import {
 import { IconNames } from '@blueprintjs/icons';
 import React, { useState } from 'react';
 
+import type { Rule } from '../../druid-models';
+import { RuleUtil } from '../../druid-models';
 import { durationSanitizer } from '../../utils';
-import type { Rule } from '../../utils/load-rule';
-import { RuleUtil } from '../../utils/load-rule';
 import { SuggestibleInput } from '../suggestible-input/suggestible-input';
 
 import './rule-editor.scss';
diff --git a/web-console/src/components/segment-timeline/bar-group.tsx 
b/web-console/src/components/segment-timeline/bar-group.tsx
deleted file mode 100644
index 3c61859115a..000
--- a/web-console/src/components/segment-timeline/bar-group.tsx
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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.
- */
-
-import type { AxisScale } from 'd3-axis';
-import React from 'react';
-
-import type { BarUnitData, HoveredBarInfo } from './common';
-
-interface BarGroupProps {
-  dataToRender: BarUnitData[];
-  changeActiveDatasource: (dataSource: string) => void;
-  xScale: AxisScale;
-  yScale: AxisScale;
-  barWidth: number;
-  onHoverBar: (e: HoveredBarInfo) => void;
-}
-
-export class BarGroup extends React.Component {
-  render() {
-const { dataToRender, changeActiveDatasource, xScale, yScale, onHoverBar, 
barWidth } =
-  this.props;
-if (dataToRender === undefined) return null;
-
-return dataToRender.map((entry: BarUnitData, i: number) => {
-  const y0 = yScale(entry.y0 || 0) || 0;
-  const x = xScale(new Date(entry.x + 'T00:00:00Z'));
-  if (typeof x === 'undefined') return;
-
-  const y = yScale((entry.y0 || 0) + entry.y) || 0;
-  const height = Math.max(y0 - y, 0);
-  const barInfo: HoveredBarInfo = {
-xCoordinate: x,
-yCoordinate: y,
-height,
-datasource: entry.datasource,
-xValue: entry.x,
-yValue: entry.y,
-dailySize: entry.dailySize,
-  };
-  return (
- changeActiveDatasource(entry.datasource)}
-  onMouseOver={() => onHoverBar(barInfo)}
-/>
-  );
-});
-  }
-}
diff --git a/web-console/src/components/segment-timeline/co

(druid) 02/07: more cleanup

2024-10-28 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit d3a537167500ebf7f9ab8aec2df29332163d8230
Author: Vadim Ogievetsky 
AuthorDate: Wed Oct 23 11:35:36 2024 -0700

more cleanup
---
 .../segment-timeline/segment-timeline.scss | 30 
 .../segment-timeline/segment-timeline.tsx  | 41 +-
 .../views/datasources-view/datasources-view.scss   |  2 +-
 .../views/datasources-view/datasources-view.tsx|  1 +
 .../src/views/segments-view/segments-view.scss |  2 +-
 .../src/views/segments-view/segments-view.tsx  |  1 +
 6 files changed, 43 insertions(+), 34 deletions(-)

diff --git a/web-console/src/components/segment-timeline/segment-timeline.scss 
b/web-console/src/components/segment-timeline/segment-timeline.scss
index 24ee569ad3a..f739277bea7 100644
--- a/web-console/src/components/segment-timeline/segment-timeline.scss
+++ b/web-console/src/components/segment-timeline/segment-timeline.scss
@@ -19,14 +19,6 @@
 @import '../../variables';
 
 .segment-timeline {
-  display: grid;
-  grid-template-columns: 1fr 240px;
-  gap: 8px;
-
-  .loader {
-width: 85%;
-  }
-
   .loading-error {
 position: fixed;
 top: 50%;
@@ -34,15 +26,23 @@
 transform: translate(-50%, -50%);
   }
 
-  .no-data-text {
-position: absolute;
-left: 30vw;
-top: 15vh;
-font-size: 20px;
-  }
-
   .side-control {
 @include card-like;
 padding: 10px;
   }
+
+  .stacked-bar-chart {
+height: 100%;
+  }
+
+  .empty-placeholder {
+height: 100%;
+
+.no-data-text {
+  position: absolute;
+  left: 30vw;
+  top: 15vh;
+  font-size: 20px;
+}
+  }
 }
diff --git a/web-console/src/components/segment-timeline/segment-timeline.tsx 
b/web-console/src/components/segment-timeline/segment-timeline.tsx
index f59a59e2399..56f6801b426 100644
--- a/web-console/src/components/segment-timeline/segment-timeline.tsx
+++ b/web-console/src/components/segment-timeline/segment-timeline.tsx
@@ -16,7 +16,14 @@
  * limitations under the License.
  */
 
-import { Button, FormGroup, MenuItem, ResizeSensor, SegmentedControl } from 
'@blueprintjs/core';
+import {
+  Button,
+  FormGroup,
+  MenuItem,
+  ResizeSensor,
+  SegmentedControl,
+  Tag,
+} from '@blueprintjs/core';
 import type { DateRange, NonNullDateRange } from '@blueprintjs/datetime';
 import { DateRangeInput3 } from '@blueprintjs/datetime2';
 import { IconNames } from '@blueprintjs/icons';
@@ -39,6 +46,7 @@ import {
   utcToLocalDateRange,
 } from '../../utils';
 import { Loader } from '../loader/loader';
+import { SplitterLayout } from '../splitter-layout/splitter-layout';
 
 import type { BarUnitData, SegmentStat } from './common';
 import { StackedBarChart } from './stacked-bar-chart';
@@ -442,16 +450,12 @@ ORDER BY "start" DESC`;
 } = this.state;
 
 if (loading) {
-  return (
-
-  
-
-  );
+  return ;
 }
 
 if (error) {
   return (
-
+
   Error when loading data: 
{error.message}
 
   );
@@ -459,7 +463,7 @@ ORDER BY "start" DESC`;
 
 if (xScale === null || yScale === null) {
   return (
-
+
   Error when calculating scales
 
   );
@@ -467,7 +471,7 @@ ORDER BY "start" DESC`;
 
 if (data![activeSegmentStat].length === 0) {
   return (
-
+
   There are no segments for the 
selected interval
 
   );
@@ -478,9 +482,9 @@ ORDER BY "start" DESC`;
   data![activeSegmentStat].every((d: any) => d[activeDatasource] === 
undefined)
 ) {
   return (
-
+
   
-No data available for {activeDatasource}
+No data available for {activeDatasource}
   
 
   );
@@ -525,7 +529,7 @@ ORDER BY "start" DESC`;
   if (exactMatch) {
 return normalizedTitle === normalizedQuery;
   } else {
-return ` ${normalizedTitle}`.includes(normalizedQuery);
+return normalizedTitle.includes(normalizedQuery);
   }
 };
 
@@ -533,9 +537,7 @@ ORDER BY "start" DESC`;
   val,
   { handleClick, handleFocus, modifiers },
 ) => {
-  if (!modifiers.matchesPredicate) {
-return null;
-  }
+  if (!modifiers.matchesPredicate) return null;
   return (
 
+  
 {this.renderStackedBarChart()}
 
   
@@ -616,7 +623,7 @@ ORDER BY "start" DESC`;
 
   
 
-  
+  
 );
   }
 }
diff --git a/web-console/src/views/datasources-view/datasources-view.scss 
b/web-console/src/views/datasources-view/datasources-view.scss
index d5e3548d837

(druid) 05/07: step

2024-10-28 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 0314aa5697a3af213169907a38bf6cf0fa8a15b7
Author: Vadim Ogievetsky 
AuthorDate: Sun Oct 27 14:57:54 2024 -0700

step
---
 web-console/package-lock.json  |  12 ++
 web-console/package.json   |   1 +
 .../src/components/segment-timeline/chart-axis.tsx |   5 +-
 .../src/components/segment-timeline/common.ts  |  29 +++-
 .../segment-timeline/segment-bar-chart-render.scss |   6 +
 .../segment-timeline/segment-bar-chart-render.tsx  | 167 +++--
 .../segment-timeline/segment-bar-chart.tsx | 122 +++
 .../segment-timeline/segment-timeline.tsx  |   7 +-
 web-console/src/utils/date.ts  |  82 ++
 web-console/src/utils/general.tsx  |   9 ++
 .../time-menu-items/time-menu-items.tsx|  64 ++--
 11 files changed, 364 insertions(+), 140 deletions(-)

diff --git a/web-console/package-lock.json b/web-console/package-lock.json
index 95768117648..4abbd266e0c 100644
--- a/web-console/package-lock.json
+++ b/web-console/package-lock.json
@@ -15,6 +15,7 @@
 "@blueprintjs/icons": "^5.13.0",
 "@blueprintjs/select": "^5.2.5",
 "@druid-toolkit/query": "^0.22.23",
+"@flatten-js/interval-tree": "^1.1.3",
 "@fontsource/open-sans": "^5.0.30",
 "ace-builds": "~1.5.3",
 "axios": "^1.7.7",
@@ -2385,6 +2386,12 @@
 "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
   }
 },
+"node_modules/@flatten-js/interval-tree": {
+  "version": "1.1.3",
+  "resolved": 
"https://registry.npmjs.org/@flatten-js/interval-tree/-/interval-tree-1.1.3.tgz";,
+  "integrity": 
"sha512-xhFWUBoHJFF77cJO1D6REjdgJEMRf2Y2Z+eKEPav8evGKcLSnj1ud5pLXQSbGuxF3VSvT1rWhMfVpXEKJLTL+A==",
+  "license": "MIT"
+},
 "node_modules/@fontsource/open-sans": {
   "version": "5.1.0",
   "resolved": 
"https://registry.npmjs.org/@fontsource/open-sans/-/open-sans-5.1.0.tgz";,
@@ -19782,6 +19789,11 @@
 "levn": "^0.4.1"
   }
 },
+"@flatten-js/interval-tree": {
+  "version": "1.1.3",
+  "resolved": 
"https://registry.npmjs.org/@flatten-js/interval-tree/-/interval-tree-1.1.3.tgz";,
+  "integrity": 
"sha512-xhFWUBoHJFF77cJO1D6REjdgJEMRf2Y2Z+eKEPav8evGKcLSnj1ud5pLXQSbGuxF3VSvT1rWhMfVpXEKJLTL+A=="
+},
 "@fontsource/open-sans": {
   "version": "5.1.0",
   "resolved": 
"https://registry.npmjs.org/@fontsource/open-sans/-/open-sans-5.1.0.tgz";,
diff --git a/web-console/package.json b/web-console/package.json
index 1e76234841a..2580151bac1 100644
--- a/web-console/package.json
+++ b/web-console/package.json
@@ -56,6 +56,7 @@
 "@blueprintjs/icons": "^5.13.0",
 "@blueprintjs/select": "^5.2.5",
 "@druid-toolkit/query": "^0.22.23",
+"@flatten-js/interval-tree": "^1.1.3",
 "@fontsource/open-sans": "^5.0.30",
 "ace-builds": "~1.5.3",
 "axios": "^1.7.7",
diff --git a/web-console/src/components/segment-timeline/chart-axis.tsx 
b/web-console/src/components/segment-timeline/chart-axis.tsx
index 18dc7d3e076..0e48e10fde8 100644
--- a/web-console/src/components/segment-timeline/chart-axis.tsx
+++ b/web-console/src/components/segment-timeline/chart-axis.tsx
@@ -18,7 +18,6 @@
 
 import type { Axis } from 'd3-axis';
 import { select } from 'd3-selection';
-import React from 'react';
 
 interface ChartAxisProps {
   transform?: string;
@@ -26,7 +25,7 @@ interface ChartAxisProps {
   className?: string;
 }
 
-export const ChartAxis = React.memo(function ChartAxis(props: ChartAxisProps) {
+export const ChartAxis = function ChartAxis(props: ChartAxisProps) {
   const { transform, axis, className } = props;
   return (
  select(node).call(axis as any)}
 />
   );
-});
+};
diff --git a/web-console/src/components/segment-timeline/common.ts 
b/web-console/src/components/segment-timeline/common.ts
index 10a29751721..a1907846f29 100644
--- a/web-console/src/components/segment-timeline/common.ts
+++ b/web-console/src/components/segment-timeline/common.ts
@@ -16,19 +16,36 @@
  * limitations under the License.
  */
 
+import { sum } from 'd3-array';
+
 export type SegmentStat = 'count&#

(druid) 01/07: init refactor of segment timeline

2024-10-28 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 22043fc67cff036441dc5d22eefe565ce8319b0e
Author: Vadim Ogievetsky 
AuthorDate: Tue Oct 22 14:34:57 2024 -0700

init refactor of segment timeline
---
 web-console/lib/keywords.ts|   8 ++
 .../src/components/segment-timeline/bar-group.tsx  |  19 ++--
 .../components/segment-timeline/bar-unit.spec.tsx  |  33 ---
 .../src/components/segment-timeline/chart-axis.tsx |   7 +-
 .../segment-timeline/{bar-unit.tsx => common.ts}   |  45 -
 .../segment-timeline/segment-timeline.scss |   8 +-
 .../segment-timeline/segment-timeline.tsx  |  83 ++--
 .../segment-timeline/stacked-bar-chart.tsx | 104 -
 .../views/datasources-view/datasources-view.tsx|   2 +-
 9 files changed, 119 insertions(+), 190 deletions(-)

diff --git a/web-console/lib/keywords.ts b/web-console/lib/keywords.ts
index 06d7ccdcc94..5985ae0a6aa 100644
--- a/web-console/lib/keywords.ts
+++ b/web-console/lib/keywords.ts
@@ -100,15 +100,23 @@ export const SQL_EXPRESSION_PARTS = [
   'TRAILING',
   'EPOCH',
   'SECOND',
+  'SECONDS',
   'MINUTE',
+  'MINUTES',
   'HOUR',
+  'HOURS',
   'DAY',
+  'DAYS',
   'DOW',
   'DOY',
   'WEEK',
+  'WEEKS',
   'MONTH',
+  'MONTHS',
   'QUARTER',
+  'QUARTERS',
   'YEAR',
+  'YEARS',
   'TIMESTAMP',
   'INTERVAL',
   'CSV',
diff --git a/web-console/src/components/segment-timeline/bar-group.tsx 
b/web-console/src/components/segment-timeline/bar-group.tsx
index d0cf867e2b2..3c61859115a 100644
--- a/web-console/src/components/segment-timeline/bar-group.tsx
+++ b/web-console/src/components/segment-timeline/bar-group.tsx
@@ -19,26 +19,18 @@
 import type { AxisScale } from 'd3-axis';
 import React from 'react';
 
-import { BarUnit } from './bar-unit';
-import type { BarUnitData, HoveredBarInfo } from './stacked-bar-chart';
+import type { BarUnitData, HoveredBarInfo } from './common';
 
 interface BarGroupProps {
   dataToRender: BarUnitData[];
   changeActiveDatasource: (dataSource: string) => void;
-  formatTick: (e: number) => string;
   xScale: AxisScale;
   yScale: AxisScale;
   barWidth: number;
-  onHoverBar?: (e: any) => void;
-  offHoverBar?: () => void;
-  hoverOn?: HoveredBarInfo | null;
+  onHoverBar: (e: HoveredBarInfo) => void;
 }
 
 export class BarGroup extends React.Component {
-  shouldComponentUpdate(nextProps: BarGroupProps): boolean {
-return nextProps.hoverOn === this.props.hoverOn;
-  }
-
   render() {
 const { dataToRender, changeActiveDatasource, xScale, yScale, onHoverBar, 
barWidth } =
   this.props;
@@ -47,6 +39,8 @@ export class BarGroup extends React.Component {
 return dataToRender.map((entry: BarUnitData, i: number) => {
   const y0 = yScale(entry.y0 || 0) || 0;
   const x = xScale(new Date(entry.x + 'T00:00:00Z'));
+  if (typeof x === 'undefined') return;
+
   const y = yScale((entry.y0 || 0) + entry.y) || 0;
   const height = Math.max(y0 - y, 0);
   const barInfo: HoveredBarInfo = {
@@ -59,15 +53,16 @@ export class BarGroup extends 
React.Component {
 dailySize: entry.dailySize,
   };
   return (
- changeActiveDatasource(entry.datasource)}
-  onHover={() => onHoverBar && onHoverBar(barInfo)}
+  onMouseOver={() => onHoverBar(barInfo)}
 />
   );
 });
diff --git a/web-console/src/components/segment-timeline/bar-unit.spec.tsx 
b/web-console/src/components/segment-timeline/bar-unit.spec.tsx
deleted file mode 100644
index d5926dcf69f..000
--- a/web-console/src/components/segment-timeline/bar-unit.spec.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.
- */
-
-import { ren

(druid) branch master updated: Delta snapshots are zero-indexed, so remove zeroMeansUndefined: true. (#17367)

2024-10-17 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 0e6c388b7ff Delta snapshots are zero-indexed, so remove 
zeroMeansUndefined: true. (#17367)
0e6c388b7ff is described below

commit 0e6c388b7ffac4af710bf7499b03cf4efa26bff8
Author: Abhishek Radhakrishnan 
AuthorDate: Thu Oct 17 08:33:10 2024 -0700

Delta snapshots are zero-indexed, so remove zeroMeansUndefined: true. 
(#17367)

This lets users filter by snapshotVersion: 0. Previously, zeroMeanUndefined
was set to true, so it would silently default to the latest snapshot.
---
 web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx | 1 -
 web-console/src/druid-models/input-source/input-source.tsx | 1 -
 2 files changed, 2 deletions(-)

diff --git a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx 
b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx
index 09ad1d73921..109972e6ba0 100644
--- a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx
+++ b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx
@@ -1115,7 +1115,6 @@ export function getIoConfigFormFields(ingestionComboType: 
IngestionComboType): F
   label: 'Delta snapshot version',
   type: 'number',
   placeholder: '(latest)',
-  zeroMeansUndefined: true,
   info: (
 <>
   The snapshot version to read from the Delta table. By default, 
the latest snapshot is
diff --git a/web-console/src/druid-models/input-source/input-source.tsx 
b/web-console/src/druid-models/input-source/input-source.tsx
index 6ad3b8e0a1a..dc793ce6456 100644
--- a/web-console/src/druid-models/input-source/input-source.tsx
+++ b/web-console/src/druid-models/input-source/input-source.tsx
@@ -667,7 +667,6 @@ export const INPUT_SOURCE_FIELDS: Field[] = [
 label: 'Delta snapshot version',
 type: 'number',
 placeholder: '(latest)',
-zeroMeansUndefined: true,
 defined: typeIsKnown(KNOWN_TYPES, 'delta'),
 info: (
   <>


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: update to node 20 (#17363)

2024-10-16 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 26e2ca66d76 update to node 20 (#17363)
26e2ca66d76 is described below

commit 26e2ca66d767acd17efde9eb37e3168b20d3c4e8
Author: Vadim Ogievetsky 
AuthorDate: Wed Oct 16 13:15:10 2024 -0700

update to node 20 (#17363)
---
 web-console/package-lock.json | 32 +---
 web-console/package.json  |  6 +++---
 web-console/pom.xml   |  4 ++--
 3 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/web-console/package-lock.json b/web-console/package-lock.json
index 123ed80949f..e84c5eb2f19 100644
--- a/web-console/package-lock.json
+++ b/web-console/package-lock.json
@@ -121,7 +121,7 @@
 "webpack-dev-server": "^4.15.1"
   },
   "engines": {
-"node": ">=16"
+"node": ">=20"
   }
 },
 "node_modules/@ampproject/remapping": {
@@ -4869,10 +4869,11 @@
   }
 },
 "node_modules/cookie": {
-  "version": "0.6.0",
-  "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz";,
-  "integrity": 
"sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==",
+  "version": "0.7.1",
+  "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz";,
+  "integrity": 
"sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
   "dev": true,
+  "license": "MIT",
   "engines": {
 "node": ">= 0.6"
   }
@@ -7095,17 +7096,18 @@
   }
 },
 "node_modules/express": {
-  "version": "4.21.0",
-  "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz";,
-  "integrity": 
"sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==",
+  "version": "4.21.1",
+  "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz";,
+  "integrity": 
"sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==",
   "dev": true,
+  "license": "MIT",
   "dependencies": {
 "accepts": "~1.3.8",
 "array-flatten": "1.1.1",
 "body-parser": "1.20.3",
 "content-disposition": "0.5.4",
 "content-type": "~1.0.4",
-"cookie": "0.6.0",
+"cookie": "0.7.1",
 "cookie-signature": "1.0.6",
 "debug": "2.6.9",
 "depd": "2.0.0",
@@ -22136,9 +22138,9 @@
   }
 },
 "cookie": {
-  "version": "0.6.0",
-  "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz";,
-  "integrity": 
"sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==",
+  "version": "0.7.1",
+  "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz";,
+  "integrity": 
"sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
   "dev": true
 },
 "cookie-signature": {
@@ -23816,9 +23818,9 @@
   }
 },
 "express": {
-  "version": "4.21.0",
-  "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz";,
-  "integrity": 
"sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==",
+  "version": "4.21.1",
+  "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz";,
+  "integrity": 
"sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==",
   "dev": true,
   "requires": {
 "accepts": "~1.3.8",
@@ -23826,7 +23828,7 @@
 "body-parser": "1.20.3",
 "content-disposition": "0.5.4",
 "content-type": "~1.0.4",
-"cookie": "0.6.0",
+"cookie": "0.7.1",
 "cookie-signature": "1.0.6",
 "debug": "2.6.9",
 "depd": "2.0.0",
diff --git a/web-console/package.json b/web-console/package.json
index abb199fac64..a44d94f275a 100644
--- a/web-console/package.json
+++ b/web-console/package.json
@@ -49,11 +49,11 @@
 "start": "webpack serve"
   },
   "engines": {
-"node": ">=16"
+"node": ">=20"
   },
   "volta": {
-"node": "16.17.0",
-"npm": "8.15.0"
+"node": "20.9.0",
+"npm": "10.9.0"
   },
   "browserslist": [
 "> 1% and supports es6",
diff --git a/web-console/pom.xml b/web-console/pom.xml
index 8571e07f510..60543703e67 100644
--- a/web-console/pom.xml
+++ b/web-console/pom.xml
@@ -34,8 +34,8 @@
   
 
${project.build.directory}/resources
 false  
-v16.17.0
-8.15.0
+v20.9.0
+10.9.0
   
 
   


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: Web console: add expectedLoadTimeMillis (#17359)

2024-10-16 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 877784e5fd1 Web console: add expectedLoadTimeMillis (#17359)
877784e5fd1 is described below

commit 877784e5fd1b26fb54b8d7eaefadbc2434dd3b3d
Author: Vadim Ogievetsky 
AuthorDate: Wed Oct 16 13:14:27 2024 -0700

Web console: add expectedLoadTimeMillis (#17359)

* add expectedLoadTimeMillis

* make spec cleaning less agro

* more cleanup
---
 .../segment-timeline/segment-timeline.tsx  |  16 +-
 web-console/src/components/show-json/show-json.tsx |   4 +-
 web-console/src/components/show-log/show-log.tsx   |   3 +-
 .../supervisor-history-panel.tsx   |   3 +-
 .../compaction-dynamic-config-dialog.tsx   |   6 +-
 .../compaction-history-dialog.tsx  |   3 +-
 .../coordinator-dynamic-config-dialog.tsx  |  10 +-
 .../datasource-columns-table.tsx   |  11 +-
 .../lookup-values-table/lookup-values-table.tsx|  11 +-
 .../overlord-dynamic-config-dialog.tsx |  10 +-
 .../dialogs/retention-dialog/retention-dialog.tsx  |  18 +-
 .../src/dialogs/status-dialog/status-dialog.tsx|   4 +-
 .../supervisor-reset-offsets-dialog.tsx|   3 +-
 .../supervisor-statistics-table.tsx|   4 +-
 .../druid-models/ingestion-spec/ingestion-spec.tsx |  37 ++-
 web-console/src/utils/druid-query.ts   |   7 +-
 .../views/datasources-view/datasources-view.tsx|   9 +-
 .../datasources-card/datasources-card.tsx  |  17 +-
 .../views/home-view/lookups-card/lookups-card.tsx  |   8 +-
 .../home-view/segments-card/segments-card.tsx  |  16 +-
 .../home-view/services-card/services-card.tsx  |  17 +-
 .../views/home-view/status-card/status-card.tsx|   8 +-
 .../supervisors-card/supervisors-card.tsx  |  13 +-
 .../src/views/home-view/tasks-card/tasks-card.tsx  |  23 +-
 .../src/views/lookups-view/lookups-view.tsx|   7 +-
 .../src/views/segments-view/segments-view.tsx  |   7 +-
 .../src/views/services-view/services-view.tsx  | 271 +++--
 .../schema-step/schema-step.tsx|  16 +-
 web-console/src/views/tasks-view/tasks-view.tsx|  13 +-
 .../current-dart-panel/current-dart-panel.tsx  |   4 +-
 .../execution-details-pane-loader.tsx  |   6 +-
 .../execution-stages-pane-loader.tsx   |   6 +-
 .../explain-dialog/explain-dialog.tsx  |  10 +-
 .../input-format-step/input-format-step.tsx|   4 +-
 .../recent-query-task-panel.tsx|  11 +-
 .../src/views/workbench-view/workbench-view.tsx|  11 +-
 36 files changed, 373 insertions(+), 254 deletions(-)

diff --git a/web-console/src/components/segment-timeline/segment-timeline.tsx 
b/web-console/src/components/segment-timeline/segment-timeline.tsx
index 0ea19555bfc..8aee0c66d47 100644
--- a/web-console/src/components/segment-timeline/segment-timeline.tsx
+++ b/web-console/src/components/segment-timeline/segment-timeline.tsx
@@ -269,18 +269,23 @@ ORDER BY "start" DESC`;
 };
 
 this.dataQueryManager = new QueryManager({
-  processQuery: async ({ capabilities, dateRange }) => {
+  processQuery: async ({ capabilities, dateRange }, cancelToken) => {
 let intervals: IntervalRow[];
 let datasources: string[];
 if (capabilities.hasSql()) {
-  intervals = await queryDruidSql({
-query: SegmentTimeline.getSqlQuery(dateRange),
-  });
+  intervals = await queryDruidSql(
+{
+  query: SegmentTimeline.getSqlQuery(dateRange),
+},
+cancelToken,
+  );
   datasources = uniq(intervals.map(r => r.datasource).sort());
 } else if (capabilities.hasCoordinatorAccess()) {
   const startIso = dateRange[0].toISOString();
 
-  datasources = (await 
Api.instance.get(`/druid/coordinator/v1/datasources`)).data;
+  datasources = (
+await Api.instance.get(`/druid/coordinator/v1/datasources`, { 
cancelToken })
+  ).data;
   intervals = (
 await Promise.all(
   datasources.map(async datasource => {
@@ -289,6 +294,7 @@ ORDER BY "start" DESC`;
 `/druid/coordinator/v1/datasources/${Api.encodePath(
   datasource,
 )}/intervals?simple`,
+{ cancelToken },
   )
 ).data;
 
diff --git a/web-console/src/components/show-json/show-json.tsx 
b/web-console/src/components/show-json/show-json.tsx
index 8f48a2a98b9..e122be709c8 100644
--- a/web-console/src/components/show-json/show-json.tsx
+++ b/web-console/src/components/show-json/show-json.tsx
@@ -39,

(druid) branch master updated: Web console: fix progress indication for table input (#17334)

2024-10-16 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 8ddb316e683 Web console: fix progress indication for table input 
(#17334)
8ddb316e683 is described below

commit 8ddb316e683f1c0d442a3f19c1bb51f4f6563925
Author: Vadim Ogievetsky 
AuthorDate: Wed Oct 16 13:14:11 2024 -0700

Web console: fix progress indication for table input (#17334)

* fix porgress indication for table input

* fix snapshot
---
 web-console/src/druid-models/stages/stages.spec.ts |  3 +-
 web-console/src/druid-models/stages/stages.ts  | 10 +++---
 web-console/src/react-table/react-table-extra.scss |  5 +++
 .../current-dart-panel/current-dart-panel.tsx  |  2 +-
 .../execution-stages-pane.spec.tsx.snap|  4 +--
 .../execution-stages-pane.scss |  7 +
 .../execution-stages-pane.tsx  | 36 --
 .../recent-query-task-panel.tsx|  4 ++-
 8 files changed, 51 insertions(+), 20 deletions(-)

diff --git a/web-console/src/druid-models/stages/stages.spec.ts 
b/web-console/src/druid-models/stages/stages.spec.ts
index 2c0a6f5ec18..0cc49486ba6 100644
--- a/web-console/src/druid-models/stages/stages.spec.ts
+++ b/web-console/src/druid-models/stages/stages.spec.ts
@@ -32,7 +32,7 @@ describe('aggregateSortProgressCounters', () => {
 },
 {
   type: 'sortProgress',
-  totalMergingLevels: 4,
+  totalMergingLevels: -1,
   levelToTotalBatches: { 0: 2, 1: 4, 2: 6, 3: 5 },
   levelToMergedBatches: { 0: 2, 1: 4, 2: 6, 3: 5 },
   totalMergersForUltimateLevel: 1,
@@ -41,7 +41,6 @@ describe('aggregateSortProgressCounters', () => {
 ).toEqual({
   totalMergingLevels: {
 '2': 1,
-'4': 1,
   },
   levelToBatches: {
 '0': {
diff --git a/web-console/src/druid-models/stages/stages.ts 
b/web-console/src/druid-models/stages/stages.ts
index eab5d2f..5f89149dd37 100644
--- a/web-console/src/druid-models/stages/stages.ts
+++ b/web-console/src/druid-models/stages/stages.ts
@@ -200,7 +200,10 @@ export function aggregateSortProgressCounters(
   sortProgressCounters: SortProgressCounter[],
 ): AggregatedSortProgress {
   return {
-totalMergingLevels: countBy(sortProgressCounters, c => 
c.totalMergingLevels),
+totalMergingLevels: countBy(
+  sortProgressCounters.filter(c => c.totalMergingLevels >= 0),
+  c => c.totalMergingLevels,
+),
 levelToBatches: groupByAsMap(
   sortProgressCounters.flatMap(c =>
 Object.entries(c.levelToMergedBatches).map(([level, merged]) => [
@@ -430,9 +433,8 @@ export class Stages {
 if (inputFileCount) {
   // If we know how many files there are base the progress on how many 
files were read
   return (
-sum(input, (input, i) =>
-  input.type === 'external' ? this.getTotalCounterForStage(stage, 
`input${i}`, 'files') : 0,
-) / inputFileCount
+sum(input, (_, i) => this.getTotalCounterForStage(stage, `input${i}`, 
'files')) /
+inputFileCount
   );
 } else {
   // Otherwise, base it on the stage input divided by the output of all 
non-broadcast input stages,
diff --git a/web-console/src/react-table/react-table-extra.scss 
b/web-console/src/react-table/react-table-extra.scss
index e1c65d5143f..534b417298f 100644
--- a/web-console/src/react-table/react-table-extra.scss
+++ b/web-console/src/react-table/react-table-extra.scss
@@ -31,6 +31,11 @@
 padding: 0;
   }
 }
+
+.rt-th.wrapped,
+.rt-td.wrapped {
+  white-space: normal;
+}
   }
 
   &.padded-header .rt-thead .rt-th {
diff --git 
a/web-console/src/views/workbench-view/current-dart-panel/current-dart-panel.tsx
 
b/web-console/src/views/workbench-view/current-dart-panel/current-dart-panel.tsx
index aae00206942..5b4ac4f316f 100644
--- 
a/web-console/src/views/workbench-view/current-dart-panel/current-dart-panel.tsx
+++ 
b/web-console/src/views/workbench-view/current-dart-panel/current-dart-panel.tsx
@@ -134,7 +134,7 @@ export const CurrentDartPanel = React.memo(function 
CurrentViberPanel(
 const anonymous = w.identity === 'allowAll' && w.authenticator === 
'allowAll';
 return (
   
-
+ setShowSql(w.sql)}>
   
  d.index,
-width: 100,
+width: 95,
 Cell({ value }) {
   const taskId = `${execution.id}-worker${value}_0`;
   return (
@@ -270,7 +270,8 @@ export const ExecutionStagesPane = React.memo(function 
ExecutionStagesPane(
  

(druid) branch master updated: Remove EOL file-loader dependency (#17346)

2024-10-16 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new c1fe1ac8983 Remove EOL file-loader dependency (#17346)
c1fe1ac8983 is described below

commit c1fe1ac89831f8ed06f7e61fab86d81fdd88f355
Author: Suraj Goel 
AuthorDate: Wed Oct 16 23:41:06 2024 +0530

Remove EOL file-loader dependency (#17346)
---
 web-console/package-lock.json | 76 ---
 web-console/package.json  |  1 -
 web-console/webpack.config.js |  8 ++---
 3 files changed, 3 insertions(+), 82 deletions(-)

diff --git a/web-console/package-lock.json b/web-console/package-lock.json
index 14bb87791e8..123ed80949f 100644
--- a/web-console/package-lock.json
+++ b/web-console/package-lock.json
@@ -94,7 +94,6 @@
 "eslint-plugin-simple-import-sort": "^7.0.0",
 "eslint-plugin-unicorn": "^38.0.0",
 "eslint-plugin-unused-imports": "^2.0.0",
-"file-loader": "^6.2.0",
 "fs-extra": "^8.1.0",
 "identity-obj-proxy": "^3.0.0",
 "jest": "^29.7.0",
@@ -7287,52 +7286,6 @@
 "node": "^10.12.0 || >=12.0.0"
   }
 },
-"node_modules/file-loader": {
-  "version": "6.2.0",
-  "resolved": 
"https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz";,
-  "integrity": 
"sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==",
-  "dev": true,
-  "dependencies": {
-"loader-utils": "^2.0.0",
-"schema-utils": "^3.0.0"
-  },
-  "engines": {
-"node": ">= 10.13.0"
-  },
-  "funding": {
-"type": "opencollective",
-"url": "https://opencollective.com/webpack";
-  },
-  "peerDependencies": {
-"webpack": "^4.0.0 || ^5.0.0"
-  }
-},
-"node_modules/file-loader/node_modules/json5": {
-  "version": "2.2.3",
-  "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz";,
-  "integrity": 
"sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
-  "dev": true,
-  "bin": {
-"json5": "lib/cli.js"
-  },
-  "engines": {
-"node": ">=6"
-  }
-},
-"node_modules/file-loader/node_modules/loader-utils": {
-  "version": "2.0.4",
-  "resolved": 
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz";,
-  "integrity": 
"sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
-  "dev": true,
-  "dependencies": {
-"big.js": "^5.2.2",
-"emojis-list": "^3.0.0",
-"json5": "^2.1.2"
-  },
-  "engines": {
-"node": ">=8.9.0"
-  }
-},
 "node_modules/file-saver": {
   "version": "2.0.5",
   "resolved": 
"https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz";,
@@ -24021,35 +23974,6 @@
 "flat-cache": "^3.0.4"
   }
 },
-"file-loader": {
-  "version": "6.2.0",
-  "resolved": 
"https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz";,
-  "integrity": 
"sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==",
-  "dev": true,
-  "requires": {
-"loader-utils": "^2.0.0",
-"schema-utils": "^3.0.0"
-  },
-  "dependencies": {
-"json5": {
-  "version": "2.2.3",
-  "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz";,
-  "integrity": 
"sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
-  "dev": true
-},
-"loader-utils": {
-  "version": "2.0.4",
-  "resolved": 
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz";,
-  

(druid) branch master updated: better timing bar styling (#17295)

2024-10-08 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 4570809b4a7 better timing bar styling (#17295)
4570809b4a7 is described below

commit 4570809b4a7c868315894f3166d9a0621d276774
Author: Vadim Ogievetsky 
AuthorDate: Tue Oct 8 16:30:58 2024 -0700

better timing bar styling (#17295)
---
 .../execution-stages-pane/execution-stages-pane.scss   | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/web-console/src/views/workbench-view/execution-stages-pane/execution-stages-pane.scss
 
b/web-console/src/views/workbench-view/execution-stages-pane/execution-stages-pane.scss
index e584de3216b..b3e8d4c11e9 100644
--- 
a/web-console/src/views/workbench-view/execution-stages-pane/execution-stages-pane.scss
+++ 
b/web-console/src/views/workbench-view/execution-stages-pane/execution-stages-pane.scss
@@ -145,10 +145,11 @@
 
 .timing-bar {
   position: absolute;
-  top: 10px;
-  height: 36px;
+  top: 1px;
+  height: 3px;
+  border-radius: 2px;
   background: $druid-brand;
-  opacity: 0.15;
+  opacity: 0.8;
 }
   }
 }


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: run npm audit fix (#17290)

2024-10-08 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new a395368622f run npm audit fix (#17290)
a395368622f is described below

commit a395368622fe0d1db0e4595a21f2d299a14951bf
Author: Vadim Ogievetsky 
AuthorDate: Tue Oct 8 16:44:09 2024 -0700

run npm audit fix (#17290)
---
 web-console/package-lock.json | 1448 +
 1 file changed, 747 insertions(+), 701 deletions(-)

diff --git a/web-console/package-lock.json b/web-console/package-lock.json
index 968588e2e3e..14bb87791e8 100644
--- a/web-console/package-lock.json
+++ b/web-console/package-lock.json
@@ -2039,19 +2039,29 @@
   }
 },
 "node_modules/@jridgewell/gen-mapping": {
-  "version": "0.3.3",
-  "resolved": 
"https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz";,
-  "integrity": 
"sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
+  "version": "0.3.5",
+  "resolved": 
"https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz";,
+  "integrity": 
"sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",
   "dev": true,
   "dependencies": {
-"@jridgewell/set-array": "^1.0.1",
+"@jridgewell/set-array": "^1.2.1",
 "@jridgewell/sourcemap-codec": "^1.4.10",
-"@jridgewell/trace-mapping": "^0.3.9"
+"@jridgewell/trace-mapping": "^0.3.24"
   },
   "engines": {
 "node": ">=6.0.0"
   }
 },
+
"node_modules/@jridgewell/gen-mapping/node_modules/@jridgewell/trace-mapping": {
+  "version": "0.3.25",
+  "resolved": 
"https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz";,
+  "integrity": 
"sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
+  "dev": true,
+  "dependencies": {
+"@jridgewell/resolve-uri": "^3.1.0",
+"@jridgewell/sourcemap-codec": "^1.4.14"
+  }
+},
 "node_modules/@jridgewell/resolve-uri": {
   "version": "3.1.0",
   "resolved": 
"https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz";,
@@ -2062,22 +2072,32 @@
   }
 },
 "node_modules/@jridgewell/set-array": {
-  "version": "1.1.2",
-  "resolved": 
"https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz";,
-  "integrity": 
"sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
+  "version": "1.2.1",
+  "resolved": 
"https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz";,
+  "integrity": 
"sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
   "dev": true,
   "engines": {
 "node": ">=6.0.0"
   }
 },
 "node_modules/@jridgewell/source-map": {
-  "version": "0.3.5",
-  "resolved": 
"https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz";,
-  "integrity": 
"sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==",
+  "version": "0.3.6",
+  "resolved": 
"https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz";,
+  "integrity": 
"sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==",
   "dev": true,
   "dependencies": {
-"@jridgewell/gen-mapping": "^0.3.0",
-"@jridgewell/trace-mapping": "^0.3.9"
+"@jridgewell/gen-mapping": "^0.3.5",
+"@jridgewell/trace-mapping": "^0.3.25"
+  }
+},
+
"node_modules/@jridgewell/source-map/node_modules/@jridgewell/trace-mapping": {
+  "version": "0.3.25",
+  "resolved": 
"https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz";,
+  "integr

(druid) branch master updated: Explore view fix spin when applying defaults (#17252)

2024-10-04 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 2ffe7b177cf Explore view fix spin when applying defaults (#17252)
2ffe7b177cf is described below

commit 2ffe7b177cf9932d2d556cf4bc081cd8d8211ce3
Author: Vadim Ogievetsky 
AuthorDate: Fri Oct 4 13:02:15 2024 -0700

Explore view fix spin when applying defaults (#17252)
---
 .../components/module-pane/module-pane.tsx  |  9 +++--
 .../components/resource-pane/resource-pane.tsx  | 21 +++--
 web-console/src/views/explore-view/explore-view.tsx | 10 ++
 3 files changed, 32 insertions(+), 8 deletions(-)

diff --git 
a/web-console/src/views/explore-view/components/module-pane/module-pane.tsx 
b/web-console/src/views/explore-view/components/module-pane/module-pane.tsx
index 4e216e3ac38..b57a078ed73 100644
--- a/web-console/src/views/explore-view/components/module-pane/module-pane.tsx
+++ b/web-console/src/views/explore-view/components/module-pane/module-pane.tsx
@@ -18,7 +18,7 @@
 
 import { ResizeSensor } from '@blueprintjs/core';
 import type { QueryResult, SqlExpression, SqlQuery } from 
'@druid-toolkit/query';
-import React, { useState } from 'react';
+import React, { useMemo, useState } from 'react';
 
 import type { ParameterDefinition, QuerySource } from '../../models';
 import { effectiveParameterDefault, Stage } from '../../models';
@@ -65,6 +65,11 @@ export const ModulePane = function ModulePane(props: 
ModulePaneProps) {
 
   const module = ModuleRepository.getModule(moduleId);
 
+  const parameterValuesWithDefaults = useMemo(() => {
+if (!module) return {};
+return fillInDefaults(parameterValues, module.parameters, querySource);
+  }, [parameterValues, module, querySource]);
+
   let content: React.ReactNode;
   if (module) {
 const modelIssue = undefined; // 
AutoForm.issueWithModel(moduleTileConfig.config, module.configFields);
@@ -76,7 +81,7 @@ export const ModulePane = function ModulePane(props: 
ModulePaneProps) {
 querySource,
 where,
 setWhere,
-parameterValues: fillInDefaults(parameterValues, module.parameters, 
querySource),
+parameterValues: parameterValuesWithDefaults,
 setParameterValues,
 runSqlQuery,
   });
diff --git 
a/web-console/src/views/explore-view/components/resource-pane/resource-pane.tsx 
b/web-console/src/views/explore-view/components/resource-pane/resource-pane.tsx
index 2de75e32d86..ba21199ce62 100644
--- 
a/web-console/src/views/explore-view/components/resource-pane/resource-pane.tsx
+++ 
b/web-console/src/views/explore-view/components/resource-pane/resource-pane.tsx
@@ -44,6 +44,19 @@ import { NestedColumnDialog } from 
'./nested-column-dialog/nested-column-dialog'
 
 import './resource-pane.scss';
 
+function makeNiceTitle(name: string): string {
+  return name
+.replace(/^[ _-]+|[ _-]+$/g, '')
+.replace(/(^|[_-]+)\w/g, s => {
+  // 'hello_world-love' -> 'Hello World Love'
+  return s.replace(/[_-]+/, ' ').toUpperCase();
+})
+.replace(/[a-z0-9][A-Z]/g, s => {
+  // 'HelloWorld' -> 'Hello World'
+  return s[0] + ' ' + s[1];
+});
+}
+
 interface ColumnEditorOpenOn {
   expression?: SqlExpression;
   columnToDuplicate?: string;
@@ -99,11 +112,15 @@ export const ResourcePane = function ResourcePane(props: 
ResourcePaneProps) {
 content={
   
  applyUtil(makeNiceTitle)}
+/>
+ applyUtil(x => x.toUpperCase())}
 />
  applyUtil(x => x.toLowerCase())}
 />
   
diff --git a/web-console/src/views/explore-view/explore-view.tsx 
b/web-console/src/views/explore-view/explore-view.tsx
index 05f6ee69325..fead1b5c7b2 100644
--- a/web-console/src/views/explore-view/explore-view.tsx
+++ b/web-console/src/views/explore-view/explore-view.tsx
@@ -28,6 +28,7 @@ import copy from 'copy-to-clipboard';
 import React, { useEffect, useMemo, useRef, useState } from 'react';
 import { useStore } from 'zustand';
 
+import { Loader } from '../../components';
 import { ShowValueDialog } from 
'../../dialogs/show-value-dialog/show-value-dialog';
 import { useHashAndLocalStorageHybridState, useQueryManager } from 
'../../hooks';
 import { Api, AppToaster } from '../../singletons';
@@ -422,10 +423,9 @@ export const ExploreView = React.memo(function 
ExploreView() {
 onDropColumn={onShowColumn}
 onDropMeasure={onShowMeasure}
   >
-{querySourceState.erro

(druid) branch master updated (b9634a8613d -> d1bc369f064)

2024-10-03 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


from b9634a8613d SuperSorter: Don't set allDone if it's already set. 
(#17238)
 add d1bc369f064 Web console: Final explore QA pass (#17240)

No new revisions were added by this update.

Summary of changes:
 .../components/filter-pane/filter-pane.scss |  2 ++
 .../components/module-pane/module-pane.scss | 16 
 .../components/module-picker/module-picker.tsx  | 17 ++---
 web-console/src/views/explore-view/explore-view.tsx |  8 
 .../explore-view/module-repository/module-repository.ts |  6 --
 .../src/views/explore-view/modules/bar-chart-module.tsx |  2 ++
 .../explore-view/modules/grouping-table-module.tsx  |  2 ++
 web-console/src/views/explore-view/modules/index.ts |  2 +-
 .../explore-view/modules/multi-axis-chart-module.tsx|  2 ++
 .../src/views/explore-view/modules/pie-chart-module.tsx |  2 ++
 .../views/explore-view/modules/record-table-module.tsx  |  2 ++
 .../views/explore-view/modules/time-chart-module.tsx|  2 ++
 .../src/views/explore-view/query-macros/aggregate.ts| 16 
 13 files changed, 37 insertions(+), 42 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: explore QA (#17225)

2024-10-02 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 8c4db8aeed6 explore QA (#17225)
8c4db8aeed6 is described below

commit 8c4db8aeed682cb07f52c86a0d6b5393a6be9ff0
Author: Vadim Ogievetsky 
AuthorDate: Wed Oct 2 23:05:19 2024 -0700

explore QA (#17225)
---
 .../components/module-pane/module-pane.scss|  8 +++
 .../src/views/explore-view/explore-view.tsx| 23 +--
 .../src/views/explore-view/models/query-source.ts  | 72 --
 .../module-repository/module-repository.ts |  3 +-
 .../explore-view/modules/bar-chart-module.tsx  | 10 ++-
 .../explore-view/modules/grouping-table-module.tsx | 68 
 .../modules/multi-axis-chart-module.tsx| 12 ++--
 .../explore-view/modules/pie-chart-module.tsx  | 10 ++-
 .../explore-view/modules/record-table-module.tsx   |  6 +-
 .../explore-view/modules/time-chart-module.tsx | 15 -
 .../views/explore-view/query-macros/aggregate.ts   |  2 +-
 web-console/webpack.config.js  |  8 ++-
 12 files changed, 154 insertions(+), 83 deletions(-)

diff --git 
a/web-console/src/views/explore-view/components/module-pane/module-pane.scss 
b/web-console/src/views/explore-view/components/module-pane/module-pane.scss
index d015fca9ecd..9d180cb8da2 100644
--- a/web-console/src/views/explore-view/components/module-pane/module-pane.scss
+++ b/web-console/src/views/explore-view/components/module-pane/module-pane.scss
@@ -35,9 +35,17 @@
 
 & > .issue {
   position: absolute;
+  top: 0;
+  left: 0;
   width: 100%;
   height: 100%;
 }
+
+.loader {
+  position: absolute;
+  top: 0;
+  left: 0;
+}
   }
 
   .tile-content {
diff --git a/web-console/src/views/explore-view/explore-view.tsx 
b/web-console/src/views/explore-view/explore-view.tsx
index e68dbd7db11..773eb78e2ac 100644
--- a/web-console/src/views/explore-view/explore-view.tsx
+++ b/web-console/src/views/explore-view/explore-view.tsx
@@ -22,6 +22,7 @@ import { Button, Intent, Menu, MenuDivider, MenuItem } from 
'@blueprintjs/core';
 import { IconNames } from '@blueprintjs/icons';
 import type { Column, QueryResult, SqlExpression } from '@druid-toolkit/query';
 import { QueryRunner, SqlQuery } from '@druid-toolkit/query';
+import type { CancelToken } from 'axios';
 import classNames from 'classnames';
 import copy from 'copy-to-clipboard';
 import React, { useEffect, useMemo, useRef, useState } from 'react';
@@ -79,27 +80,33 @@ const queryRunner = new QueryRunner({
   },
 });
 
-async function runSqlQuery(query: string | SqlQuery): Promise {
+async function runSqlQuery(
+  query: string | SqlQuery,
+  cancelToken?: CancelToken,
+): Promise {
   try {
 return await queryRunner.runQuery({
   query,
   defaultQueryContext: {
 sqlStringifyArrays: false,
   },
+  cancelToken,
 });
   } catch (e) {
 throw new DruidError(e);
   }
 }
 
-async function introspectSource(source: string): Promise {
+async function introspectSource(source: string, cancelToken?: CancelToken): 
Promise {
   const query = SqlQuery.parse(source);
   const introspectResult = await 
runSqlQuery(QuerySource.makeLimitZeroIntrospectionQuery(query));
 
+  cancelToken?.throwIfRequested();
   const baseIntrospectResult = QuerySource.isSingleStarQuery(query)
 ? introspectResult
 : await runSqlQuery(
 
QuerySource.makeLimitZeroIntrospectionQuery(QuerySource.stripToBaseSource(query)),
+cancelToken,
   );
 
   return QuerySource.fromIntrospectResult(
@@ -238,11 +245,15 @@ export const ExploreView = React.memo(function 
ExploreView() {
   const querySource = querySourceState.getSomeData();
 
   const runSqlPlusQuery = useMemo(() => {
-return async (query: string | SqlQuery) => {
+return async (query: string | SqlQuery, cancelToken?: CancelToken) => {
   if (!querySource) throw new Error('no querySource');
-  return await runSqlQuery(
-await rewriteMaxDataTime(rewriteAggregate(SqlQuery.parse(query), 
querySource.measures)),
-  );
+  const parsedQuery = SqlQuery.parse(query);
+  return (
+await runSqlQuery(
+  await rewriteMaxDataTime(rewriteAggregate(parsedQuery, 
querySource.measures)),
+  cancelToken,
+)
+  ).attachQuery({ query: '' }, parsedQuery);
 };
   }, [querySource]);
 
diff --git a/web-console/src/views/explore-view/models/query-source.ts 
b/web-console/src/views/explore-view/models/query-source.ts
index 4ff83cf14d6..6224344093a 100644
--- a/web-console/src/views/explore-view/models/query-source.ts
+++ b/web-console/src/views/explore-view/models/query-source.ts
@@ -44,31 +44

(druid) branch 31.0.0 updated: Backport #17147 and #17213 to 31 (#17222)

2024-10-02 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/31.0.0 by this push:
 new 7dd5e755bbc Backport #17147 and #17213 to 31 (#17222)
7dd5e755bbc is described below

commit 7dd5e755bbcc3dc3bd7bcc48fdefc8ecfd7550d7
Author: Vadim Ogievetsky 
AuthorDate: Wed Oct 2 10:36:31 2024 -0700

Backport #17147 and #17213 to 31 (#17222)

* Web console: add support for Dart engine (#17147)

* add console support for Dart engine

This reverts commit 6e46edf15dd55e5c51a1a4068e83deba4f22529b.

* feedback fixes

* surface new fields

* prioratize error over results

* better metadata refresh

* feedback fixes

* Web console: misc fixes to the Explore view (#17213)

* make record table able to hide column

* stickyness

* refactor query log

* fix measure drag

* start nested column dialog

* nested expand

* fix filtering on Measures

* use output name

* fix scrolling

* select all / none

* use ARRAY_CONCAT_AGG

* no need to limit if aggregating

* remove magic number

* better search

* update arg list

* add, don't replace
---
 web-console/script/druid   |   1 +
 .../__snapshots__/header-bar.spec.tsx.snap |   1 +
 .../src/druid-models/dart/dart-query-entry.mock.ts |  49 
 .../dart/dart-query-entry.ts}  |  19 +-
 .../src/druid-models/druid-engine/druid-engine.ts  |   9 +-
 web-console/src/druid-models/index.ts  |   1 +
 web-console/src/druid-models/stages/stages.ts  |  23 +-
 .../workbench-query/workbench-query.ts |   6 +-
 web-console/src/helpers/capabilities.ts|  32 ++-
 web-console/src/utils/druid-query.ts   |  13 +
 web-console/src/utils/local-storage-keys.tsx   |   2 +
 web-console/src/utils/table-helpers.ts |   1 +
 .../components/control-pane/control-pane.tsx   |  22 +-
 .../control-pane/named-expressions-input.tsx   |   1 +
 .../contains-filter-control.tsx|   1 +
 .../regexp-filter-control.tsx  |   1 +
 .../values-filter-control.tsx  |  92 +++
 .../generic-output-table/generic-output-table.tsx  |   4 +-
 .../resource-pane/column-dialog/column-dialog.tsx  |   7 +-
 .../measure-dialog/measure-dialog.tsx  |   5 +-
 .../nested-column-dialog.scss} |  29 +-
 .../nested-column-dialog/nested-column-dialog.tsx  | 176 
 .../components/resource-pane/resource-pane.tsx |  50 +++-
 .../src/views/explore-view/explore-view.tsx|  66 +++--
 .../src/views/explore-view/models/measure.ts   |  10 +-
 .../src/views/explore-view/models/parameter.ts |   1 +
 .../src/views/explore-view/models/query-source.ts  |  12 +-
 .../explore-view/modules/grouping-table-module.tsx |   1 +
 .../explore-view/modules/record-table-module.tsx   |  29 +-
 .../explore-view/modules/time-chart-module.tsx |   3 +-
 .../views/explore-view/query-macros/aggregate.ts   |  10 +-
 web-console/src/views/explore-view/utils/index.ts  |   2 +
 .../utils/{index.ts => known-aggregations.ts}  |  51 +++-
 .../explore-view/utils/query-log.ts}   |  33 ++-
 .../src/views/explore-view/utils/table-query.ts|  30 +--
 .../__snapshots__/home-view.spec.tsx.snap  |  15 ++
 .../workbench-view/column-tree/column-tree.tsx |   4 +-
 .../current-dart-panel/current-dart-panel.scss | 121 +
 .../current-dart-panel/current-dart-panel.tsx  | 194 +
 .../dart-details-dialog/dart-details-dialog.scss}  |  27 +-
 .../dart-details-dialog/dart-details-dialog.tsx|  48 
 .../execution-stages-pane.spec.tsx.snap|   6 +-
 .../execution-stages-pane.scss |   2 +-
 .../execution-stages-pane.tsx  |  10 +-
 .../execution-summary-panel.tsx|   2 +-
 .../explain-dialog/explain-dialog.tsx  |   5 +
 .../views/workbench-view/query-tab/query-tab.tsx   |  78 +-
 .../recent-query-task-panel.tsx|   1 +
 .../__snapshots__/run-panel.spec.tsx.snap  |   4 +-
 .../views/workbench-view/run-panel/run-panel.tsx   | 300 +
 .../src/views/workbench-view/workbench-view.scss   |   2 +-
 .../src/views/workbench-view/workbench-view.tsx|  68 +++--
 52 files changed, 1256 insertions(+), 424 deletions(-)

diff --git a/web-console/script/druid b/web-console/script/druid
index 122febaf049..e7e575a5bb0 100755
--- a/web-console/script/druid
+++ b/web-console/script/druid
@@ -67,6 +67,7 @@ function _build_distribution() {
 && echo -e "\n\ndruid.extensions.loadList=[\"druid-hdfs

(druid) branch master updated: Web console: misc fixes to the Explore view (#17213)

2024-10-02 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 715ae5ece0d Web console: misc fixes to the Explore view (#17213)
715ae5ece0d is described below

commit 715ae5ece0d6d6d410daf7c32720017db0a88031
Author: Vadim Ogievetsky 
AuthorDate: Wed Oct 2 08:52:08 2024 -0700

Web console: misc fixes to the Explore view (#17213)

* make record table able to hide column

* stickyness

* refactor query log

* fix measure drag

* start nested column dialog

* nested expand

* fix filtering on Measures

* use output name

* fix scrolling

* select all / none

* use ARRAY_CONCAT_AGG

* no need to limit if aggregating

* remove magic number

* better search

* update arg list

* add, don't replace
---
 web-console/src/utils/local-storage-keys.tsx   |   1 +
 web-console/src/utils/table-helpers.ts |   1 +
 .../components/control-pane/control-pane.tsx   |  22 +--
 .../control-pane/named-expressions-input.tsx   |   1 +
 .../contains-filter-control.tsx|   1 +
 .../regexp-filter-control.tsx  |   1 +
 .../values-filter-control.tsx  |  92 ++-
 .../generic-output-table/generic-output-table.tsx  |   4 +-
 .../resource-pane/column-dialog/column-dialog.tsx  |   7 +-
 .../measure-dialog/measure-dialog.tsx  |   5 +-
 .../nested-column-dialog.scss} |  36 +++--
 .../nested-column-dialog/nested-column-dialog.tsx  | 176 +
 .../components/resource-pane/resource-pane.tsx |  50 --
 .../src/views/explore-view/explore-view.tsx|  66 
 .../src/views/explore-view/models/measure.ts   |  10 +-
 .../src/views/explore-view/models/parameter.ts |   1 +
 .../src/views/explore-view/models/query-source.ts  |  12 +-
 .../explore-view/modules/grouping-table-module.tsx |   1 +
 .../explore-view/modules/record-table-module.tsx   |  29 +++-
 .../explore-view/modules/time-chart-module.tsx |   3 +-
 .../views/explore-view/query-macros/aggregate.ts   |  10 +-
 web-console/src/views/explore-view/utils/index.ts  |   2 +
 .../utils/{index.ts => known-aggregations.ts}  |  51 --
 .../explore-view/utils/{index.ts => query-log.ts}  |  40 +++--
 .../src/views/explore-view/utils/table-query.ts|  30 +---
 25 files changed, 475 insertions(+), 177 deletions(-)

diff --git a/web-console/src/utils/local-storage-keys.tsx 
b/web-console/src/utils/local-storage-keys.tsx
index 8a8fee96b20..a178fc2c009 100644
--- a/web-console/src/utils/local-storage-keys.tsx
+++ b/web-console/src/utils/local-storage-keys.tsx
@@ -58,6 +58,7 @@ export const LocalStorageKeys = {
   SQL_DATA_LOADER_CONTENT: 'sql-data-loader-content' as const,
 
   EXPLORE_STATE: 'explore-state' as const,
+  EXPLORE_STICKY: 'explore-sticky' as const,
 };
 export type LocalStorageKeys = (typeof LocalStorageKeys)[keyof typeof 
LocalStorageKeys];
 
diff --git a/web-console/src/utils/table-helpers.ts 
b/web-console/src/utils/table-helpers.ts
index 90df7fa1064..45e8758bf6f 100644
--- a/web-console/src/utils/table-helpers.ts
+++ b/web-console/src/utils/table-helpers.ts
@@ -35,6 +35,7 @@ export function changePage(pagination: Pagination, page: 
number): Pagination {
 export interface ColumnHint {
   displayName?: string;
   group?: string;
+  hidden?: boolean;
   expressionForWhere?: SqlExpression;
   formatter?: (x: any) => string;
 }
diff --git 
a/web-console/src/views/explore-view/components/control-pane/control-pane.tsx 
b/web-console/src/views/explore-view/components/control-pane/control-pane.tsx
index 7fcc6352f29..faa7576bb67 100644
--- 
a/web-console/src/views/explore-view/components/control-pane/control-pane.tsx
+++ 
b/web-console/src/views/explore-view/components/control-pane/control-pane.tsx
@@ -194,7 +194,7 @@ export const ControlPane = function ControlPane(props: 
ControlPaneProps) {
 };
 return {
   element: (
-
   allowReordering
   values={effectiveValue ? [effectiveValue] : []}
   onValuesChange={vs => onValueChange(vs[0])}
@@ -223,7 +223,7 @@ export const ControlPane = function ControlPane(props: 
ControlPaneProps) {
 );
 return {
   element: (
-
   allowReordering
   values={effectiveValue as ExpressionMeta[]}
   onValuesChange={onValueChange}
@@ -266,7 +266,7 @@ export const ControlPane = function ControlPane(props: 
ControlPaneProps) {
   case 'measure': {
 return {
   element: (
-
   values={effectiveValue ? [effectiveValue] : []

(druid) branch master updated: Web console: add support for Dart engine (#17147)

2024-10-01 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new c8529294eb9 Web console: add support for Dart engine (#17147)
c8529294eb9 is described below

commit c8529294eb914d52aa5ea0f71de8bbe342b4b920
Author: Vadim Ogievetsky 
AuthorDate: Tue Oct 1 17:53:36 2024 -0700

Web console: add support for Dart engine (#17147)

* add console support for Dart engine

This reverts commit 6e46edf15dd55e5c51a1a4068e83deba4f22529b.

* feedback fixes

* surface new fields

* prioratize error over results

* better metadata refresh

* feedback fixes
---
 web-console/script/druid   |   1 +
 .../__snapshots__/header-bar.spec.tsx.snap |   1 +
 .../src/druid-models/dart/dart-query-entry.mock.ts |  49 
 .../druid-engine.ts => dart/dart-query-entry.ts}   |  16 +-
 .../src/druid-models/druid-engine/druid-engine.ts  |   9 +-
 web-console/src/druid-models/index.ts  |   1 +
 web-console/src/druid-models/stages/stages.ts  |  23 +-
 .../workbench-query/workbench-query.ts |   6 +-
 web-console/src/helpers/capabilities.ts|  32 ++-
 web-console/src/utils/druid-query.ts   |  13 +
 web-console/src/utils/local-storage-keys.tsx   |   1 +
 .../__snapshots__/home-view.spec.tsx.snap  |  15 ++
 .../workbench-view/column-tree/column-tree.tsx |   4 +-
 .../current-dart-panel/current-dart-panel.scss | 121 +
 .../current-dart-panel/current-dart-panel.tsx  | 194 +
 .../dart-details-dialog/dart-details-dialog.scss}  |  20 +-
 .../dart-details-dialog/dart-details-dialog.tsx|  48 
 .../execution-stages-pane.spec.tsx.snap|   6 +-
 .../execution-stages-pane.scss |   2 +-
 .../execution-stages-pane.tsx  |  10 +-
 .../execution-summary-panel.tsx|   2 +-
 .../explain-dialog/explain-dialog.tsx  |   5 +
 .../views/workbench-view/query-tab/query-tab.tsx   |  78 +-
 .../recent-query-task-panel.tsx|   1 +
 .../__snapshots__/run-panel.spec.tsx.snap  |   4 +-
 .../views/workbench-view/run-panel/run-panel.tsx   | 300 +
 .../src/views/workbench-view/workbench-view.scss   |   2 +-
 .../src/views/workbench-view/workbench-view.tsx|  68 +++--
 28 files changed, 783 insertions(+), 249 deletions(-)

diff --git a/web-console/script/druid b/web-console/script/druid
index 122febaf049..e7e575a5bb0 100755
--- a/web-console/script/druid
+++ b/web-console/script/druid
@@ -67,6 +67,7 @@ function _build_distribution() {
 && echo -e "\n\ndruid.extensions.loadList=[\"druid-hdfs-storage\", 
\"druid-kafka-indexing-service\", \"druid-multi-stage-query\", 
\"druid-testing-tools\", \"druid-bloom-filter\", \"druid-datasketches\", 
\"druid-histogram\", \"druid-stats\", \"druid-compressed-bigdecimal\", 
\"druid-parquet-extensions\", \"druid-deltalake-extensions\"]" >> 
conf/druid/auto/_common/common.runtime.properties \
 && echo -e "\n\ndruid.server.http.allowedHttpMethods=[\"HEAD\"]" >> 
conf/druid/auto/_common/common.runtime.properties \
 && echo -e "\n\ndruid.export.storage.baseDir=/" >> 
conf/druid/auto/_common/common.runtime.properties \
+&& echo -e "\n\ndruid.msq.dart.enabled=true" >> 
conf/druid/auto/_common/common.runtime.properties \
   )
 }
 
diff --git 
a/web-console/src/components/header-bar/__snapshots__/header-bar.spec.tsx.snap 
b/web-console/src/components/header-bar/__snapshots__/header-bar.spec.tsx.snap
index c3310e2c590..d3e24a6c35a 100644
--- 
a/web-console/src/components/header-bar/__snapshots__/header-bar.spec.tsx.snap
+++ 
b/web-console/src/components/header-bar/__snapshots__/header-bar.spec.tsx.snap
@@ -213,6 +213,7 @@ exports[`HeaderBar matches snapshot 1`] = `
 Capabilities {
   "coordinator": true,
   "maxTaskSlots": undefined,
+  "multiStageQueryDart": true,
   "multiStageQueryTask": true,
   "overlord": true,
   "queryType": "nativeAndSql",
diff --git a/web-console/src/druid-models/dart/dart-query-entry.mock.ts 
b/web-console/src/druid-models/dart/dart-query-entry.mock.ts
new file mode 100644
index 000..f2409abb0cb
--- /dev/null
+++ b/web-console/src/druid-models/dart/dart-query-entry.mock.ts
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this wo

(druid) branch master updated: fix input step typo (#17202)

2024-09-30 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new f33f60b32ea fix input step typo (#17202)
f33f60b32ea is described below

commit f33f60b32eae888907062c17651e366780e05799
Author: Vadim Ogievetsky 
AuthorDate: Mon Sep 30 21:26:22 2024 -0700

fix input step typo (#17202)
---
 .../src/views/workbench-view/input-source-step/input-source-step.tsx| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/web-console/src/views/workbench-view/input-source-step/input-source-step.tsx 
b/web-console/src/views/workbench-view/input-source-step/input-source-step.tsx
index 8beed74fa27..a0e91d611e6 100644
--- 
a/web-console/src/views/workbench-view/input-source-step/input-source-step.tsx
+++ 
b/web-console/src/views/workbench-view/input-source-step/input-source-step.tsx
@@ -91,7 +91,7 @@ export const InputSourceStep = React.memo(function 
InputSourceStep(props: InputS
 Execution
   >({
 processQuery: async ({ inputSource, suggestedInputFormat }, cancelToken) 
=> {
-  const fixedFormat = FIXED_FORMAT_FOR_SOURCE['delta'];
+  const fixedFormat = FIXED_FORMAT_FOR_SOURCE[inputSource.type];
 
   const sampleSpec: SampleSpec = {
 type: 'index_parallel',


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated (95fb813b6d0 -> d982727a298)

2024-09-30 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


from 95fb813b6d0 Fix bug with while adding DistinctSketches (#17184)
 add d982727a298 Web console: revamp the experimental explore view (#17180)

No new revisions were added by this update.

Summary of changes:
 licenses.yaml  |47 +-
 web-console/README.md  | 3 +-
 web-console/package-lock.json  |   112 +-
 web-console/package.json   | 4 +-
 web-console/src/components/index.ts| 1 +
 .../__snapshots__/table-cell.spec.tsx.snap | 2 +-
 .../src/components/table-cell/table-cell.tsx   | 6 +-
 web-console/src/entry.scss | 7 +
 web-console/src/hooks/index.ts | 1 +
 .../use-hash-and-local-storage-hybrid-state.ts |83 +
 web-console/src/hooks/use-query-manager.ts |23 +-
 .../filter-menu.scss => utils/base64-url.spec.ts}  |39 +-
 .../source-pane.scss => utils/base64-url.ts}   |22 +-
 web-console/src/utils/date.ts  |30 +-
 web-console/src/utils/general.tsx  |66 +-
 web-console/src/utils/index.tsx| 1 +
 web-console/src/utils/local-storage-keys.tsx   | 3 +-
 web-console/src/utils/table-helpers.ts | 3 +-
 web-console/src/utils/types.ts | 6 +
 .../explore-view/column-picker/column-picker.tsx   |47 -
 .../column-picker-menu/column-picker-menu.scss | 0
 .../column-picker-menu/column-picker-menu.tsx  |26 +-
 .../components/column-picker/column-picker.tsx |84 +
 .../control-pane/control-pane.scss | 4 +-
 .../components/control-pane/control-pane.tsx   |   386 +
 .../control-pane/expression-menu.scss} |37 +-
 .../components/control-pane/expression-menu.tsx|   212 +
 .../control-pane/measure-menu.scss}|46 +-
 .../components/control-pane/measure-menu.tsx   |   291 +
 .../control-pane/named-expressions-input.scss} | 6 +-
 .../control-pane/named-expressions-input.tsx}  |   122 +-
 .../control-pane/options-input.tsx |68 +-
 .../droppable-container/droppable-container.scss   | 2 +-
 .../droppable-container/droppable-container.tsx|74 +
 .../filter-pane/column-value/column-value.scss | 0
 .../filter-pane/column-value/column-value.tsx  | 0
 .../contains-filter-control.scss   | 0
 .../contains-filter-control.tsx|97 +
 .../filter-pane/filter-menu/filter-menu.scss   |25 +-
 .../filter-pane/filter-menu/filter-menu.tsx|   425 +
 .../number-range-filter-control.tsx|69 +
 .../regexp-filter-control.scss | 0
 .../regexp-filter-control.tsx  |92 +-
 .../time-interval-filter-control.scss} |11 +-
 .../time-interval-filter-control.tsx   |53 +
 .../time-relative-filter-control.tsx   |61 +-
 .../values-filter-control.scss | 0
 .../values-filter-control.tsx  |   120 +
 .../{ => components}/filter-pane/filter-pane.scss  | 4 +-
 .../{ => components}/filter-pane/filter-pane.tsx   |80 +-
 .../generic-output-table/generic-output-table.scss | 8 +-
 .../generic-output-table/generic-output-table.tsx  |   246 +-
 .../highlight-bubble/highlight-bubble.scss | 0
 .../highlight-bubble/highlight-bubble.tsx  | 4 +-
 .../explore-view/{modules => }/components/index.ts |12 +
 .../issue/issue.scss}  |11 +-
 .../issue/issue.tsx}   |25 +-
 .../module-pane/module-pane.scss}  |53 +-
 .../components/module-pane/module-pane.tsx |   100 +
 .../module-picker/module-picker.scss}  | 9 +-
 .../module-picker/module-picker.tsx}   |28 +-
 .../preview-pane/preview-pane.scss}|33 +-
 .../components/preview-pane/preview-pane.tsx   |72 +
 .../column-dialog/column-dialog.scss}  |41 +-
 .../resource-pane/column-dialog/column-dialog.tsx  |   169 +
 .../measure-dialog/measure-dialog.scss}|41 +-
 .../measure-dialog/measure-dialog.tsx  |   176 +
 .../resource-pane/resource-pane.scss   |42 +-
 .../components/resource-pane/resource-pane.tsx |   283 +
 .../source-pane/source-pane.scss}  | 5 +-
 .../{ => components}/source-pane/source-pane.tsx   |47 +-
 .../source-query-pane/source-query-pane.scss}  |30 +-
 .../source-query-pane/source-query-pane.tsx|83 +
 .../components/sql-i

(druid) branch master updated (1a13bd5485e -> 4872f0457a8)

2024-09-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


from 1a13bd5485e Make the tooltip better and improve structure (#17132)
 add 4872f0457a8 switch to using arrays by default (#17133)

No new revisions were added by this update.

Summary of changes:
 web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx  | 3 +++
 web-console/src/views/load-data-view/load-data-view.tsx | 6 --
 .../views/workbench-view/input-format-step/input-format-step.tsx| 3 ++-
 3 files changed, 9 insertions(+), 3 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated (36dfff4b1ad -> ed33dbb76d8)

2024-09-23 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


from 36dfff4b1ad Adding extra debug logs for the checkpoint logic (#16321)
 add ed33dbb76d8 Web console: add stage graph (#17135)

No new revisions were added by this update.

Summary of changes:
 web-console/src/druid-models/stages/graph-info.ts  | 77 ++
 web-console/src/druid-models/stages/stages.spec.ts | 47 +
 web-console/src/druid-models/stages/stages.ts  | 18 +
 .../execution-stages-pane.spec.tsx.snap|  9 +++
 .../execution-stages-pane.scss | 18 +
 .../execution-stages-pane.tsx  | 66 +++
 6 files changed, 235 insertions(+)
 create mode 100644 web-console/src/druid-models/stages/graph-info.ts


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: Fix formatting of error message from validateNoIllegalRightyJoins. (#17061)

2024-09-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 27443a0600a Fix formatting of error message from 
validateNoIllegalRightyJoins. (#17061)
27443a0600a is described below

commit 27443a0600a7832b129458dc16ce76ce8a9e9cae
Author: Gian Merlino 
AuthorDate: Sat Sep 14 15:20:48 2024 -0700

Fix formatting of error message from validateNoIllegalRightyJoins. (#17061)

The prior formatting was inconsistent in terms of punctuation and
capitalization.
---
 .../java/org/apache/druid/sql/calcite/planner/QueryValidations.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/sql/src/main/java/org/apache/druid/sql/calcite/planner/QueryValidations.java 
b/sql/src/main/java/org/apache/druid/sql/calcite/planner/QueryValidations.java
index 1f38debfb9a..c516496af31 100644
--- 
a/sql/src/main/java/org/apache/druid/sql/calcite/planner/QueryValidations.java
+++ 
b/sql/src/main/java/org/apache/druid/sql/calcite/planner/QueryValidations.java
@@ -75,7 +75,7 @@ public class QueryValidations
   if (shuttle.found != null) {
 throw new ValidationException(
 StringUtils.format(
-"%s join is not supported by engine [%s] with %s: [%s]. Try 
%s: %s.",
+"%s JOIN is not supported by engine[%s] with %s[%s]. Try 
%s[%s].",
 shuttle.found.getJoinType(),
 plannerContext.getEngine().name(),
 PlannerContext.CTX_SQL_JOIN_ALGORITHM,


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated (5de84253d80 -> 9e1544e9c40)

2024-09-11 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


from 5de84253d80 Web console query view improvements (#16991)
 add 9e1544e9c40 Fix maxRowsInMemory default for streaming (#17028)

No new revisions were added by this update.

Summary of changes:
 web-console/src/components/auto-form/auto-form.tsx | 6 --
 web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx | 2 +-
 web-console/src/entry.scss | 5 +
 3 files changed, 10 insertions(+), 3 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: Web console query view improvements (#16991)

2024-09-10 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 5de84253d80 Web console query view improvements (#16991)
5de84253d80 is described below

commit 5de84253d806e48278c7020b775cdd5f64b2d0f4
Author: Sébastien 
AuthorDate: Tue Sep 10 20:34:49 2024 +0200

Web console query view improvements (#16991)

* Made maxNumTaskOptions configurable in the Query view

* Updated the copy for taskAssignment options

* Reordered options in engine menu for msq engine

* fixed snapshot

* maxNumTaskOptions -> maxTasksOptions

* added back select destination item

* fixed duplicate menu item

* snapshot

* Added the ability to hide certain engine menu options

* Added the ability to hide/show more menu items

* -> fn

* -> fn
---
 web-console/src/console-application.tsx|   1 -
 .../__snapshots__/max-tasks-button.spec.tsx.snap   |  29 +-
 .../max-tasks-button/max-tasks-button.tsx  |  81 ++--
 .../views/workbench-view/query-tab/query-tab.tsx   |  11 +-
 .../views/workbench-view/run-panel/run-panel.tsx   | 473 -
 .../src/views/workbench-view/workbench-view.tsx| 101 +++--
 6 files changed, 410 insertions(+), 286 deletions(-)

diff --git a/web-console/src/console-application.tsx 
b/web-console/src/console-application.tsx
index 36a0b8aa392..8a166b932e8 100644
--- a/web-console/src/console-application.tsx
+++ b/web-console/src/console-application.tsx
@@ -327,7 +327,6 @@ export class ConsoleApplication extends React.PureComponent<
 baseQueryContext={baseQueryContext}
 serverQueryContext={serverQueryContext}
 queryEngines={queryEngines}
-allowExplain
 goToTask={this.goToTasksWithTaskId}
 getClusterCapacity={maybeGetClusterCapacity}
   />,
diff --git 
a/web-console/src/views/workbench-view/max-tasks-button/__snapshots__/max-tasks-button.spec.tsx.snap
 
b/web-console/src/views/workbench-view/max-tasks-button/__snapshots__/max-tasks-button.spec.tsx.snap
index d4326fdf6dc..89f2fdf4143 100644
--- 
a/web-console/src/views/workbench-view/max-tasks-button/__snapshots__/max-tasks-button.spec.tsx.snap
+++ 
b/web-console/src/views/workbench-view/max-tasks-button/__snapshots__/max-tasks-button.spec.tsx.snap
@@ -100,14 +100,13 @@ exports[`MaxTasksButton matches snapshot 1`] = `
 multiline={true}
 onClick={[Function]}
 popoverProps={{}}
-shouldDismissPopover={false}
+shouldDismissPopover={true}
 text={
   
 
   Max
 
-: 
-uses the maximum possible tasks up to the specified limit.
+: uses the maximum possible tasks up to the specified limit.
   
 }
   />
@@ -115,24 +114,28 @@ exports[`MaxTasksButton matches snapshot 1`] = `
 active={false}
 disabled={false}
 icon="blank"
-labelElement={
-  
-}
 multiline={true}
 onClick={[Function]}
 popoverProps={{}}
-shouldDismissPopover={false}
+shouldDismissPopover={true}
 text={
   
 
   Auto
 
-: 
-maximizes the number of tasks while staying within 512 MiB or 
10,000 files per task, unless more tasks are needed to stay under the max task 
limit.
+: uses the minimum number of tasks while
+ 
+
+  staying within constraints.
+
   
 }
   />
diff --git 
a/web-console/src/views/workbench-view/max-tasks-button/max-tasks-button.tsx 
b/web-console/src/views/workbench-view/max-tasks-button/max-tasks-button.tsx
index 21ba60f6b8d..509e943d8b7 100644
--- a/web-console/src/views/workbench-view/max-tasks-button/max-tasks-button.tsx
+++ b/web-console/src/views/workbench-view/max-tasks-button/max-tasks-button.tsx
@@ -19,34 +19,17 @@
 import type { ButtonProps } from '@blueprintjs/core';
 import { Button, Menu, MenuDivider, MenuItem, Popover, Position } from 
'@blueprintjs/core';
 import { IconNames } from '@blueprintjs/icons';
-import type { JSX, ReactNode } from 'react';
+import type { JSX } from 'react';
 import React, { useState } from 'react';
 
 import { NumericInputDialog } from '../../../dialogs';
-import type { QueryContext, TaskAssignment } from '../../../druid-models';
+import type { QueryContext } from '../../../druid-models';
 import { getQueryCo

(druid) branch master updated: Web console: better tooltip when no size is available (#17008)

2024-09-05 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new dc5c55a836a Web console: better tooltip when no size is available 
(#17008)
dc5c55a836a is described below

commit dc5c55a836a62aab6e2dd91884f186703b953645
Author: Vadim Ogievetsky 
AuthorDate: Thu Sep 5 13:51:03 2024 -0700

Web console: better tooltip when no size is available (#17008)

* better tooltip when no size is available

* better labels for columns

* fix label in segments view
---
 .../__snapshots__/datasources-view.spec.tsx.snap   | 30 +++---
 .../views/datasources-view/datasources-view.tsx| 46 +++---
 .../__snapshots__/segments-view.spec.tsx.snap  |  5 ++-
 .../src/views/segments-view/segments-view.tsx  | 10 +++--
 .../src/views/services-view/services-view.tsx  |  5 ++-
 .../execution-stages-pane.tsx  | 17 
 6 files changed, 66 insertions(+), 47 deletions(-)

diff --git 
a/web-console/src/views/datasources-view/__snapshots__/datasources-view.spec.tsx.snap
 
b/web-console/src/views/datasources-view/__snapshots__/datasources-view.spec.tsx.snap
index 47dd15ff05e..2444d1a4f23 100644
--- 
a/web-console/src/views/datasources-view/__snapshots__/datasources-view.spec.tsx.snap
+++ 
b/web-console/src/views/datasources-view/__snapshots__/datasources-view.spec.tsx.snap
@@ -67,17 +67,35 @@ exports[`DatasourcesView matches snapshot 1`] = `
   "Availability",
   "Historical load/drop queues",
   "Total data size",
-  "Running tasks",
+  {
+"label": "sys.tasks",
+"text": "Running tasks",
+  },
   "Segment rows",
   "Segment size",
-  "Segment granularity",
+  {
+"label": "𝑓(sys.segments)",
+"text": "Segment granularity",
+  },
   "Total rows",
   "Avg. row size",
   "Replicated size",
-  "Compaction",
-  "% Compacted",
-  "Left to be compacted",
-  "Retention",
+  {
+"label": "compaction API",
+"text": "Compaction",
+  },
+  {
+"label": "compaction API",
+"text": "% Compacted",
+  },
+  {
+"label": "compaction API",
+"text": "Left to be compacted",
+  },
+  {
+"label": "rules API",
+"text": "Retention",
+  },
 ]
   }
   onChange={[Function]}
diff --git a/web-console/src/views/datasources-view/datasources-view.tsx 
b/web-console/src/views/datasources-view/datasources-view.tsx
index 69c6302c654..96a32c545ab 100644
--- a/web-console/src/views/datasources-view/datasources-view.tsx
+++ b/web-console/src/views/datasources-view/datasources-view.tsx
@@ -26,6 +26,7 @@ import type { Filter } from 'react-table';
 import ReactTable from 'react-table';
 
 import {
+  type TableColumnSelectorColumn,
   ACTION_COLUMN_ID,
   ACTION_COLUMN_LABEL,
   ACTION_COLUMN_WIDTH,
@@ -86,44 +87,44 @@ import { RuleUtil } from '../../utils/load-rule';
 
 import './datasources-view.scss';
 
-const tableColumns: Record = {
+const TABLE_COLUMNS_BY_MODE: Record = {
   'full': [
 'Datasource name',
 'Availability',
 'Historical load/drop queues',
 'Total data size',
-'Running tasks',
+{ text: 'Running tasks', label: 'sys.tasks' },
 'Segment rows',
 'Segment size',
-'Segment granularity',
+{ text: 'Segment granularity', label: '𝑓(sys.segments)' },
 'Total rows',
 'Avg. row size',
 'Replicated size',
-'Compaction',
-'% Compacted',
-'Left to be compacted',
-'Retention',
+{ text: 'Compaction', label: 'compaction API' },
+{ text: '% Compacted', label: 'compaction API' },
+{ text: 'Left to be compacted', label: 'compaction API' },
+{ text: 'Retention', label: 'rules API' },
   ],
   'no-sql': [
 'Datasource name',
 'Availability',
 'Historical load/drop queues',
 'Total data size',
-'Running tasks&

(druid-website-src) 01/01: Merge pull request #498 from apache/dev-subscribe-info

2024-09-03 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid-website-src.git

commit 964a7a25eb5200b0c91e2e20a9fb3e3a265a271c
Merge: 04af61f08 79ecd24dd
Author: Vadim Ogievetsky 
AuthorDate: Tue Sep 3 09:13:24 2024 -0700

Merge pull request #498 from apache/dev-subscribe-info

Add info about how to subscribe to the dev list.

 src/pages/community/index.mdx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid-website-src) branch master updated (04af61f08 -> 964a7a25e)

2024-09-03 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/druid-website-src.git


from 04af61f08 Merge pull request #497 from 
sinani/podcast-link-update-for-google
 add 79ecd24dd Add info about how to subscribe to the dev list.
 new 964a7a25e Merge pull request #498 from apache/dev-subscribe-info

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/pages/community/index.mdx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid-website-src) branch dev-subscribe-info deleted (was 79ecd24dd)

2024-09-03 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch dev-subscribe-info
in repository https://gitbox.apache.org/repos/asf/druid-website-src.git


 was 79ecd24dd Add info about how to subscribe to the dev list.

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: Web console: expose forceSegmentSortByTime (#16967)

2024-08-29 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 358d06abc13 Web console: expose forceSegmentSortByTime (#16967)
358d06abc13 is described below

commit 358d06abc133bb2597230cd39cf2e0c6e43e1800
Author: Vadim Ogievetsky 
AuthorDate: Thu Aug 29 09:58:15 2024 -0700

Web console: expose forceSegmentSortByTime (#16967)

* no force time

* time UI

* update menus

* tweaks

* dont use bp5

* nicer values

* update snapshots

* similar engine lables

* update snaps
---
 docs/operations/web-console.md |   2 +-
 docs/tutorials/tutorial-sql-query-view.md  |   4 +-
 web-console/src/components/index.ts|   2 +-
 .../__snapshots__/menu-boolean.spec.tsx.snap}  |  62 +++-
 .../menu-boolean.spec.tsx} |  16 ++-
 .../menu-boolean.tsx}  |  49 +--
 .../druid-models/dimension-spec/dimension-spec.ts  |  12 +-
 .../ingestion-spec/ingestion-spec.spec.ts  |  88 
 .../druid-models/ingestion-spec/ingestion-spec.tsx |  18 +++
 .../druid-models/query-context/query-context.tsx   |   2 +
 web-console/src/entry.scss |   6 +
 web-console/src/helpers/spec-conversion.ts |   8 ++
 web-console/src/utils/sampler.ts   |  12 +-
 .../src/views/load-data-view/load-data-view.tsx| 143 ---
 .../load-data-view/schema-table/schema-table.tsx   |   4 +-
 .../schema-step/schema-step.tsx|  33 -
 .../sql-data-loader-view/sql-data-loader-view.tsx  |  12 ++
 .../__snapshots__/max-tasks-button.spec.tsx.snap   |  24 +++-
 .../max-tasks-button/max-tasks-button.tsx  |  31 +++-
 .../__snapshots__/run-panel.spec.tsx.snap  |   4 +-
 .../views/workbench-view/run-panel/run-panel.tsx   | 158 +++--
 21 files changed, 570 insertions(+), 120 deletions(-)

diff --git a/docs/operations/web-console.md b/docs/operations/web-console.md
index db25792d3e0..ef1118ebc4c 100644
--- a/docs/operations/web-console.md
+++ b/docs/operations/web-console.md
@@ -87,7 +87,7 @@ It is equivalent to the **Task** view in the **Ingestion** 
view with the filter
 9. The **Preview** button appears when you enter an INSERT/REPLACE query. It 
runs the query inline without the INSERT/REPLACE clause and with an added LIMIT 
to give you a preview of the data that would be ingested if you click **Run**.
 The added LIMIT makes the query run faster but provides incomplete results.
 10. The engine selector lets you choose which engine (API endpoint) to send a 
query to. By default, it automatically picks which endpoint to use based on an 
analysis of the query, but you can select a specific engine explicitly. You can 
also configure the engine specific context parameters from this menu.
-11. The **Max tasks** picker appears when you have the **sql-msq-task** engine 
selected. It lets you configure the degree of parallelism.
+11. The **Max tasks** picker appears when you have the **SQL MSQ-task** engine 
selected. It lets you configure the degree of parallelism.
 12. The More menu (**...**) contains the following helpful tools:
 - **Explain SQL query** shows you the logical plan returned by `EXPLAIN PLAN 
FOR` for a SQL query.
 - **Query history** shows you previously executed queries.
diff --git a/docs/tutorials/tutorial-sql-query-view.md 
b/docs/tutorials/tutorial-sql-query-view.md
index a313c7a300c..e51661f56b7 100644
--- a/docs/tutorials/tutorial-sql-query-view.md
+++ b/docs/tutorials/tutorial-sql-query-view.md
@@ -100,9 +100,9 @@ In this section you run some queries using aggregate 
functions and perform some
 
![aggregate-query](../assets/tutorial-sql-aggregate-query.png)
 
-7. Click **Engine: auto (sql-native)** to display the engine 
options—**native** for native (JSON-based) queries, **sql-native** for 
Druid SQL queries, and **sql-msq-task** for SQL-based ingestion. 
+7. Click **Engine: Auto (SQL native)** to display the engine 
options—**Native** for native (JSON-based) queries, **SQL native** for 
Druid SQL queries, and **SQL MSQ-task** for SQL-based ingestion. 
 
-   Select **auto** to let Druid select the most efficient engine based on your 
query input.
+   Select **Auto** to let Druid select the most efficient engine based on your 
query input.
 
 8. From the engine menu you can also edit the query context and turn off some 
query defaults. 
 
diff --git a/web-console/src/components/index.ts 
b/web-console/src/components/index.ts
index 42f8257b5dd..bbae88a5d43 100644
--- a/web-console/src/components/index.ts
+++ b/web-console/src/components/index.ts
@@ -37,8 +37,8 @@ export * from './json-collapse/json-collapse';
 export * from './json-input/json-

(druid) branch master updated: Disable automatic search refresh every for keystroke (#16963)

2024-08-27 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 862ccda59b7 Disable automatic search refresh every for keystroke 
(#16963)
862ccda59b7 is described below

commit 862ccda59b711557376aab66abf8280cadb25e02
Author: Virushade <70288012+gwp...@users.noreply.github.com>
AuthorDate: Wed Aug 28 11:28:43 2024 +0800

Disable automatic search refresh every for keystroke (#16963)

* Disable refreshing page everytime keystroke is detected

* Lengthen input debounce time to 1s

* Run Prettier to pass stylecheck
---
 web-console/src/react-table/react-table-inputs.tsx | 29 +-
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/web-console/src/react-table/react-table-inputs.tsx 
b/web-console/src/react-table/react-table-inputs.tsx
index 06bacd1a06d..2d02cb71b78 100644
--- a/web-console/src/react-table/react-table-inputs.tsx
+++ b/web-console/src/react-table/react-table-inputs.tsx
@@ -19,7 +19,7 @@
 import { Button, HTMLSelect, Icon, InputGroup, Menu, MenuItem, Popover } from 
'@blueprintjs/core';
 import { IconNames } from '@blueprintjs/icons';
 import classNames from 'classnames';
-import React, { useState } from 'react';
+import React, { useEffect, useState } from 'react';
 import type { Column, ReactTableFunction } from 'react-table';
 
 import {
@@ -39,8 +39,10 @@ interface FilterRendererProps {
 }
 
 export function GenericFilterInput({ column, filter, onChange, key }: 
FilterRendererProps) {
+  const INPUT_DEBOUNCE_TIME_IN_MILLISECONDS = 1000;
   const [menuOpen, setMenuOpen] = useState(false);
   const [focusedText, setFocusedText] = useState();
+  const [debouncedValue, setDebouncedValue] = useState();
 
   const enableComparisons = 
String(column.headerClassName).includes('enable-comparisons');
 
@@ -49,6 +51,19 @@ export function GenericFilterInput({ column, filter, 
onChange, key }: FilterRend
 needle: '',
   };
 
+  useEffect(() => {
+const handler = setTimeout(() => {
+  if (focusedText !== undefined && focusedText !== debouncedValue) {
+onChange(combineModeAndNeedle(mode, focusedText));
+setDebouncedValue(focusedText);
+  }
+}, INPUT_DEBOUNCE_TIME_IN_MILLISECONDS);
+
+return () => {
+  clearTimeout(handler);
+};
+  }, [focusedText, debouncedValue, mode, onChange]);
+
   return (
 
   }
   value={focusedText ?? needle}
-  onChange={e => {
-const enteredText = e.target.value;
-setFocusedText(enteredText);
-onChange(combineModeAndNeedle(mode, enteredText));
+  onChange={e => setFocusedText(e.target.value)}
+  onKeyDown={e => {
+if (e.key === 'Enter') {
+  const inputValue = (e.target as HTMLInputElement).value;
+  setDebouncedValue(undefined); // Reset debounce to avoid duplicate 
triggers
+  onChange(combineModeAndNeedle(mode, inputValue));
+}
   }}
   rightElement={
 filter ?  
onChange('')} /> : undefined
   }
-  onFocus={() => setFocusedText(needle)}
   onBlur={e => {
 setFocusedText(undefined);
 if (filter && !e.target.value) onChange('');


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated (0caf383102c -> 21dcf804eb4)

2024-08-27 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


from 0caf383102c Fix buffer capacity race condition in spatial (#16931)
 add 21dcf804eb4 Web console: add ability to issue auxiliary queries to 
speed up data views (#16952)

No new revisions were added by this update.

Summary of changes:
 .../form-group-with-info/form-group-with-info.scss |   4 +-
 .../formatted-input/formatted-input.scss   |   2 +-
 .../record-table-pane/record-table-pane.scss   |   2 +-
 .../table-filterable-cell.scss |   2 +-
 web-console/src/utils/general.tsx  |   8 +
 web-console/src/utils/index.tsx|   2 -
 .../{react-table => utils/query-manager}/index.ts  |   7 +-
 .../intermediate-query-state.ts|   0
 .../query-manager.ts}  |  60 +++-
 .../src/utils/{ => query-manager}/query-state.ts   |  16 +-
 .../query-manager/result-with-auxiliary-work.ts}   |  24 +-
 .../views/datasources-view/datasources-view.tsx| 324 -
 .../generic-output-table/generic-output-table.scss |   2 +-
 .../explore-view/tile-picker/tile-picker.scss  |   2 +-
 .../schema-step/preview-table/preview-table.scss   |   2 +-
 .../__snapshots__/supervisors-view.spec.tsx.snap   |   8 +-
 .../views/supervisors-view/supervisors-view.tsx| 127 
 .../workbench-view/column-tree/column-tree.scss|   2 +-
 .../result-table-pane/result-table-pane.scss   |   2 +-
 19 files changed, 344 insertions(+), 252 deletions(-)
 copy web-console/src/{react-table => utils/query-manager}/index.ts (83%)
 rename web-console/src/utils/{ => query-manager}/intermediate-query-state.ts 
(100%)
 rename web-console/src/utils/{query-manager.tsx => 
query-manager/query-manager.ts} (81%)
 rename web-console/src/utils/{ => query-manager}/query-state.ts (88%)
 copy web-console/{e2e-tests/component/datasources/datasource.ts => 
src/utils/query-manager/result-with-auxiliary-work.ts} (67%)


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: fix collapsing in column tree (#16910)

2024-08-18 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 4e33ce2b212 fix collapsing in column tree (#16910)
4e33ce2b212 is described below

commit 4e33ce2b21264a3059c9d677585e6bfecf4e5ff3
Author: Vadim Ogievetsky 
AuthorDate: Sun Aug 18 15:11:28 2024 -0700

fix collapsing in column tree (#16910)
---
 licenses.yaml  |  2 +-
 web-console/package-lock.json  | 14 +-
 web-console/package.json   |  2 +-
 .../modules/multi-axis-chart-echarts-module.ts |  2 +-
 .../modules/pie-chart-echarts-module.ts|  4 +--
 .../modules/time-chart-echarts-module.ts   |  2 +-
 .../column-tree/column-tree.spec.tsx   |  2 +-
 .../workbench-view/column-tree/column-tree.tsx | 32 --
 .../src/views/workbench-view/workbench-view.tsx| 11 +++-
 9 files changed, 22 insertions(+), 49 deletions(-)

diff --git a/licenses.yaml b/licenses.yaml
index b6e07572341..304880db3db 100644
--- a/licenses.yaml
+++ b/licenses.yaml
@@ -5085,7 +5085,7 @@ license_category: binary
 module: web-console
 license_name: Apache License version 2.0
 copyright: Imply Data
-version: 0.22.21
+version: 0.22.22
 
 ---
 
diff --git a/web-console/package-lock.json b/web-console/package-lock.json
index 20396ed7265..44d3cbae2a4 100644
--- a/web-console/package-lock.json
+++ b/web-console/package-lock.json
@@ -14,7 +14,7 @@
 "@blueprintjs/datetime2": "^2.3.7",
 "@blueprintjs/icons": "^5.10.0",
 "@blueprintjs/select": "^5.2.1",
-"@druid-toolkit/query": "^0.22.21",
+"@druid-toolkit/query": "^0.22.22",
 "@druid-toolkit/visuals-core": "^0.3.3",
 "@druid-toolkit/visuals-react": "^0.3.3",
 "@fontsource/open-sans": "^5.0.28",
@@ -989,9 +989,9 @@
   }
 },
 "node_modules/@druid-toolkit/query": {
-  "version": "0.22.21",
-  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.21.tgz";,
-  "integrity": 
"sha512-4k0NGO2Ay90naSO8nyivPPvvhz73D/OkCo6So3frmPDLFfw5CYKSvAhy4RadtnLMZPwsnlVREjAmqbvBsHqgjQ==",
+  "version": "0.22.22",
+  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.22.tgz";,
+  "integrity": 
"sha512-QCzIFr0H6uk5KsGEKO/Vk1fWWurf54ENagFCygsKVk3p2sCRmpZ7WGKeQ5i3AFh2847tOeopZI0OniEv2yTLGQ==",
   "dependencies": {
 "tslib": "^2.5.2"
   }
@@ -19093,9 +19093,9 @@
   "dev": true
 },
 "@druid-toolkit/query": {
-  "version": "0.22.21",
-  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.21.tgz";,
-  "integrity": 
"sha512-4k0NGO2Ay90naSO8nyivPPvvhz73D/OkCo6So3frmPDLFfw5CYKSvAhy4RadtnLMZPwsnlVREjAmqbvBsHqgjQ==",
+  "version": "0.22.22",
+  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.22.tgz";,
+  "integrity": 
"sha512-QCzIFr0H6uk5KsGEKO/Vk1fWWurf54ENagFCygsKVk3p2sCRmpZ7WGKeQ5i3AFh2847tOeopZI0OniEv2yTLGQ==",
   "requires": {
 "tslib": "^2.5.2"
   }
diff --git a/web-console/package.json b/web-console/package.json
index 6d8c0c6448a..9c9f38d24cb 100644
--- a/web-console/package.json
+++ b/web-console/package.json
@@ -68,7 +68,7 @@
 "@blueprintjs/datetime2": "^2.3.7",
 "@blueprintjs/icons": "^5.10.0",
 "@blueprintjs/select": "^5.2.1",
-"@druid-toolkit/query": "^0.22.21",
+"@druid-toolkit/query": "^0.22.22",
 "@druid-toolkit/visuals-core": "^0.3.3",
 "@druid-toolkit/visuals-react": "^0.3.3",
 "@fontsource/open-sans": "^5.0.28",
diff --git 
a/web-console/src/views/explore-view/modules/multi-axis-chart-echarts-module.ts 
b/web-console/src/views/explore-view/modules/multi-axis-chart-echarts-module.ts
index c315b4c9444..ee87e4932b8 100644
--- 
a/web-console/src/views/explore-view/modules/multi-axis-chart-echarts-module.ts
+++ 
b/web-console/src/views/explore-view/modules/multi-axis-chart-echarts-module.ts
@@ -197,7 +197,7 @@ export default typedVisualModule({
   '__time',
 )}, '${start.toISOString()}/${end.toISOString()}')`,
   ),
-  

(druid) branch master updated: Web console: expose handoff API (#16586)

2024-08-16 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 422183ee70d Web console: expose handoff API (#16586)
422183ee70d is described below

commit 422183ee70d6e14e32213289b926eca68e857fa6
Author: Vadim Ogievetsky 
AuthorDate: Fri Aug 16 14:39:16 2024 -0700

Web console: expose handoff API (#16586)

* don't start completions on numbers... it makes numbers hard to enter

* add handoff dialog

* fix placeholder

* Update 
web-console/src/dialogs/supervisor-handoff-dialog/supervisor-handoff-dialog.tsx

Co-authored-by: Katya Macedo  <38017980+ektra...@users.noreply.github.com>

* Update 
web-console/src/dialogs/supervisor-handoff-dialog/supervisor-handoff-dialog.tsx

Co-authored-by: Katya Macedo  <38017980+ektra...@users.noreply.github.com>

* Update 
web-console/src/dialogs/supervisor-handoff-dialog/supervisor-handoff-dialog.tsx

Co-authored-by: Katya Macedo  <38017980+ektra...@users.noreply.github.com>

* feedback fixes

* update snapshot

-

Co-authored-by: Katya Macedo <38017980+ektra...@users.noreply.github.com>
---
 web-console/src/ace-modes/dsql.ts  |  5 +-
 web-console/src/dialogs/index.ts   |  1 +
 .../task-group-handoff-dialog.tsx  | 65 ++
 .../__snapshots__/supervisors-view.spec.tsx.snap   |  2 +-
 .../views/supervisors-view/supervisors-view.tsx| 48 +---
 .../flexible-query-input/flexible-query-input.tsx  |  4 ++
 6 files changed, 114 insertions(+), 11 deletions(-)

diff --git a/web-console/src/ace-modes/dsql.ts 
b/web-console/src/ace-modes/dsql.ts
index e57d17d51e7..38cc40124e2 100644
--- a/web-console/src/ace-modes/dsql.ts
+++ b/web-console/src/ace-modes/dsql.ts
@@ -186,7 +186,10 @@ ace.define(
   this.$id = 'ace/mode/dsql';
 
   this.lineCommentStart = '--';
-  this.getCompletions = () => completions;
+  this.getCompletions = (_state: any, _session: any, _pos: any, prefix: 
string) => {
+if (/^\d+$/.test(prefix)) return; // Don't start completing if the 
user is typing a number
+return completions;
+  };
 };
 oop.inherits(Mode, TextMode);
 
diff --git a/web-console/src/dialogs/index.ts b/web-console/src/dialogs/index.ts
index f7e239b53f4..6a3c336831b 100644
--- a/web-console/src/dialogs/index.ts
+++ b/web-console/src/dialogs/index.ts
@@ -37,4 +37,5 @@ export * from './string-input-dialog/string-input-dialog';
 export * from 
'./supervisor-reset-offsets-dialog/supervisor-reset-offsets-dialog';
 export * from 
'./supervisor-table-action-dialog/supervisor-table-action-dialog';
 export * from './table-action-dialog/table-action-dialog';
+export * from './task-group-handoff-dialog/task-group-handoff-dialog';
 export * from './task-table-action-dialog/task-table-action-dialog';
diff --git 
a/web-console/src/dialogs/task-group-handoff-dialog/task-group-handoff-dialog.tsx
 
b/web-console/src/dialogs/task-group-handoff-dialog/task-group-handoff-dialog.tsx
new file mode 100644
index 000..02e4b066af9
--- /dev/null
+++ 
b/web-console/src/dialogs/task-group-handoff-dialog/task-group-handoff-dialog.tsx
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+
+import { FormGroup, Intent, Tag } from '@blueprintjs/core';
+import React, { useState } from 'react';
+
+import { ArrayInput } from '../../components';
+import { Api } from '../../singletons';
+import { AsyncActionDialog } from '../async-action-dialog/async-action-dialog';
+
+export interface TaskGroupHandoffDialogProps {
+  supervisorId: string;
+  onSuccess(): void;
+  onClose(): void;
+}
+
+export function TaskGroupHandoffDialog(props: TaskGroupHandoffDialogProps) {
+  const { supervisorId, onSuccess, onClose } = props;
+  const [groupIds, 

(druid) branch power-tiles deleted (was 252001378cb)

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch power-tiles
in repository https://gitbox.apache.org/repos/asf/druid.git


 was 252001378cb edit column wokrs

This change permanently discards the following revisions:

 discard 252001378cb edit column wokrs
 discard 70099ea4a89 moves
 discard a5a4036a6d5 filter sane
 discard cfd6078e8a9 start


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch explore_source deleted (was 42aaf6c7969)

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch explore_source
in repository https://gitbox.apache.org/repos/asf/druid.git


 was 42aaf6c7969 fix show other

This change permanently discards the following revisions:

 discard 42aaf6c7969 fix show other
 discard 9d3e728961f time chart
 discard 5ce2abafb78 add others
 discard 442589145a7 init pie
 discard aed556e272f rename
 discard 44028cde97d steps
 discard bd8d8a27056 highlight
 discard 4c6da9315be goodies
 discard affb3db90dd progress
 discard bd72d0f1fe9 bar chart better
 discard feef8232513 fix
 discard 69cdd7c8623 fix bar chart
 discard 45021b10f93 start


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 05/13: progress

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit affb3db90ddff066670b65262a8249a0fad37b97
Author: Vadim Ogievetsky 
AuthorDate: Tue Aug 13 12:06:51 2024 -0700

progress
---
 .../_save/modules/bar-chart-echarts-module.ts  | 155 -
 web-console/src/modules/bar-chart-module.tsx   |  38 +++--
 web-console/src/modules/module-pane.tsx|  13 +-
 .../modules/module-repository/module-repository.ts |   1 +
 .../droppable-container/droppable-container.tsx|  67 -
 .../src/views/explore-view/explore-view.tsx|  15 +-
 6 files changed, 77 insertions(+), 212 deletions(-)

diff --git a/web-console/_save/modules/bar-chart-echarts-module.ts 
b/web-console/_save/modules/bar-chart-echarts-module.ts
deleted file mode 100644
index 2e3bf8681d6..000
--- a/web-console/_save/modules/bar-chart-echarts-module.ts
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * 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.
- */
-
-import { C, SqlExpression } from '@druid-toolkit/query';
-import { typedVisualModule } from '@druid-toolkit/visuals-core';
-import * as echarts from 'echarts';
-
-import { highlightStore } from '../highlight-store/highlight-store';
-import { getInitQuery } from '../utils';
-
-export default typedVisualModule({
-  parameters: {
-splitColumn: {
-  type: 'column',
-  control: {
-label: 'Bar column',
-// transferGroup: 'show',
-required: true,
-  },
-},
-metric: {
-  type: 'aggregate',
-  default: { expression: SqlExpression.parse('COUNT(*)'), name: 'Count', 
sqlType: 'BIGINT' },
-  control: {
-label: 'Metric to show',
-// transferGroup: 'show-agg',
-required: true,
-  },
-},
-metricToSort: {
-  type: 'aggregate',
-  control: {
-label: 'Metric to sort (default to shown)',
-  },
-},
-limit: {
-  type: 'number',
-  default: 5,
-  control: {
-label: 'Max bars to show',
-required: true,
-  },
-},
-  },
-  module: ({ container, host, updateWhere }) => {
-const { sqlQuery } = host;
-const myChart = echarts.init(container, 'dark');
-
-myChart.setOption({
-  tooltip: {},
-  dataset: {
-sourceHeader: false,
-dimensions: ['dim', 'met'],
-source: [],
-  },
-  xAxis: {
-type: 'category',
-axisLabel: { interval: 0, rotate: -30 },
-  },
-  yAxis: {},
-  series: [
-{
-  type: 'bar',
-  encode: {
-x: 'dim',
-y: 'met',
-  },
-},
-  ],
-});
-
-return {
-  async update({ table, where, parameterValues }) {
-const { splitColumn, metric, metricToSort, limit } = parameterValues;
-
-myChart.off('click');
-
-if (!splitColumn) return;
-
-const v = await sqlQuery(
-  getInitQuery(table, where)
-.addSelect(splitColumn.expression.as('dim'), { addToGroupBy: 'end' 
})
-.addSelect(metric.expression.as('met'), {
-  addToOrderBy: metricToSort ? undefined : 'end',
-  direction: 'DESC',
-})
-.applyIf(metricToSort, q =>
-  
q.addOrderBy(metricToSort!.expression.toOrderByExpression('DESC')),
-)
-.changeLimitValue(limit),
-);
-myChart.setOption({
-  dataset: {
-source: v.toObjectArray(),
-  },
-});
-
-myChart.on('click', 'series', p => {
-  const { dim, met } = p.data as any;
-
-  const [x, y] = myChart.convertToPixel({ seriesIndex: 0 }, [dim, 
met]);
-
-  highlightStore.getState().setHighlight({
-  

(druid) 13/13: fix show other

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 42aaf6c79695c98a3595ab6188c04b117eb85485
Author: Vadim Ogievetsky 
AuthorDate: Wed Aug 14 20:46:54 2024 -0700

fix show other
---
 web-console/src/modules/time-chart-module.tsx | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/web-console/src/modules/time-chart-module.tsx 
b/web-console/src/modules/time-chart-module.tsx
index 9527eb4a306..4fb12d63ec7 100644
--- a/web-console/src/modules/time-chart-module.tsx
+++ b/web-console/src/modules/time-chart-module.tsx
@@ -141,12 +141,14 @@ 
ModuleRepository.registerModule({
 baseQuery: SqlQuery.from(querySource.query).addWhere(where),
 measure,
 splitExpression: splitColumn?.expression,
+numberToStack,
+showOthers,
   };
-}, [querySource, where, measure, splitColumn]);
+}, [querySource, where, measure, splitColumn, numberToStack, showOthers]);
 
 const [sourceDataState] = useQueryManager({
   query: dataQuery,
-  processQuery: async ({ baseQuery, measure, splitExpression }) => {
+  processQuery: async ({ baseQuery, measure, splitExpression, 
numberToStack, showOthers }) => {
 const vs = splitExpression
   ? (
   await runSqlQuery(


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 11/13: add others

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 5ce2abafb787a3c6bf8d748a877585bf7d3db2e3
Author: Vadim Ogievetsky 
AuthorDate: Wed Aug 14 14:19:09 2024 -0700

add others
---
 .../_save/modules/pie-chart-echarts-module.ts  | 203 -
 web-console/src/modules/pie-chart-module.tsx   |  50 +++--
 web-console/src/utils/general.tsx  |   6 +
 3 files changed, 41 insertions(+), 218 deletions(-)

diff --git a/web-console/_save/modules/pie-chart-echarts-module.ts 
b/web-console/_save/modules/pie-chart-echarts-module.ts
deleted file mode 100644
index d9aedb16082..000
--- a/web-console/_save/modules/pie-chart-echarts-module.ts
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * 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.
- */
-
-import { C, SqlExpression } from '@druid-toolkit/query';
-import { typedVisualModule } from '@druid-toolkit/visuals-core';
-import * as echarts from 'echarts';
-
-import { highlightStore } from '../highlight-store/highlight-store';
-import { getInitQuery } from '../utils';
-
-/**
- * Returns the cartesian coordinates of a pie slice external centroid
- */
-function getCentroid(chart: echarts.ECharts, dataIndex: number) {
-  // see these underscores everywhere? that's because those are private 
properties
-  // I have no real choice but to use them, because there is no public API for 
this (on pie charts)
-  // #no_ragrets
-  const layout = (chart as 
any)._chartsViews?.[0]?._data?._itemLayouts?.[dataIndex];
-
-  if (!layout) return;
-
-  const { cx, cy, startAngle, endAngle, r } = layout;
-  const angle = (startAngle + endAngle) / 2;
-
-  const x = cx + Math.cos(angle) * r;
-  const y = cy + Math.sin(angle) * r;
-
-  return { x, y };
-}
-
-export default typedVisualModule({
-  parameters: {
-splitColumn: {
-  type: 'column',
-  control: {
-label: 'Slice column',
-// transferGroup: 'show',
-required: true,
-  },
-},
-metric: {
-  type: 'aggregate',
-  default: { expression: SqlExpression.parse('COUNT(*)'), name: 'Count', 
sqlType: 'BIGINT' },
-  control: {
-// transferGroup: 'show',
-required: true,
-  },
-},
-limit: {
-  type: 'number',
-  default: 5,
-  control: {
-label: 'Max slices to show',
-required: true,
-  },
-},
-showOthers: {
-  type: 'boolean',
-  default: true,
-  control: { label: 'Show others' },
-},
-  },
-  module: ({ container, host, updateWhere }) => {
-const myChart = echarts.init(container, 'dark');
-
-myChart.setOption({
-  tooltip: {
-trigger: 'item',
-  },
-  legend: {
-orient: 'vertical',
-left: 'left',
-  },
-  series: [
-{
-  type: 'pie',
-  id: 'hello',
-  radius: '50%',
-  data: [],
-  emphasis: {
-itemStyle: {
-  shadowBlur: 10,
-  shadowOffsetX: 0,
-  shadowColor: 'rgba(0, 0, 0, 0.5)',
-},
-  },
-},
-  ],
-});
-
-return {
-  async update({ table, where, parameterValues }) {
-const { splitColumn, metric, limit } = parameterValues;
-
-if (!splitColumn) return;
-
-myChart.off('click');
-
-const result = await host.sqlQuery(
-  getInitQuery(table, where)
-.addSelect(splitColumn.expression.as('name'), { addToGroupBy: 
'end' })
-.addSelect(metric.expression.as('value'), {
-  addToOrderBy: 'end',
-  direction: 'DESC',
-})
-.changeLimitValue(limit),
-);
-
-const data = result.toObjectArray();
-
-if (parameterValues.showOthers) {
-  const 

(druid) 09/13: rename

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit aed556e272fdea8bcc0fef4fefc3295ff622d65e
Author: Vadim Ogievetsky 
AuthorDate: Tue Aug 13 21:52:44 2024 -0700

rename
---
 web-console/src/modules/bar-chart-module.tsx | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/web-console/src/modules/bar-chart-module.tsx 
b/web-console/src/modules/bar-chart-module.tsx
index a4bc26de555..2e07d863b49 100644
--- a/web-console/src/modules/bar-chart-module.tsx
+++ b/web-console/src/modules/bar-chart-module.tsx
@@ -33,7 +33,7 @@ const OVERALL_LABEL = 'Overall';
 
 interface RecordTableParameterValues {
   splitColumn: ExpressionMeta;
-  metric: ExpressionMeta;
+  measure: ExpressionMeta;
   measureToSort: ExpressionMeta;
   limit: number;
 }
@@ -51,11 +51,11 @@ 
ModuleRepository.registerModule({
 required: true,
   },
 },
-metric: {
+measure: {
   type: 'aggregate',
   default: { expression: SqlExpression.parse('COUNT(*)'), name: 'Count', 
sqlType: 'BIGINT' },
   control: {
-label: 'Metric to show',
+label: 'Measure to show',
 // transferGroup: 'show-agg',
 required: true,
   },
@@ -79,7 +79,7 @@ ModuleRepository.registerModule({
 const { querySource, where, setWhere, parameterValues, stage, runSqlQuery 
} = props;
 const chartRef = useRef();
 
-const { splitColumn, metric, measureToSort, limit } = parameterValues;
+const { splitColumn, measure, measureToSort, limit } = parameterValues;
 
 const dataQuery = useMemo(() => {
   const source = querySource.query;
@@ -88,7 +88,7 @@ ModuleRepository.registerModule({
   return SqlQuery.from(source)
 .addWhere(where)
 .addSelect(splitExpression.as('dim'), { addToGroupBy: 'end' })
-.addSelect(metric.expression.as('met'), {
+.addSelect(measure.expression.as('met'), {
   addToOrderBy: measureToSort ? undefined : 'end',
   direction: 'DESC',
 })
@@ -96,7 +96,7 @@ ModuleRepository.registerModule({
   q.addOrderBy(measureToSort.expression.toOrderByExpression('DESC')),
 )
 .changeLimitValue(limit);
-}, [querySource, where, splitColumn, metric, measureToSort, limit]);
+}, [querySource, where, splitColumn, measure, measureToSort, limit]);
 
 const [dataState] = useQueryManager({
   query: dataQuery,


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 06/13: goodies

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 4c6da9315be6a37da4cf5606196fc6af372ff025
Author: Vadim Ogievetsky 
AuthorDate: Tue Aug 13 14:51:28 2024 -0700

goodies
---
 web-console/src/modules/bar-chart-module.tsx | 78 ++--
 web-console/src/modules/module-pane.scss |  4 ++
 2 files changed, 44 insertions(+), 38 deletions(-)

diff --git a/web-console/src/modules/bar-chart-module.tsx 
b/web-console/src/modules/bar-chart-module.tsx
index ef6bcb7419b..47e00f36e06 100644
--- a/web-console/src/modules/bar-chart-module.tsx
+++ b/web-console/src/modules/bar-chart-module.tsx
@@ -34,7 +34,7 @@ const OVERALL_LABEL = 'Overall';
 interface RecordTableParameterValues {
   splitColumn: ExpressionMeta;
   metric: ExpressionMeta;
-  metricToSort: ExpressionMeta;
+  measureToSort: ExpressionMeta;
   limit: number;
 }
 
@@ -60,10 +60,10 @@ 
ModuleRepository.registerModule({
 required: true,
   },
 },
-metricToSort: {
+measureToSort: {
   type: 'aggregate',
   control: {
-label: 'Metric to sort (default to shown)',
+label: 'Measure to sort (default to shown)',
   },
 },
 limit: {
@@ -79,7 +79,7 @@ ModuleRepository.registerModule({
 const { querySource, where, setWhere, parameterValues, stage, runSqlQuery 
} = props;
 const chartRef = useRef();
 
-const { splitColumn, metric, metricToSort, limit } = parameterValues;
+const { splitColumn, metric, measureToSort, limit } = parameterValues;
 
 const dataQuery = useMemo(() => {
   const source = querySource.query;
@@ -89,14 +89,14 @@ 
ModuleRepository.registerModule({
 .addWhere(where)
 .addSelect(splitExpression.as('dim'), { addToGroupBy: 'end' })
 .addSelect(metric.expression.as('met'), {
-  addToOrderBy: metricToSort ? undefined : 'end',
+  addToOrderBy: measureToSort ? undefined : 'end',
   direction: 'DESC',
 })
-.applyIf(metricToSort, q =>
-  q.addOrderBy(metricToSort.expression.toOrderByExpression('DESC')),
+.applyIf(measureToSort, q =>
+  q.addOrderBy(measureToSort.expression.toOrderByExpression('DESC')),
 )
 .changeLimitValue(limit);
-}, [querySource, where, splitColumn, metric, metricToSort, limit]);
+}, [querySource, where, splitColumn, metric, measureToSort, limit]);
 
 const [dataState] = useQueryManager({
   query: dataQuery,
@@ -105,6 +105,35 @@ 
ModuleRepository.registerModule({
   },
 });
 
+function setupChart(container: HTMLDivElement) {
+  const myChart = echarts.init(container, 'dark');
+
+  myChart.setOption({
+tooltip: {},
+dataset: {
+  sourceHeader: false,
+  dimensions: ['dim', 'met'],
+  source: [],
+},
+xAxis: {
+  type: 'category',
+  axisLabel: { interval: 0, rotate: -30 },
+},
+yAxis: {},
+series: [
+  {
+type: 'bar',
+encode: {
+  x: 'dim',
+  y: 'met',
+},
+  },
+],
+  });
+
+  return myChart;
+}
+
 useEffect(() => {
   const myChart = chartRef.current;
   const data = dataState.data;
@@ -158,38 +187,11 @@ 
ModuleRepository.registerModule({
 
 return (
{
-  if (chartRef.current) return;
-
-  const myChart = echarts.init(container, 'dark');
-
-  myChart.setOption({
-tooltip: {},
-dataset: {
-  sourceHeader: false,
-  dimensions: ['dim', 'met'],
-  source: [],
-},
-xAxis: {
-  type: 'category',
-  axisLabel: { interval: 0, rotate: -30 },
-},
-yAxis: {},
-series: [
-  {
-type: 'bar',
-encode: {
-  x: 'dim',
-  y: 'met',
-},
-  },
-],
-  });
-
-  chartRef.current = myChart;
+  if (chartRef.current || !container) return;
+  chartRef.current = setupChart(container);
 }}
-style={{ height: '100%' }}
   />
 );
   },
diff --git a/web-console/src/modules/module-pane.scss 
b/web-console/src/modules/module-pane.scss
index a7ef0d8da76..c926f6efa9b 100644
--- a/web-console/src/modules/module-pane.scss
+++ b/web-console/src/modules/module-pane.scss
@@ -22,6 +22,10 @@
   position: relative;
   @include card-like;
 
+  & > .module {
+height: 100%;
+  }
+
   .edit-button {
 position: absolute;
 top: 1px;


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 08/13: steps

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 44028cde97d969d344844faad324254f4be8e8be
Author: Vadim Ogievetsky 
AuthorDate: Tue Aug 13 15:03:15 2024 -0700

steps
---
 web-console/src/modules/bar-chart-module.tsx   | 8 
 web-console/src/modules/grouping-table-module.scss | 3 ---
 web-console/src/modules/grouping-table-module.tsx  | 2 +-
 web-console/src/modules/module-pane.scss   | 1 +
 web-console/src/modules/overall-module.scss| 2 --
 web-console/src/modules/overall-module.tsx | 2 +-
 web-console/src/modules/record-table-module.scss   | 3 ---
 web-console/src/modules/record-table-module.tsx| 2 +-
 web-console/src/modules/timeline-module.scss   | 2 --
 web-console/src/modules/timeline-module.tsx| 2 +-
 10 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/web-console/src/modules/bar-chart-module.tsx 
b/web-console/src/modules/bar-chart-module.tsx
index 47e00f36e06..a4bc26de555 100644
--- a/web-console/src/modules/bar-chart-module.tsx
+++ b/web-console/src/modules/bar-chart-module.tsx
@@ -134,6 +134,14 @@ 
ModuleRepository.registerModule({
   return myChart;
 }
 
+useEffect(() => {
+  return () => {
+const myChart = chartRef.current;
+if (!myChart) return;
+myChart.dispose();
+  };
+}, []);
+
 useEffect(() => {
   const myChart = chartRef.current;
   const data = dataState.data;
diff --git a/web-console/src/modules/grouping-table-module.scss 
b/web-console/src/modules/grouping-table-module.scss
index 65d79d15b87..a4fe582677f 100644
--- a/web-console/src/modules/grouping-table-module.scss
+++ b/web-console/src/modules/grouping-table-module.scss
@@ -17,9 +17,6 @@
  */
 
 .grouping-table-module {
-  width: 100%;
-  height: 100%;
-
   .generic-output-table {
 height: 100%;
   }
diff --git a/web-console/src/modules/grouping-table-module.tsx 
b/web-console/src/modules/grouping-table-module.tsx
index a1f68ba2718..9254361ddc9 100644
--- a/web-console/src/modules/grouping-table-module.tsx
+++ b/web-console/src/modules/grouping-table-module.tsx
@@ -264,7 +264,7 @@ 
ModuleRepository.registerModule({
 
 const resultData = resultState.getSomeData();
 return (
-  
+  
 {resultState.error ? (
   
 {resultState.getErrorMessage()}
diff --git a/web-console/src/modules/module-pane.scss 
b/web-console/src/modules/module-pane.scss
index c926f6efa9b..3982e001268 100644
--- a/web-console/src/modules/module-pane.scss
+++ b/web-console/src/modules/module-pane.scss
@@ -23,6 +23,7 @@
   @include card-like;
 
   & > .module {
+width: 100%;
 height: 100%;
   }
 
diff --git a/web-console/src/modules/overall-module.scss 
b/web-console/src/modules/overall-module.scss
index 47ad276fd37..7e97fccef30 100644
--- a/web-console/src/modules/overall-module.scss
+++ b/web-console/src/modules/overall-module.scss
@@ -17,8 +17,6 @@
  */
 
 .overall-module {
-  height: 100%;
-  width: 100%;
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
   grid-gap: 10px;
diff --git a/web-console/src/modules/overall-module.tsx 
b/web-console/src/modules/overall-module.tsx
index 00c52f82f4e..d8145f08510 100644
--- a/web-console/src/modules/overall-module.tsx
+++ b/web-console/src/modules/overall-module.tsx
@@ -72,7 +72,7 @@ ModuleRepository.registerModule({
 
 const row = valuesState.data?.toObjectArray()?.[0];
 return (
-  
+  
 {metrics.map((metric, i) => (
   
 {metric.name}
diff --git a/web-console/src/modules/record-table-module.scss 
b/web-console/src/modules/record-table-module.scss
index e3ebe33fdc7..e99902c43fe 100644
--- a/web-console/src/modules/record-table-module.scss
+++ b/web-console/src/modules/record-table-module.scss
@@ -17,9 +17,6 @@
  */
 
 .record-table-module {
-  width: 100%;
-  height: 100%;
-
   .generic-output-table {
 height: 100%;
   }
diff --git a/web-console/src/modules/record-table-module.tsx 
b/web-console/src/modules/record-table-module.tsx
index 2efdd87fc1f..1eeda2ae7f1 100644
--- a/web-console/src/modules/record-table-module.tsx
+++ b/web-console/src/modules/record-table-module.tsx
@@ -79,7 +79,7 @@ ModuleRepository.registerModule({
 
 const resultData = resultState.getSomeData();
 return (
-  
+  
 {resultState.error ? (
   
 {resultState.getErrorMessage()}
diff --git a/web-console/src/modules/timeline-module.scss 
b/web-console/src/modules/timeline-module.scss
index 6279103571c..3211f458ce0 100644
--- a/web-console/src/modules/timeline-module.scss
+++ b/web-console/src/modules/timeline-module.scss
@@ -19,8 +19,6 @@
 $circle-radius: 5px;
 
 .timeline-module {
-  width: 100%;
-  height: 100%;
   position: relative;
 
   .timeline-line {
diff --git a/web-console/s

(druid) 10/13: init pie

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 442589145a708b4f6e67f6d68fb2c2652bcf6f13
Author: Vadim Ogievetsky 
AuthorDate: Wed Aug 14 08:00:03 2024 -0700

init pie
---
 web-console/src/modules/bar-chart-module.tsx   |   4 +-
 web-console/src/modules/index.ts   |   1 +
 .../{bar-chart-module.tsx => pie-chart-module.tsx} | 148 -
 .../src/views/explore-view/explore-view.tsx|   1 +
 4 files changed, 88 insertions(+), 66 deletions(-)

diff --git a/web-console/src/modules/bar-chart-module.tsx 
b/web-console/src/modules/bar-chart-module.tsx
index 2e07d863b49..585f85a172c 100644
--- a/web-console/src/modules/bar-chart-module.tsx
+++ b/web-console/src/modules/bar-chart-module.tsx
@@ -31,14 +31,14 @@ import './record-table-module.scss';
 
 const OVERALL_LABEL = 'Overall';
 
-interface RecordTableParameterValues {
+interface BarChartParameterValues {
   splitColumn: ExpressionMeta;
   measure: ExpressionMeta;
   measureToSort: ExpressionMeta;
   limit: number;
 }
 
-ModuleRepository.registerModule({
+ModuleRepository.registerModule({
   id: 'bar-chart',
   title: 'Bar chart',
   description: 'An echarts bar chart',
diff --git a/web-console/src/modules/index.ts b/web-console/src/modules/index.ts
index 932c43137e4..1ce08c91970 100644
--- a/web-console/src/modules/index.ts
+++ b/web-console/src/modules/index.ts
@@ -19,6 +19,7 @@
 import './grouping-table-module';
 import './record-table-module';
 import './bar-chart-module';
+import './pie-chart-module';
 import './overall-module';
 import './timeline-module';
 
diff --git a/web-console/src/modules/bar-chart-module.tsx 
b/web-console/src/modules/pie-chart-module.tsx
similarity index 57%
copy from web-console/src/modules/bar-chart-module.tsx
copy to web-console/src/modules/pie-chart-module.tsx
index 2e07d863b49..7daa2742ec4 100644
--- a/web-console/src/modules/bar-chart-module.tsx
+++ b/web-console/src/modules/pie-chart-module.tsx
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-import { L, SqlExpression, SqlQuery } from '@druid-toolkit/query';
+import { C, L, SqlExpression, SqlQuery } from '@druid-toolkit/query';
 import type { ECharts } from 'echarts';
 import * as echarts from 'echarts';
 import React, { useEffect, useMemo, useRef } from 'react';
@@ -31,22 +31,42 @@ import './record-table-module.scss';
 
 const OVERALL_LABEL = 'Overall';
 
-interface RecordTableParameterValues {
+/**
+ * Returns the cartesian coordinates of a pie slice external centroid
+ */
+function getCentroid(chart: echarts.ECharts, dataIndex: number) {
+  // see these underscores everywhere? that's because those are private 
properties
+  // I have no real choice but to use them, because there is no public API for 
this (on pie charts)
+  // #no_ragrets
+  const layout = (chart as 
any)._chartsViews?.[0]?._data?._itemLayouts?.[dataIndex];
+
+  if (!layout) return;
+
+  const { cx, cy, startAngle, endAngle, r } = layout;
+  const angle = (startAngle + endAngle) / 2;
+
+  const x = cx + Math.cos(angle) * r;
+  const y = cy + Math.sin(angle) * r;
+
+  return { x, y };
+}
+
+interface PieChartParameterValues {
   splitColumn: ExpressionMeta;
   measure: ExpressionMeta;
-  measureToSort: ExpressionMeta;
   limit: number;
+  showOthers: boolean;
 }
 
-ModuleRepository.registerModule({
-  id: 'bar-chart',
-  title: 'Bar chart',
-  description: 'An echarts bar chart',
+ModuleRepository.registerModule({
+  id: 'pie-chart',
+  title: 'Pie chart',
+  description: 'An echarts pie chart',
   parameters: {
 splitColumn: {
   type: 'expression',
   control: {
-label: 'Bar column',
+label: 'Slice column',
 // transferGroup: 'show',
 required: true,
   },
@@ -55,31 +75,29 @@ 
ModuleRepository.registerModule({
   type: 'aggregate',
   default: { expression: SqlExpression.parse('COUNT(*)'), name: 'Count', 
sqlType: 'BIGINT' },
   control: {
-label: 'Measure to show',
-// transferGroup: 'show-agg',
+// transferGroup: 'show',
 required: true,
   },
 },
-measureToSort: {
-  type: 'aggregate',
-  control: {
-label: 'Measure to sort (default to shown)',
-  },
-},
 limit: {
   type: 'number',
   default: 5,
   control: {
-label: 'Max bars to show',
+label: 'Max slices to show',
 required: true,
   },
 },
+showOthers: {
+  type: &

(druid) branch explore_source created (now 42aaf6c7969)

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch explore_source
in repository https://gitbox.apache.org/repos/asf/druid.git


  at 42aaf6c7969 fix show other

This branch includes the following new commits:

 new 45021b10f93 start
 new 69cdd7c8623 fix bar chart
 new feef8232513 fix
 new bd72d0f1fe9 bar chart better
 new affb3db90dd progress
 new 4c6da9315be goodies
 new bd8d8a27056 highlight
 new 44028cde97d steps
 new aed556e272f rename
 new 442589145a7 init pie
 new 5ce2abafb78 add others
 new 9d3e728961f time chart
 new 42aaf6c7969 fix show other

The 13 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 12/13: time chart

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 9d3e728961fd292f439cae1ad9f62132e4b29aba
Author: Vadim Ogievetsky 
AuthorDate: Wed Aug 14 20:34:16 2024 -0700

time chart
---
 .../_save/modules/time-chart-echarts-module.ts | 368 --
 web-console/src/modules/bar-chart-module.tsx   |   1 -
 web-console/src/modules/grouping-table-module.tsx  |   1 -
 web-console/src/modules/index.ts   |   1 +
 .../modules/module-repository/module-repository.ts |   1 -
 web-console/src/modules/overall-module.tsx |   1 -
 web-console/src/modules/pie-chart-module.tsx   |   1 -
 web-console/src/modules/record-table-module.tsx|   1 -
 web-console/src/modules/time-chart-module.tsx  | 410 +
 web-console/src/modules/timeline-module.tsx|   1 -
 .../src/views/explore-view/explore-view.tsx|   1 +
 11 files changed, 412 insertions(+), 375 deletions(-)

diff --git a/web-console/_save/modules/time-chart-echarts-module.ts 
b/web-console/_save/modules/time-chart-echarts-module.ts
deleted file mode 100644
index 2e2badcfa0f..000
--- a/web-console/_save/modules/time-chart-echarts-module.ts
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- * 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.
- */
-
-import { C, F, L, SqlCase, SqlExpression } from '@druid-toolkit/query';
-import { typedVisualModule } from '@druid-toolkit/visuals-core';
-import * as echarts from 'echarts';
-
-import { highlightStore } from '../highlight-store/highlight-store';
-import { DATE_FORMAT, getAutoGranularity, getInitQuery, snapToGranularity } 
from '../utils';
-
-const TIME_NAME = '__t__';
-const METRIC_NAME = '__met__';
-const STACK_NAME = '__stack__';
-const OTHERS_VALUE = 'Others';
-
-function transformData(data: any[], vs: string[]): Record[] {
-  const zeroDatum = Object.fromEntries(vs.map(v => [v, 0]));
-
-  let lastTime = -1;
-  let lastDatum: Record | undefined;
-  const ret = [];
-  for (const d of data) {
-const t = d[TIME_NAME];
-if (t.valueOf() !== lastTime) {
-  if (lastDatum) ret.push(lastDatum);
-  lastTime = t.valueOf();
-  lastDatum = { ...zeroDatum, [TIME_NAME]: t };
-}
-lastDatum![d[STACK_NAME]] = d[METRIC_NAME];
-  }
-  if (lastDatum) ret.push(lastDatum);
-  return ret;
-}
-
-export default typedVisualModule({
-  parameters: {
-timeGranularity: {
-  type: 'option',
-  options: ['auto', 'PT1M', 'PT5M', 'PT30M', 'PT1H', 'P1D'],
-  default: 'auto',
-  control: {
-optionLabels: {
-  auto: 'Auto',
-  PT1M: 'Minute',
-  PT5M: '5 minutes',
-  PT30M: '30 minutes',
-  PT1H: 'Hour',
-  PT6H: '6 hours',
-  P1D: 'Day',
-},
-  },
-},
-splitColumn: {
-  type: 'column',
-  control: {
-label: 'Stack by',
-// transferGroup: 'show',
-  },
-},
-numberToStack: {
-  type: 'number',
-  default: 7,
-  min: 2,
-  control: {
-label: 'Max stacks',
-required: true,
-visible: ({ params }) => Boolean(params.splitColumn),
-  },
-},
-showOthers: {
-  type: 'boolean',
-  default: true,
-  control: {
-visible: ({ params }) => Boolean(params.splitColumn),
-  },
-},
-metric: {
-  type: 'aggregate',
-  default: { expression: SqlExpression.parse('COUNT(*)'), name: 'Count', 
sqlType: 'BIGINT' },
-  control: {
-label: 'Metric to show',
-required: true,
-// transferGroup: 'show-agg',
-  },
-},
-snappyHighlight: {
-  type: 'boolean',
-  default: true,
-  control: {
-label: 'Sn

(druid) 07/13: highlight

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit bd8d8a27056debfa2b4a78ddd46a3c9edb8d00eb
Author: Vadim Ogievetsky 
AuthorDate: Tue Aug 13 14:54:46 2024 -0700

highlight
---
 .../models/highlight.ts}   | 47 +-
 web-console/src/modules/models/index.ts|  1 +
 .../highlight-store/highlight-store.ts | 43 +---
 3 files changed, 3 insertions(+), 88 deletions(-)

diff --git 
a/web-console/src/views/explore-view/highlight-store/highlight-store.ts 
b/web-console/src/modules/models/highlight.ts
similarity index 58%
copy from web-console/src/views/explore-view/highlight-store/highlight-store.ts
copy to web-console/src/modules/models/highlight.ts
index 4de8c4bd7b5..528ed9a25af 100644
--- a/web-console/src/views/explore-view/highlight-store/highlight-store.ts
+++ b/web-console/src/modules/models/highlight.ts
@@ -16,9 +16,7 @@
  * limitations under the License.
  */
 
-import { createStore } from 'zustand';
-
-interface Highlight {
+export interface Highlight {
   /**
* The label of the highlight.
*/
@@ -60,46 +58,3 @@ interface Highlight {
*/
   data?: any;
 }
-
-interface HighlightState {
-  /**
-   * The current highlight.
-   */
-  highlight: Highlight | undefined;
-
-  /**
-   * Sets the highlight.
-   * @param highlight the highlight to set
-   */
-  setHighlight: (highlight: Highlight) => void;
-
-  /**
-   * Drops the highlight.
-   */
-  dropHighlight: () => void;
-
-  /**
-   * Updates the highlight.
-   * @param highlight the highlight to update (only the properties to update)
-   * @returns the updated highlight, or undefined if there's no highlight in 
the store
-   */
-  updateHighlight: (highlight: Partial) => Highlight | undefined;
-}
-
-/**
- * A lightweight store for the highlight.
- */
-export const highlightStore = createStore((set, get) => ({
-  highlight: undefined,
-  setHighlight: highlight => set({ highlight }),
-  dropHighlight: () => set({ highlight: undefined }),
-  updateHighlight: highlight => {
-set(state => {
-  if (!state.highlight) return state;
-
-  return { highlight: { ...state.highlight, ...highlight } };
-});
-
-return get().highlight;
-  },
-}));
diff --git a/web-console/src/modules/models/index.ts 
b/web-console/src/modules/models/index.ts
index d43307119a7..66c4b8226e1 100644
--- a/web-console/src/modules/models/index.ts
+++ b/web-console/src/modules/models/index.ts
@@ -17,6 +17,7 @@
  */
 
 export * from './expression-meta';
+export * from './highlight';
 export * from './measure';
 export * from './parameter';
 export * from './query-source';
diff --git 
a/web-console/src/views/explore-view/highlight-store/highlight-store.ts 
b/web-console/src/views/explore-view/highlight-store/highlight-store.ts
index 4de8c4bd7b5..1f479f8c5c3 100644
--- a/web-console/src/views/explore-view/highlight-store/highlight-store.ts
+++ b/web-console/src/views/explore-view/highlight-store/highlight-store.ts
@@ -18,48 +18,7 @@
 
 import { createStore } from 'zustand';
 
-interface Highlight {
-  /**
-   * The label of the highlight.
-   */
-  label: string;
-
-  /**
-   * The x coordinate of the highlight.
-   */
-  x: number;
-
-  /**
-   * The y coordinate of the highlight.
-   */
-  y: number;
-
-  /**
-   * Optional x offset for the highlight (useful for scrolling offset)
-   */
-  offsetX?: number;
-
-  /**
-   * Optional y offset for the highlight (useful for scrolling offset)
-   */
-  offsetY?: number;
-
-  /**
-   * Called when the highlight is dropped (when the "cancel" button is clicked)
-   */
-  onDrop: () => void;
-
-  /**
-   * Called when the highlight is saved (when the "save" button is clicked)
-   * @param highlight The highlight to save
-   */
-  onSave?: (highlight: Highlight) => void;
-
-  /**
-   * Optional data attached to the highlight.
-   */
-  data?: any;
-}
+import type { Highlight } from '../../../modules';
 
 interface HighlightState {
   /**


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 04/13: bar chart better

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit bd72d0f1fe9343091fdabbfa1c7c2606071a268e
Author: Vadim Ogievetsky 
AuthorDate: Mon Aug 12 22:18:30 2024 -0700

bar chart better
---
 .../_save/tiles/filter-tile/filter-tile.tsx|  80 ---
 .../tiles/hello-world-tile/hello-world-tile.scss   |  24 --
 .../tiles/hello-world-tile/hello-world-tile.tsx|  45 
 web-console/_save/tiles/index.ts   |  23 --
 .../_save/tiles/picker-tile/picker-tile.scss   |  24 --
 .../_save/tiles/picker-tile/picker-tile.tsx|  70 --
 web-console/_save/tiles/table-tile/table-tile.scss |  23 --
 web-console/_save/tiles/table-tile/table-tile.tsx  |  94 
 .../src/components/header-bar/header-bar.tsx   |   9 -
 web-console/src/console-application.tsx|   6 -
 web-console/src/modules/bar-chart-module.tsx   | 206 -
 web-console/src/modules/module-pane.tsx|   8 +-
 web-console/src/utils/local-storage-keys.tsx   |   2 -
 .../src/views/explore-view/explore-view.tsx|   7 +-
 web-console/src/views/index.ts |   1 -
 web-console/src/views/tiles-view/common.ts |  23 --
 .../edit-tile-dialog/edit-tile-dialog.tsx  | 118 --
 web-console/src/views/tiles-view/tiles-view.scss   |  36 ---
 web-console/src/views/tiles-view/tiles-view.tsx| 257 -
 .../src/views/tiles-view/utils/inline-state.ts |  41 
 20 files changed, 110 insertions(+), 987 deletions(-)

diff --git a/web-console/_save/tiles/filter-tile/filter-tile.tsx 
b/web-console/_save/tiles/filter-tile/filter-tile.tsx
deleted file mode 100644
index 92220f9cd98..000
--- a/web-console/_save/tiles/filter-tile/filter-tile.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-import { SqlExpression, SqlLiteral, SqlQuery } from '@druid-toolkit/query';
-import React from 'react';
-
-import { Loader } from '../../../../components';
-import { useQueryManager } from '../../../../hooks';
-import { FilterPane } from '../../../explore-view/filter-pane/filter-pane';
-import type { QuerySource } from '../../../explore-view/utils';
-import { TileRepository } from '../../tile-repository';
-
-// import './overall-tile.scss';
-
-interface FilterTileConfig {
-  source: string;
-}
-
-TileRepository.registerTile({
-  type: 'filter',
-  title: 'Filter',
-  description: 'Shows the count',
-  parameterDefinitions: {
-source: {
-  type: 'string',
-  // required: true,
-},
-  },
-  component: function FilterTile(props) {
-const { config, myPublicState, setPublicState, runSqlQuery } = props;
-const { source } = config;
-
-const [querySourceState] = useQueryManager({
-  query: source,
-  processQuery: async source => {
-const r = await runSqlQuery(`SELECT * FROM (${source}) LIMIT 0`);
-
-return {
-  query: SqlQuery.parse(source),
-  columns: r.header.map(c => {
-return {
-  expression: SqlLiteral.NULL,
-  name: c.name,
-  sqlType: c.sqlType,
-};
-  }),
-};
-  },
-});
-
-if (querySourceState.loading) return ;
-
-const filter = SqlExpression.maybeParse(myPublicState['filter']) || 
SqlLiteral.TRUE;
-return (
-  
- setPublicState('filter', String(f))}
-  runSqlQuery={runSqlQuery}
-/>
-  
-);
-  },
-});
diff --git a/web-console/_save/tiles/hello-world-tile/hello-world-tile.scss 
b/web-console/_save/tiles/hello-world-tile/hello-world-tile.scss
deleted file mode 100644
index 10a4fd21457..000
--- a/web-console/_save/tiles/hello-world-tile/hello-world-tile.scss
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed wi

(druid) 02/13: fix bar chart

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 69cdd7c86238cd2036c4c246f982a3a76ac0d4eb
Author: Vadim Ogievetsky 
AuthorDate: Mon Aug 12 15:22:54 2024 -0700

fix bar chart
---
 web-console/src/modules/bar-chart-module.tsx | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/web-console/src/modules/bar-chart-module.tsx 
b/web-console/src/modules/bar-chart-module.tsx
index f53b7ff420d..ab72c78e391 100644
--- a/web-console/src/modules/bar-chart-module.tsx
+++ b/web-console/src/modules/bar-chart-module.tsx
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-import { SqlExpression, SqlQuery } from '@druid-toolkit/query';
+import { L, SqlExpression, SqlQuery } from '@druid-toolkit/query';
 import * as echarts from 'echarts';
 import React, { useEffect, useRef } from 'react';
 
@@ -54,15 +54,14 @@ const barChartFn = ({ container, runSqlQuery }: any) => {
   return {
 async update({ source, parameterValues }: any) {
   const { splitColumn, metric, metricToSort, limit } = parameterValues;
-  console.log('splitColumn', splitColumn);
 
   myChart.off('click');
 
-  if (!splitColumn) return;
+  const splitExpression = splitColumn ? splitColumn.expression : 
L('Overall');
 
   const v = await runSqlQuery(
 SqlQuery.from(source)
-  .addSelect(splitColumn.expression.as('dim'), { addToGroupBy: 'end' })
+  .addSelect(splitExpression.as('dim'), { addToGroupBy: 'end' })
   .addSelect(metric.expression.as('met'), {
 addToOrderBy: metricToSort ? undefined : 'end',
 direction: 'DESC',
@@ -179,6 +178,7 @@ 
ModuleRepository.registerModule({
{
+  if (updateFn.current) return;
   updateFn.current = barChartFn({ container: x, runSqlQuery });
 }}
 style={{ height: '100%' }}


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 03/13: fix

2024-08-14 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit feef8232513c225079a0047b32448091863d02fa
Author: Vadim Ogievetsky 
AuthorDate: Mon Aug 12 15:27:02 2024 -0700

fix
---
 web-console/_save/modules/index.ts | 23 ---
 1 file changed, 23 deletions(-)

diff --git a/web-console/_save/modules/index.ts 
b/web-console/_save/modules/index.ts
deleted file mode 100644
index 311f9fec3d8..000
--- a/web-console/_save/modules/index.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * 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.
- */
-
-export * from './bar-chart-echarts-module';
-export * from './multi-axis-chart-echarts-module';
-export * from './pie-chart-echarts-module';
-export * from './table-react-module';
-export * from './time-chart-echarts-module';


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: Web console: Server context defaults (#16868)

2024-08-09 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 483a03f26c7 Web console: Server context defaults (#16868)
483a03f26c7 is described below

commit 483a03f26c7221f10493d86715985a58e61af967
Author: Vadim Ogievetsky 
AuthorDate: Fri Aug 9 14:46:59 2024 -0700

Web console: Server context defaults (#16868)

* add server defaults

* null is NULL

* r to d

* add test

* typo
---
 licenses.yaml  |   2 +-
 web-console/console-config.js  |   3 +-
 web-console/package-lock.json  |  14 +-
 web-console/package.json   |   2 +-
 .../src/components/header-bar/header-bar.tsx   |   3 +-
 web-console/src/console-application.tsx|  63 --
 .../druid-models/query-context/query-context.tsx   | 251 +++--
 web-console/src/entry.tsx  |  14 +-
 .../src/helpers/execution/sql-task-execution.ts|  16 +-
 web-console/src/utils/general.tsx  |   6 +
 web-console/src/utils/values-query.spec.tsx|   4 +-
 web-console/src/utils/values-query.tsx |  21 +-
 .../sql-data-loader-view/sql-data-loader-view.tsx  |  12 +-
 .../max-tasks-button/max-tasks-button.spec.tsx |   8 +-
 .../max-tasks-button/max-tasks-button.tsx  |  47 ++--
 .../views/workbench-view/query-tab/query-tab.tsx   |  32 ++-
 .../views/workbench-view/run-panel/run-panel.tsx   | 210 +
 .../src/views/workbench-view/workbench-view.tsx|  46 ++--
 18 files changed, 343 insertions(+), 411 deletions(-)

diff --git a/licenses.yaml b/licenses.yaml
index dcdac7bd187..0646c7131fd 100644
--- a/licenses.yaml
+++ b/licenses.yaml
@@ -5085,7 +5085,7 @@ license_category: binary
 module: web-console
 license_name: Apache License version 2.0
 copyright: Imply Data
-version: 0.22.20
+version: 0.22.21
 
 ---
 
diff --git a/web-console/console-config.js b/web-console/console-config.js
index 10bdddb611a..25d99e7c650 100644
--- a/web-console/console-config.js
+++ b/web-console/console-config.js
@@ -17,6 +17,5 @@
  */
 
 window.consoleConfig = {
-  exampleManifestsUrl: 
'https://druid.apache.org/data/example-manifests-v2.tsv',
-  /* future configs may go here */
+  /* configs go here */
 };
diff --git a/web-console/package-lock.json b/web-console/package-lock.json
index 412f728d56d..e9319969b69 100644
--- a/web-console/package-lock.json
+++ b/web-console/package-lock.json
@@ -14,7 +14,7 @@
 "@blueprintjs/datetime2": "^2.3.7",
 "@blueprintjs/icons": "^5.10.0",
 "@blueprintjs/select": "^5.2.1",
-"@druid-toolkit/query": "^0.22.20",
+"@druid-toolkit/query": "^0.22.21",
 "@druid-toolkit/visuals-core": "^0.3.3",
 "@druid-toolkit/visuals-react": "^0.3.3",
 "@fontsource/open-sans": "^5.0.28",
@@ -989,9 +989,9 @@
   }
 },
 "node_modules/@druid-toolkit/query": {
-  "version": "0.22.20",
-  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.20.tgz";,
-  "integrity": 
"sha512-GmmSd27y7zLVTjgTBQy+XoGeSSGhSDNmwyiwWtSua7I5LX8XqHV7Chi8HIH25YQoVgTK1pLK4RS8eRXxthRAzg==",
+  "version": "0.22.21",
+  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.21.tgz";,
+  "integrity": 
"sha512-4k0NGO2Ay90naSO8nyivPPvvhz73D/OkCo6So3frmPDLFfw5CYKSvAhy4RadtnLMZPwsnlVREjAmqbvBsHqgjQ==",
   "dependencies": {
 "tslib": "^2.5.2"
   }
@@ -19093,9 +19093,9 @@
   "dev": true
 },
 "@druid-toolkit/query": {
-  "version": "0.22.20",
-  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.20.tgz";,
-  "integrity": 
"sha512-GmmSd27y7zLVTjgTBQy+XoGeSSGhSDNmwyiwWtSua7I5LX8XqHV7Chi8HIH25YQoVgTK1pLK4RS8eRXxthRAzg==",
+  "version": "0.22.21",
+  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.21.tgz";,
+  "integrity": 
"sha512-4k0NGO2Ay90naSO8nyivPPvvhz73D/OkCo6So3frmPDLFfw5CYKSvAhy4RadtnLMZPwsnlVREjAmqbvBsHqgjQ==",
   "requires": {
 "tslib": "^2.5.2"
   }
diff --git a/web-console/package.json b/web-console/package.json
index 0c9370f8808..d55bb79d609 100644
--- a/web-console/package.json
+++ b/web-console/package.json
@@ -68,7 +68,7 @

(druid) branch master updated: support kinesis input format (#16850)

2024-08-07 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 56c03582cf1 support kinesis input format (#16850)
56c03582cf1 is described below

commit 56c03582cf1e969fa36717ba843b1119211e5eda
Author: Vadim Ogievetsky 
AuthorDate: Wed Aug 7 10:24:28 2024 -0700

support kinesis input format (#16850)
---
 .../druid-models/ingestion-spec/ingestion-spec.tsx |  3 +-
 .../src/druid-models/input-format/input-format.tsx | 42 -
 web-console/src/utils/sampler.ts   | 11 +++-
 .../src/views/load-data-view/load-data-view.tsx| 72 +++---
 4 files changed, 102 insertions(+), 26 deletions(-)

diff --git a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx 
b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx
index d51fd34e901..3a7f0ae5674 100644
--- a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx
+++ b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx
@@ -2441,11 +2441,12 @@ export function fillInputFormatIfNeeded(
   sampleResponse: SampleResponse,
 ): Partial {
   if (deepGet(spec, 'spec.ioConfig.inputFormat.type')) return spec;
+  const specType = getSpecType(spec);
 
   return deepSet(
 spec,
 'spec.ioConfig.inputFormat',
-getSpecType(spec) === 'kafka'
+specType === 'kafka'
   ? guessKafkaInputFormat(
   filterMap(sampleResponse.data, l => l.input),
   typeof deepGet(spec, 'spec.ioConfig.topicPattern') === 'string',
diff --git a/web-console/src/druid-models/input-format/input-format.tsx 
b/web-console/src/druid-models/input-format/input-format.tsx
index a5a1fbdfa07..970e88e2b99 100644
--- a/web-console/src/druid-models/input-format/input-format.tsx
+++ b/web-console/src/druid-models/input-format/input-format.tsx
@@ -60,16 +60,29 @@ const KNOWN_TYPES = [
   'avro_stream',
   'protobuf',
   'regex',
-  'kafka',
   'javascript',
+  'kafka',
+  'kinesis',
 ];
+
 function generateInputFormatFields(streaming: boolean) {
   return compact([
 {
   name: 'type',
   label: 'Input format',
   type: 'string',
-  suggestions: KNOWN_TYPES,
+  suggestions: [
+'json',
+'csv',
+'tsv',
+'parquet',
+'orc',
+'avro_ocf',
+'avro_stream',
+'protobuf',
+'regex',
+'javascript',
+  ],
   required: true,
   info: (
 <>
@@ -606,12 +619,35 @@ export const KAFKA_METADATA_INPUT_FORMAT_FIELDS: 
Field[] = [
   },
 ];
 
+export const KINESIS_METADATA_INPUT_FORMAT_FIELDS: Field[] = [
+  {
+name: 'timestampColumnName',
+label: 'Kinesis timestamp column name',
+type: 'string',
+defaultValue: 'kinesis.timestamp',
+defined: typeIsKnown(KNOWN_TYPES, 'kinesis'),
+info: `The name of the column for the Kinesis timestamp.`,
+  },
+  {
+name: 'partitionKeyColumnName',
+label: 'Kinesis partition key column name',
+type: 'string',
+defaultValue: 'kinesis.partitionKey',
+defined: typeIsKnown(KNOWN_TYPES, 'kinesis'),
+info: `The name of the column for the Kinesis partition key. This field is 
useful when ingesting data from multiple partitions into the same datasource.`,
+  },
+];
+
 export function issueWithInputFormat(inputFormat: InputFormat | undefined): 
string | undefined {
   return AutoForm.issueWithModel(inputFormat, BATCH_INPUT_FORMAT_FIELDS);
 }
 
+export function isKafkaOrKinesis(type: string | undefined): type is 'kafka' | 
'kinesis' {
+  return type === 'kafka' || type === 'kinesis';
+}
+
 export function inputFormatCanProduceNestedData(inputFormat: InputFormat): 
boolean {
-  if (inputFormat.type === 'kafka') {
+  if (isKafkaOrKinesis(inputFormat.type)) {
 return Boolean(
   inputFormat.valueFormat && 
inputFormatCanProduceNestedData(inputFormat.valueFormat),
 );
diff --git a/web-console/src/utils/sampler.ts b/web-console/src/utils/sampler.ts
index 28489c52400..cc9ae32b8ae 100644
--- a/web-console/src/utils/sampler.ts
+++ b/web-console/src/utils/sampler.ts
@@ -251,6 +251,11 @@ const KAFKA_SAMPLE_INPUT_FORMAT: InputFormat = {
   valueFormat: WHOLE_ROW_INPUT_FORMAT,
 };
 
+const KINESIS_SAMPLE_INPUT_FORMAT: InputFormat = {
+  type: 'kinesis',
+  valueFormat: WHOLE_ROW_INPUT_FORMAT,
+};
+
 export async function sampleForConnect(
   spec: Partial,
   sampleStrategy: SampleStrategy,
@@ -267,7 +272,11 @@ export async fu

(druid) branch master updated: Web console: Add columnMapping information to the Explain dialog (#16598)

2024-08-05 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new aeace28ccbd Web console: Add columnMapping information to the Explain 
dialog (#16598)
aeace28ccbd is described below

commit aeace28ccbde8e3e65ddfc28650d981bf340666e
Author: Vadim Ogievetsky 
AuthorDate: Mon Aug 5 13:21:51 2024 -0700

Web console: Add columnMapping information to the Explain dialog (#16598)

* Add columnMapping information in the Explain dialog

* use arrow char
---
 web-console/src/utils/druid-query.ts   | 22 ++
 .../__snapshots__/explain-dialog.spec.tsx.snap |  6 +++---
 .../explain-dialog/explain-dialog.spec.tsx | 22 ++
 .../explain-dialog/explain-dialog.tsx  |  4 ++--
 4 files changed, 45 insertions(+), 9 deletions(-)

diff --git a/web-console/src/utils/druid-query.ts 
b/web-console/src/utils/druid-query.ts
index 15410329704..fba63b94600 100644
--- a/web-console/src/utils/druid-query.ts
+++ b/web-console/src/utils/druid-query.ts
@@ -23,7 +23,7 @@ import axios from 'axios';
 import { Api } from '../singletons';
 
 import type { RowColumn } from './general';
-import { assemble } from './general';
+import { assemble, lookupBy } from './general';
 
 const CANCELED_MESSAGE = 'Query canceled by user.';
 
@@ -345,10 +345,24 @@ export async function queryDruidSql(
 export interface QueryExplanation {
   query: any;
   signature: { name: string; type: string }[];
+  columnMappings: {
+queryColumn: string;
+outputColumn: string;
+  }[];
 }
 
-export function formatSignature(queryExplanation: QueryExplanation): string {
-  return queryExplanation.signature
-.map(({ name, type }) => `${C.optionalQuotes(name)}::${type}`)
+export function formatColumnMappingsAndSignature(queryExplanation: 
QueryExplanation): string {
+  const columnNameToType = lookupBy(
+queryExplanation.signature,
+c => c.name,
+c => c.type,
+  );
+  return queryExplanation.columnMappings
+.map(({ queryColumn, outputColumn }) => {
+  const type = columnNameToType[queryColumn];
+  return `${C.optionalQuotes(queryColumn)}${type ? `::${type}` : 
''}→${C.optionalQuotes(
+outputColumn,
+  )}`;
+})
 .join(', ');
 }
diff --git 
a/web-console/src/views/workbench-view/explain-dialog/__snapshots__/explain-dialog.spec.tsx.snap
 
b/web-console/src/views/workbench-view/explain-dialog/__snapshots__/explain-dialog.spec.tsx.snap
index e2a5a6c3ded..806f209ef63 100644
--- 
a/web-console/src/views/workbench-view/explain-dialog/__snapshots__/explain-dialog.spec.tsx.snap
+++ 
b/web-console/src/views/workbench-view/explain-dialog/__snapshots__/explain-dialog.spec.tsx.snap
@@ -185,7 +185,7 @@ exports[`ExplainDialog matches snapshot on some data (many 
queries) 1`] = `
   label="Signature"
 >
   
 
@@ -287,7 +287,7 @@ exports[`ExplainDialog matches snapshot on some data (many 
queries) 1`] = `
   label="Signature"
 >
   
 
@@ -473,7 +473,7 @@ exports[`ExplainDialog matches snapshot on some data (one 
query) 1`] = `
 label="Signature"
   >
 
   
diff --git 
a/web-console/src/views/workbench-view/explain-dialog/explain-dialog.spec.tsx 
b/web-console/src/views/workbench-view/explain-dialog/explain-dialog.spec.tsx
index 0d6a878d424..bf3b1ece6ed 100644
--- 
a/web-console/src/views/workbench-view/explain-dialog/explain-dialog.spec.tsx
+++ 
b/web-console/src/views/workbench-view/explain-dialog/explain-dialog.spec.tsx
@@ -160,6 +160,16 @@ describe('ExplainDialog', () => {
   type: 'LONG',
 },
   ],
+  columnMappings: [
+{
+  queryColumn: 'd0',
+  outputColumn: 'channel',
+},
+{
+  queryColumn: 'a0',
+  outputColumn: 'Count',
+},
+  ],
 },
   ],
 });
@@ -199,6 +209,12 @@ describe('ExplainDialog', () => {
   type: 'STRING',
 },
   ],
+  columnMappings: [
+{
+  queryColumn: 'channel',
+  outputColumn: 'channel',
+},
+  ],
 },
 {
   query: {
@@ -234,6 +250,12 @@ describe('ExplainDialog', () => {
   type: 'STRING',
 },
   ],
+  columnMappings: [
+{
+  queryColumn: 'channel',
+  outputColumn: 'channel',
+},
+   

(druid) branch master updated: Fix Druid Console cannot open submit supervisor dialog (#16736)

2024-08-05 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 461727de12e Fix Druid Console cannot open submit supervisor dialog 
(#16736)
461727de12e is described below

commit 461727de12ee159f9dfd04910ef65d7deb988a34
Author: Alberic Liu 
AuthorDate: Mon Aug 5 10:44:11 2024 -0700

Fix Druid Console cannot open submit supervisor dialog (#16736)
---
 web-console/src/console-application.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web-console/src/console-application.tsx 
b/web-console/src/console-application.tsx
index 6acefa40e7f..0d097729cbf 100644
--- a/web-console/src/console-application.tsx
+++ b/web-console/src/console-application.tsx
@@ -206,7 +206,7 @@ export class ConsoleApplication extends React.PureComponent<
 
   private readonly openSupervisorSubmit = () => {
 this.openSupervisorDialog = true;
-location.hash = 'supervisor';
+location.hash = 'supervisors';
 this.resetInitialsWithDelay();
   };
 


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated (bb4d6cc001f -> 8c170f7d0e2)

2024-08-01 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


from bb4d6cc001f Add task report fields in response of SQL statements 
endpoint (#16808)
 add 8c170f7d0e2 Web console: use stages, counters, and warnings from the 
new detailed status API (#16809)

No new revisions were added by this update.

Summary of changes:
 .../druid-models/async-query/async-query.mock.ts   | 674 -
 .../src/druid-models/async-query/async-query.ts|   5 +
 .../src/druid-models/execution/execution.spec.ts   | 836 -
 .../src/druid-models/execution/execution.ts|   6 +-
 web-console/src/druid-models/stages/stages.ts  |  13 +-
 web-console/src/druid-models/task/task.ts  |   4 +-
 .../workbench-query/workbench-query.ts |   3 +-
 .../src/helpers/execution/sql-task-execution.ts|   2 +-
 web-console/src/utils/download.spec.ts |   5 +-
 web-console/src/utils/download.ts  |   2 +
 .../recent-query-task-panel.tsx|   2 +-
 .../src/views/workbench-view/workbench-view.tsx|   5 +-
 12 files changed, 1515 insertions(+), 42 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: Prune date-fns locales, bump sass TODO (#16792)

2024-07-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 6ff0cbfa545 Prune date-fns locales, bump sass TODO (#16792)
6ff0cbfa545 is described below

commit 6ff0cbfa5450f7607bcee542381d1ebd9cc7880c
Author: John Gozde 
AuthorDate: Wed Jul 24 11:50:53 2024 -0600

Prune date-fns locales, bump sass TODO (#16792)
---
 web-console/webpack.config.js | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/web-console/webpack.config.js b/web-console/webpack.config.js
index 618a929aaea..d6518623a47 100644
--- a/web-console/webpack.config.js
+++ b/web-console/webpack.config.js
@@ -24,6 +24,8 @@ const webpack = require('webpack');
 
 const { version } = require('./package.json');
 
+const supportedLocales = ['en-US'];
+
 function friendlyErrorFormatter(e) {
   return `${e.severity}: ${e.content} [TS${e.code}]\nat 
(${e.file}:${e.line}:${e.character})`;
 }
@@ -47,6 +49,13 @@ module.exports = env => {
   'global': {},
   'NODE_ENV': JSON.stringify(mode),
 }),
+
+// Prune date-fns locales to only those that are supported
+// https://date-fns.org/v2.30.0/docs/webpack
+new webpack.ContextReplacementPlugin(
+  /^date-fns[/\\]locale$/,
+  new 
RegExp(`\\.[/](${supportedLocales.join('|')})[/]index\\.js$`),
+),
   ];
 
   return {
@@ -137,7 +146,7 @@ module.exports = env => {
 // have access to them at this point. None of the 
components that use svg icons
 // via CSS are themselves being used by the web console, 
so we can safely omit the icons.
 //
-// TODO: Re-evaluate after upgrading to Blueprint v5
+// TODO: Re-evaluate after upgrading to Blueprint v6
 'svg-icon($_icon, $_path)': () => new 
SassString('transparent'),
   },
 },


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: Web console: change to use @fontsource/open-sans (#16786)

2024-07-23 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 4f0b80bef5c Web console: change to use @fontsource/open-sans (#16786)
4f0b80bef5c is described below

commit 4f0b80bef5ce78aada0f307f3e5d29f5f4fea4ee
Author: Vadim Ogievetsky 
AuthorDate: Tue Jul 23 21:28:59 2024 -0700

Web console: change to use @fontsource/open-sans (#16786)

* change to use @fontsource/open-sans

* import locale directly

* update check license
---
 licenses.yaml  | 20 ++---
 licenses/bin/@fontsource-open-sans.OFL | 93 ++
 web-console/package-lock.json  | 23 +++---
 web-console/package.json   |  4 +-
 web-console/script/licenses|  5 ++
 .../segment-timeline/segment-timeline.tsx  |  2 +-
 web-console/src/entry.scss |  3 +-
 7 files changed, 124 insertions(+), 26 deletions(-)

diff --git a/licenses.yaml b/licenses.yaml
index 03565a14660..dcdac7bd187 100644
--- a/licenses.yaml
+++ b/licenses.yaml
@@ -5197,6 +5197,16 @@ license_file_path: licenses/bin/@emotion-weak-memoize.MIT
 
 ---
 
+name: "@fontsource/open-sans"
+license_category: binary
+module: web-console
+license_name: SIL Open Font License 1.1
+copyright: Google Inc.
+version: 5.0.28
+license_file_path: licenses/bin/@fontsource-open-sans.OFL
+
+---
+
 name: "@juggle/resize-observer"
 license_category: binary
 module: web-console
@@ -5743,16 +5753,6 @@ license_file_path: licenses/bin/follow-redirects.MIT
 
 ---
 
-name: "fontsource-open-sans"
-license_category: binary
-module: web-console
-license_name: MIT License
-copyright: Lotus
-version: 3.0.9
-license_file_path: licenses/bin/fontsource-open-sans.MIT
-

-
 name: "form-data"
 license_category: binary
 module: web-console
diff --git a/licenses/bin/@fontsource-open-sans.OFL 
b/licenses/bin/@fontsource-open-sans.OFL
new file mode 100644
index 000..d5e5ab592f4
--- /dev/null
+++ b/licenses/bin/@fontsource-open-sans.OFL
@@ -0,0 +1,93 @@
+Copyright 2020 The Open Sans Project Authors 
(https://github.com/googlefonts/opensans)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+---
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+---
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that eac

(druid) branch master updated: Added an option to hide the workbench-view toolbar (#16785)

2024-07-23 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new aeb2ee59a28 Added an option to hide the workbench-view toolbar (#16785)
aeb2ee59a28 is described below

commit aeb2ee59a2881a1fe68919e7b9fb522487018c93
Author: Sébastien 
AuthorDate: Wed Jul 24 00:36:54 2024 +0200

Added an option to hide the workbench-view toolbar (#16785)
---
 web-console/src/views/workbench-view/workbench-view.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/web-console/src/views/workbench-view/workbench-view.tsx 
b/web-console/src/views/workbench-view/workbench-view.tsx
index 0fcaa5a1da9..a125b8d2987 100644
--- a/web-console/src/views/workbench-view/workbench-view.tsx
+++ b/web-console/src/views/workbench-view/workbench-view.tsx
@@ -104,6 +104,7 @@ export interface WorkbenchViewProps {
   maxTaskMenuHeader?: JSX.Element;
   enginesLabelFn?: ComponentProps['enginesLabelFn'];
   maxTaskLabelFn?: ComponentProps['maxTaskLabelFn'];
+  hideToolbar?: boolean;
 }
 
 export interface WorkbenchViewState {
@@ -613,8 +614,9 @@ export class WorkbenchView extends 
React.PureComponent

(druid) branch master updated: fix NPE in number formatting (#16760)

2024-07-19 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 72c0244 fix NPE in number formatting (#16760)
72c0244 is described below

commit 72c02441e6421337d13420d3a364cb39354a
Author: Vadim Ogievetsky 
AuthorDate: Fri Jul 19 15:20:44 2024 -0700

fix NPE in number formatting (#16760)
---
 .../src/components/record-table-pane/record-table-pane.tsx |  3 ++-
 web-console/src/utils/general.spec.ts  | 10 ++
 web-console/src/utils/general.tsx  |  2 +-
 web-console/src/utils/table-helpers.ts |  6 ++
 4 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/web-console/src/components/record-table-pane/record-table-pane.tsx 
b/web-console/src/components/record-table-pane/record-table-pane.tsx
index 9ba090fa110..262298c1052 100644
--- a/web-console/src/components/record-table-pane/record-table-pane.tsx
+++ b/web-console/src/components/record-table-pane/record-table-pane.tsx
@@ -33,6 +33,7 @@ import {
   columnToWidth,
   formatNumber,
   getNumericColumnBraces,
+  isNumberLike,
 } from '../../utils';
 import { BracedText } from '../braced-text/braced-text';
 import { CellFilterMenu } from '../cell-filter-menu/cell-filter-menu';
@@ -157,7 +158,7 @@ export const RecordTablePane = React.memo(function 
RecordTablePane(props: Record
   {numericColumnBraces[i] ? (
 
diff --git a/web-console/src/utils/general.spec.ts 
b/web-console/src/utils/general.spec.ts
index a0f268a8c78..4b97cb19acb 100644
--- a/web-console/src/utils/general.spec.ts
+++ b/web-console/src/utils/general.spec.ts
@@ -24,6 +24,7 @@ import {
   formatInteger,
   formatMegabytes,
   formatMillions,
+  formatNumber,
   formatPercent,
   hashJoaat,
   moveElement,
@@ -96,6 +97,15 @@ describe('general', () => {
 });
   });
 
+  describe('formatNumber', () => {
+it('works', () => {
+  expect(formatNumber(null as any)).toEqual('0');
+  expect(formatNumber(0)).toEqual('0');
+  expect(formatNumber(5)).toEqual('5');
+  expect(formatNumber(5.1)).toEqual('5.1');
+});
+  });
+
   describe('formatInteger', () => {
 it('works', () => {
   expect(formatInteger(1)).toEqual('10,000');
diff --git a/web-console/src/utils/general.tsx 
b/web-console/src/utils/general.tsx
index a4e32bbf126..a3256c3ab11 100644
--- a/web-console/src/utils/general.tsx
+++ b/web-console/src/utils/general.tsx
@@ -240,7 +240,7 @@ export function formatInteger(n: NumberLike): string {
 }
 
 export function formatNumber(n: NumberLike): string {
-  return n.toLocaleString('en-US', { maximumFractionDigits: 20 });
+  return (n || 0).toLocaleString('en-US', { maximumFractionDigits: 20 });
 }
 
 export function formatRate(n: NumberLike) {
diff --git a/web-console/src/utils/table-helpers.ts 
b/web-console/src/utils/table-helpers.ts
index a2b97350fa4..006d56dff48 100644
--- a/web-console/src/utils/table-helpers.ts
+++ b/web-console/src/utils/table-helpers.ts
@@ -20,7 +20,7 @@ import type { QueryResult } from '@druid-toolkit/query';
 import { C } from '@druid-toolkit/query';
 import type { Filter } from 'react-table';
 
-import { filterMap, formatNumber, oneOf } from './general';
+import { filterMap, formatNumber, isNumberLike, oneOf } from './general';
 import { deepSet } from './object-change';
 
 export interface Pagination {
@@ -55,9 +55,7 @@ export function getNumericColumnBraces(
 queryResult.header.forEach((column, i) => {
   if (!oneOf(column.nativeType, 'LONG', 'FLOAT', 'DOUBLE')) return;
   const formatter = columnHints?.get(column.name)?.formatter || 
formatNumber;
-  const braces = filterMap(rows, row =>
-oneOf(typeof row[i], 'number', 'bigint') ? formatter(row[i]) : 
undefined,
-  );
+  const braces = filterMap(rows, row => (isNumberLike(row[i]) ? 
formatter(row[i]) : undefined));
   if (braces.length) {
 numericColumnBraces[i] = braces;
   }


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: Exposes hooks to customize the workbench-view (#16749)

2024-07-19 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new e286be94278 Exposes hooks to customize the workbench-view (#16749)
e286be94278 is described below

commit e286be9427850263990062612c384527e27bc2f4
Author: Sébastien 
AuthorDate: Fri Jul 19 17:53:34 2024 +0200

Exposes hooks to customize the workbench-view (#16749)

* Exposes hooks to customize the workbench-view

* addressed PR feedback

* naming

* auto -> formatInteger(maxNum)
---
 .../max-tasks-button/max-tasks-button.tsx  | 39 ---
 .../views/workbench-view/query-tab/query-tab.tsx   | 11 +++-
 .../views/workbench-view/run-panel/run-panel.tsx   | 76 --
 .../src/views/workbench-view/workbench-view.tsx| 11 +++-
 4 files changed, 106 insertions(+), 31 deletions(-)

diff --git 
a/web-console/src/views/workbench-view/max-tasks-button/max-tasks-button.tsx 
b/web-console/src/views/workbench-view/max-tasks-button/max-tasks-button.tsx
index c5e107c8a7a..ea239bc3a26 100644
--- a/web-console/src/views/workbench-view/max-tasks-button/max-tasks-button.tsx
+++ b/web-console/src/views/workbench-view/max-tasks-button/max-tasks-button.tsx
@@ -39,14 +39,28 @@ const TASK_ASSIGNMENT_DESCRIPTION: Record = 
{
   auto: `Use as few tasks as possible without exceeding 512 MiB or 10,000 
files per task, unless exceeding these limits is necessary to stay within 
'maxNumTasks'. When calculating the size of files, the weighted size is used, 
which considers the file format and compression format used if any. When file 
sizes cannot be determined through directory listing (for example: http), 
behaves the same as 'max'.`,
 };
 
+const DEFAULT_MAX_NUM_LABEL_FN = (maxNum: number) => {
+  if (maxNum === 2) return { text: formatInteger(maxNum), label: '(1 
controller + 1 worker)' };
+  return { text: formatInteger(maxNum), label: `(1 controller + max ${maxNum - 
1} workers)` };
+};
+
 export interface MaxTasksButtonProps extends Omit {
   clusterCapacity: number | undefined;
   queryContext: QueryContext;
   changeQueryContext(queryContext: QueryContext): void;
+  menuHeader?: JSX.Element;
+  maxNumLabelFn?: (maxNum: number) => { text: string; label?: string };
 }
 
 export const MaxTasksButton = function MaxTasksButton(props: 
MaxTasksButtonProps) {
-  const { clusterCapacity, queryContext, changeQueryContext, ...rest } = props;
+  const {
+clusterCapacity,
+queryContext,
+changeQueryContext,
+menuHeader,
+maxNumLabelFn = DEFAULT_MAX_NUM_LABEL_FN,
+...rest
+  } = props;
   const [customMaxNumTasksDialogOpen, setCustomMaxNumTasksDialogOpen] = 
useState(false);
 
   const maxNumTasks = getMaxNumTasks(queryContext);
@@ -68,6 +82,7 @@ export const MaxTasksButton = function MaxTasksButton(props: 
MaxTasksButtonProps
 position={Position.BOTTOM_LEFT}
 content={
   
+{menuHeader}
 
 {Boolean(fullClusterCapacity) && (

changeQueryContext(changeMaxNumTasks(queryContext, undefined))}
   />
 )}
-{shownMaxNumTaskOptions.map(m => (
-   
changeQueryContext(changeMaxNumTasks(queryContext, m))}
-  />
-))}
+{shownMaxNumTaskOptions.map(m => {
+  const { text, label } = maxNumLabelFn(m);
+
+  return (
+ 
changeQueryContext(changeMaxNumTasks(queryContext, m))}
+/>
+  );
+})}
  Promise) | undefined;
+  maxTaskMenuHeader?: JSX.Element;
+  enginesLabelFn?: ComponentProps['enginesLabelFn'];
+  maxTaskLabelFn?: ComponentProps['maxTaskLabelFn'];
 }
 
 export const QueryTab = React.memo(function QueryTab(props: QueryTabProps) {
@@ -98,6 +101,9 @@ export const QueryTab = React.memo(function QueryTab(props: 
QueryTabProps) {
 clusterCapacity,
 goToTask,
 getClusterCapacity,
+maxTaskMenuHeader,
+enginesLabelFn,
+maxTaskLabelFn,
   } = props;
   const [alertElement, setAlertElement] = useState();
 
@@ -399,6 +405,9 @@ export const QueryTab = React.memo(function QueryTab(props: 
QueryTabProps) {
   queryEngines={queryEngines}
   clusterCapacity={clusterCapacity}
   moreMenu={runMoreMenu}
+  maxTaskMenuHeader={maxTaskMenuHeader}
+  enginesLabelFn={enginesLabelFn}
+  maxTaskLabelFn={maxTaskLabelFn}
 />
 {executionState.isLoading() && (
= {
   ),
 };
 
+const DEFAULT_ENGINES_LABEL_FN = (engine: DruidEngine | undefined) => {
+  if (!engine) return { text: 'auto' };
+  return {
+text: engine,
+label: engine === 'sql-msq-

(druid) branch fix_min_max_filter deleted (was cfad5e2c6a7)

2024-07-17 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch fix_min_max_filter
in repository https://gitbox.apache.org/repos/asf/druid.git


 was cfad5e2c6a7 correctly name sort/shuffle

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: Web console: fix a few console bugs (#16735)

2024-07-17 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 44b3f8e5880 Web console: fix a few console bugs (#16735)
44b3f8e5880 is described below

commit 44b3f8e588003db2eae759f7345809f7ac12358a
Author: Vadim Ogievetsky 
AuthorDate: Wed Jul 17 14:51:17 2024 -0700

Web console: fix a few console bugs (#16735)

* remove __time from min max query shortcut

* fix scrolling in retention rules dialog

* actions menus should have titles

* change term

* correctly name sort/shuffle
---
 .../components/action-cell/action-cell.spec.tsx|2 +-
 .../src/components/action-cell/action-cell.tsx |7 +-
 .../__snapshots__/retention-dialog.spec.tsx.snap   | 1288 ++--
 .../dialogs/retention-dialog/retention-dialog.scss |   18 +-
 .../dialogs/retention-dialog/retention-dialog.tsx  |  112 +-
 web-console/src/druid-models/stages/stages.spec.ts |6 +-
 web-console/src/druid-models/stages/stages.ts  |   59 +-
 web-console/src/utils/basic-action.tsx |8 +-
 .../views/datasources-view/datasources-view.tsx|5 +-
 .../src/views/lookups-view/lookups-view.tsx|1 +
 .../src/views/segments-view/segments-view.tsx  |1 +
 .../src/views/services-view/services-view.tsx  |2 +-
 .../views/supervisors-view/supervisors-view.tsx|1 +
 web-console/src/views/tasks-view/tasks-view.tsx|1 +
 .../workbench-view/column-tree/column-tree.tsx |3 +-
 .../execution-stages-pane.tsx  |   13 +-
 16 files changed, 785 insertions(+), 742 deletions(-)

diff --git a/web-console/src/components/action-cell/action-cell.spec.tsx 
b/web-console/src/components/action-cell/action-cell.spec.tsx
index 6349ee1042e..b52c6af4e84 100644
--- a/web-console/src/components/action-cell/action-cell.spec.tsx
+++ b/web-console/src/components/action-cell/action-cell.spec.tsx
@@ -23,7 +23,7 @@ import { ActionCell } from './action-cell';
 
 describe('ActionCell', () => {
   it('matches snapshot', () => {
-const actionCell =  {}} actions={[]} />;
+const actionCell =  {}} actions={[]} 
menuTitle="item" />;
 const { container } = render(actionCell);
 expect(container.firstChild).toMatchSnapshot();
   });
diff --git a/web-console/src/components/action-cell/action-cell.tsx 
b/web-console/src/components/action-cell/action-cell.tsx
index c0e522e68ab..4a20e429977 100644
--- a/web-console/src/components/action-cell/action-cell.tsx
+++ b/web-console/src/components/action-cell/action-cell.tsx
@@ -34,12 +34,13 @@ export const ACTION_COLUMN_WIDTH = 70;
 export interface ActionCellProps {
   onDetail?: () => void;
   disableDetail?: boolean;
-  actions?: BasicAction[];
+  actions: BasicAction[];
+  menuTitle: string;
 }
 
 export const ActionCell = React.memo(function ActionCell(props: 
ActionCellProps) {
-  const { onDetail, disableDetail, actions } = props;
-  const actionsMenu = actions ? basicActionsToMenu(actions) : null;
+  const { onDetail, disableDetail, actions, menuTitle } = props;
+  const actionsMenu = basicActionsToMenu(actions, menuTitle);
 
   return (
 
diff --git 
a/web-console/src/dialogs/retention-dialog/__snapshots__/retention-dialog.spec.tsx.snap
 
b/web-console/src/dialogs/retention-dialog/__snapshots__/retention-dialog.spec.tsx.snap
index c22b1563155..92f290c4a27 100644
--- 
a/web-console/src/dialogs/retention-dialog/__snapshots__/retention-dialog.spec.tsx.snap
+++ 
b/web-console/src/dialogs/retention-dialog/__snapshots__/retention-dialog.spec.tsx.snap
@@ -105,367 +105,398 @@ exports[`RetentionDialog matches snapshot 1`] = `
 
   
   
 
   
 
-  
-
-  loadByPeriod(P1000Y+future, 2x)
-
-
-  
-
-  
-
-  
   
-  
-
-  
-
-  
-
-  
-
-
-  
+
+ 

(druid) branch fix_min_max_filter updated (453218c8649 -> cfad5e2c6a7)

2024-07-16 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch fix_min_max_filter
in repository https://gitbox.apache.org/repos/asf/druid.git


from 453218c8649 change term
 add cfad5e2c6a7 correctly name sort/shuffle

No new revisions were added by this update.

Summary of changes:
 web-console/src/druid-models/stages/stages.spec.ts |  6 +--
 web-console/src/druid-models/stages/stages.ts  | 59 +++---
 .../execution-stages-pane.tsx  | 13 ++---
 3 files changed, 39 insertions(+), 39 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch fix_min_max_filter updated (e244d1508c1 -> 453218c8649)

2024-07-16 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch fix_min_max_filter
in repository https://gitbox.apache.org/repos/asf/druid.git


from e244d1508c1 actions menus should have titles
 add 453218c8649 change term

No new revisions were added by this update.

Summary of changes:
 web-console/src/views/datasources-view/datasources-view.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch fix_min_max_filter updated (da96170a10c -> e244d1508c1)

2024-07-16 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch fix_min_max_filter
in repository https://gitbox.apache.org/repos/asf/druid.git


from da96170a10c remove __time from min max query shortcut
 add ef728e7ee11 fix scrolling in retention rules dialog
 add e244d1508c1 actions menus should have titles

No new revisions were added by this update.

Summary of changes:
 .../components/action-cell/action-cell.spec.tsx|2 +-
 .../src/components/action-cell/action-cell.tsx |7 +-
 .../__snapshots__/retention-dialog.spec.tsx.snap   | 1288 ++--
 .../dialogs/retention-dialog/retention-dialog.scss |   18 +-
 .../dialogs/retention-dialog/retention-dialog.tsx  |  112 +-
 web-console/src/utils/basic-action.tsx |8 +-
 .../views/datasources-view/datasources-view.tsx|1 +
 .../src/views/lookups-view/lookups-view.tsx|1 +
 .../src/views/segments-view/segments-view.tsx  |1 +
 .../src/views/services-view/services-view.tsx  |2 +-
 .../views/supervisors-view/supervisors-view.tsx|1 +
 web-console/src/views/tasks-view/tasks-view.tsx|1 +
 12 files changed, 742 insertions(+), 700 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch fix_min_max_filter created (now da96170a10c)

2024-07-15 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch fix_min_max_filter
in repository https://gitbox.apache.org/repos/asf/druid.git


  at da96170a10c remove __time from min max query shortcut

This branch includes the following new commits:

 new da96170a10c remove __time from min max query shortcut

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 01/01: remove __time from min max query shortcut

2024-07-15 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit da96170a10cf5631040389879aa4741676a3bdf5
Author: Vadim Ogievetsky 
AuthorDate: Mon Jul 15 20:16:36 2024 -0700

remove __time from min max query shortcut
---
 web-console/src/views/workbench-view/column-tree/column-tree.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/web-console/src/views/workbench-view/column-tree/column-tree.tsx 
b/web-console/src/views/workbench-view/column-tree/column-tree.tsx
index 839bd2b5ca4..6684dd356d3 100644
--- a/web-console/src/views/workbench-view/column-tree/column-tree.tsx
+++ b/web-console/src/views/workbench-view/column-tree/column-tree.tsx
@@ -339,7 +339,8 @@ export class ColumnTree extends 
React.PureComponent

(druid) branch master updated (b3c238457ff -> 307b8849de8)

2024-07-11 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


from b3c238457ff fix unnest bugs (#16723)
 add 307b8849de8 Web console: better sql data loader reset (#16696)

No new revisions were added by this update.

Summary of changes:
 docs/ingestion/supervisor.md   |   1 +
 .../assets/{azureStorage.png => azure-storage.png} | Bin
 .../__snapshots__/header-bar.spec.tsx.snap |   2 +-
 .../__snapshots__/restricted-mode.spec.tsx.snap|   4 +-
 .../header-bar/restricted-mode/restricted-mode.tsx |   2 +-
 .../supervisor-history-panel.tsx   |   8 +-
 web-console/src/console-application.tsx|   5 +-
 .../__snapshots__/about-dialog.spec.tsx.snap   |   2 +-
 .../compaction-config-dialog.spec.tsx.snap |   8 +-
 .../compaction-config-dialog.tsx   |   4 +-
 .../compaction-dynamic-config-dialog.tsx   |   4 +-
 .../compaction-history-dialog.tsx  |   4 +-
 .../coordinator-dynamic-config-dialog.tsx  |   4 +-
 .../src/dialogs/diff-dialog/diff-dialog.tsx|  54 +++---
 .../src/dialogs/history-dialog/history-dialog.tsx  |   4 +-
 .../overlord-dynamic-config-dialog.tsx |   4 +-
 .../__snapshots__/retention-dialog.spec.tsx.snap   |   2 +-
 .../dialogs/retention-dialog/retention-dialog.tsx  |   2 +-
 .../supervisor-table-action-dialog.tsx |   2 +-
 .../src/druid-models/execution/execution.ts|   6 +
 web-console/src/druid-models/filter/filter.tsx |   2 +-
 .../druid-models/ingestion-spec/ingestion-spec.tsx |  70 
 .../src/druid-models/input-format/input-format.tsx |   4 +-
 .../src/druid-models/input-source/input-source.tsx |  20 +--
 .../src/druid-models/metric-spec/metric-spec.tsx   |   6 +-
 .../overlord-dynamic-config.tsx|  12 ++
 .../druid-models/timestamp-spec/timestamp-spec.tsx |   2 +-
 .../druid-models/transform-spec/transform-spec.tsx |   6 +-
 web-console/src/helpers/capabilities.ts|  14 +-
 .../src/helpers/execution/sql-task-execution.ts|  12 +-
 web-console/src/helpers/spec-conversion.ts |   4 +-
 web-console/src/hooks/use-query-manager.ts |   2 +-
 web-console/src/links.ts   |  10 +-
 web-console/src/utils/joda-to-regexp.ts|   2 +-
 .../__snapshots__/home-view.spec.tsx.snap  |  30 ++--
 .../__snapshots__/load-data-view.spec.tsx.snap |   2 +-
 .../src/views/load-data-view/info-messages.tsx |  26 ++-
 .../src/views/load-data-view/load-data-view.scss   |   7 +
 .../src/views/load-data-view/load-data-view.tsx| 192 ++---
 .../ingestion-progress-dialog.tsx  |   7 +-
 .../schema-step/column-list/column-list.tsx|   4 +-
 .../schema-step/schema-step.tsx|   4 +-
 .../sql-data-loader-view/sql-data-loader-view.tsx  |  25 ++-
 .../destination-pages-dialog.scss  |  10 +-
 .../destination-pages-dialog.tsx   |   7 +-
 .../destination-pages-pane.scss|   7 +
 .../destination-pages-pane.tsx |   2 +-
 .../execution-details-pane.spec.tsx.snap   |   4 +-
 .../execution-details-pane.scss|  14 +-
 .../execution-details-pane.tsx |   2 +-
 .../execution-error-pane.spec.tsx.snap |   2 +-
 .../input-format-step/input-format-step.tsx|   2 +-
 .../views/workbench-view/query-tab/query-tab.tsx   |   7 +-
 .../src/views/workbench-view/workbench-view.tsx|  24 ++-
 54 files changed, 400 insertions(+), 266 deletions(-)
 rename web-console/assets/{azureStorage.png => azure-storage.png} (100%)


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: The default `WHERE' filter for automatically generated SQL queries is returned (#16608)

2024-06-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 354a3bea0b7 The default `WHERE' filter for automatically generated SQL 
queries is returned (#16608)
354a3bea0b7 is described below

commit 354a3bea0b774d30266070f3c381719b99071c40
Author: Misha 
AuthorDate: Mon Jun 24 17:52:35 2024 +0200

The default `WHERE' filter for automatically generated SQL queries is 
returned (#16608)

* Returned the default `WHERE` filter for auto-generated SQL queries

* Checkstyle fix

-

Co-authored-by: sviatahorau 
---
 web-console/src/views/workbench-view/workbench-view.tsx | 4 
 1 file changed, 4 insertions(+)

diff --git a/web-console/src/views/workbench-view/workbench-view.tsx 
b/web-console/src/views/workbench-view/workbench-view.tsx
index c251a50f19a..625c6c514c6 100644
--- a/web-console/src/views/workbench-view/workbench-view.tsx
+++ b/web-console/src/views/workbench-view/workbench-view.tsx
@@ -20,6 +20,7 @@ import { Button, ButtonGroup, Intent, Menu, MenuDivider, 
MenuItem } from '@bluep
 import { IconNames } from '@blueprintjs/icons';
 import { Popover2 } from '@blueprintjs/popover2';
 import type { SqlQuery } from '@druid-toolkit/query';
+import { SqlExpression } from '@druid-toolkit/query';
 import classNames from 'classnames';
 import copy from 'copy-to-clipboard';
 import React from 'react';
@@ -63,6 +64,8 @@ import { WorkbenchHistoryDialog } from 
'./workbench-history-dialog/workbench-his
 
 import './workbench-view.scss';
 
+const LAST_DAY = SqlExpression.parse(`__time >= CURRENT_TIMESTAMP - INTERVAL 
'1' DAY`);
+
 function cleanupTabEntry(tabEntry: TabEntry): void {
   const discardedId = tabEntry.id;
   WorkbenchRunningPromises.deletePromise(discardedId);
@@ -786,6 +789,7 @@ export class WorkbenchView extends 
React.PureComponent


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: Web console: show formatted JSON value (#16632)

2024-06-21 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 51c73b5a4e3 Web console: show formatted JSON value (#16632)
51c73b5a4e3 is described below

commit 51c73b5a4e3e5743986cf3f24401e8cd14b8169a
Author: Vadim Ogievetsky 
AuthorDate: Fri Jun 21 18:33:15 2024 -0700

Web console: show formatted JSON value (#16632)

* show formatted json value

* update snapshot

* window functions

* count star can also have a window

* better edit query context
---
 licenses.yaml  |   2 +-
 web-console/lib/keywords.js|   3 +
 web-console/package-lock.json  |  14 +--
 web-console/package.json   |   2 +-
 .../record-table-pane/record-table-pane.tsx|   4 +-
 .../edit-context-dialog.spec.tsx.snap  | 100 ++--
 .../edit-context-dialog/edit-context-dialog.scss   |  21 +
 .../edit-context-dialog.spec.tsx   |   6 +-
 .../edit-context-dialog/edit-context-dialog.tsx| 102 +
 .../__snapshots__/show-value-dialog.spec.tsx.snap  |  88 ++
 .../show-value-dialog/show-value-dialog.scss   |  23 +++--
 .../show-value-dialog/show-value-dialog.tsx|  62 +++--
 .../string-menu-items/string-menu-items.tsx|   2 +-
 .../result-table-pane/result-table-pane.tsx|   4 +-
 .../views/workbench-view/run-panel/run-panel.tsx   |   2 +-
 15 files changed, 280 insertions(+), 155 deletions(-)

diff --git a/licenses.yaml b/licenses.yaml
index 3c1f7b0b2d4..700dc891553 100644
--- a/licenses.yaml
+++ b/licenses.yaml
@@ -5094,7 +5094,7 @@ license_category: binary
 module: web-console
 license_name: Apache License version 2.0
 copyright: Imply Data
-version: 0.22.15
+version: 0.22.20
 
 ---
 
diff --git a/web-console/lib/keywords.js b/web-console/lib/keywords.js
index bf7b9a03910..dbf10e12bac 100644
--- a/web-console/lib/keywords.js
+++ b/web-console/lib/keywords.js
@@ -47,6 +47,7 @@ exports.SQL_KEYWORDS = [
   'FULL',
   'CROSS',
   'USING',
+  'NATURAL',
   'FETCH',
   'FIRST',
   'NEXT',
@@ -67,6 +68,8 @@ exports.SQL_KEYWORDS = [
   'RANGE',
   'PRECEDING',
   'FOLLOWING',
+  'CURRENT',
+  'UNBOUNDED',
   'EXTEND',
   'PIVOT',
   'UNPIVOT',
diff --git a/web-console/package-lock.json b/web-console/package-lock.json
index 26999644f1e..2945955d9d6 100644
--- a/web-console/package-lock.json
+++ b/web-console/package-lock.json
@@ -15,7 +15,7 @@
 "@blueprintjs/icons": "^4.16.0",
 "@blueprintjs/popover2": "^1.14.9",
 "@blueprintjs/select": "^4.9.24",
-"@druid-toolkit/query": "^0.22.15",
+"@druid-toolkit/query": "^0.22.20",
 "@druid-toolkit/visuals-core": "^0.3.3",
 "@druid-toolkit/visuals-react": "^0.3.3",
 "ace-builds": "~1.4.14",
@@ -1005,9 +1005,9 @@
   }
 },
 "node_modules/@druid-toolkit/query": {
-  "version": "0.22.15",
-  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.15.tgz";,
-  "integrity": 
"sha512-LyQVIVkVNhduscf2wnBO/oGBvj353tS5ElIws20xQzApvEIwNNxmlkA+8npqwy77BkJj3nRQvlenbSEDHQdqow==",
+  "version": "0.22.20",
+  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.20.tgz";,
+  "integrity": 
"sha512-GmmSd27y7zLVTjgTBQy+XoGeSSGhSDNmwyiwWtSua7I5LX8XqHV7Chi8HIH25YQoVgTK1pLK4RS8eRXxthRAzg==",
   "dependencies": {
 "tslib": "^2.5.2"
   }
@@ -19147,9 +19147,9 @@
   "dev": true
 },
 "@druid-toolkit/query": {
-  "version": "0.22.15",
-  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.15.tgz";,
-  "integrity": 
"sha512-LyQVIVkVNhduscf2wnBO/oGBvj353tS5ElIws20xQzApvEIwNNxmlkA+8npqwy77BkJj3nRQvlenbSEDHQdqow==",
+  "version": "0.22.20",
+  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.20.tgz";,
+  "integrity": 
"sha512-GmmSd27y7zLVTjgTBQy+XoGeSSGhSDNmwyiwWtSua7I5LX8XqHV7Chi8HIH25YQoVgTK1pLK4RS8eRXxthRAzg==",
   "requires": {
 "tslib": "^2.5.2"
   }
diff --git a/web-console/package.json b/web-console/p

(druid) 03/04: moves

2024-06-21 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a commit to branch power-tiles
in repository https://gitbox.apache.org/repos/asf/druid.git

commit 70099ea4a8920d53be1ac95a9d185812e104c0c9
Author: Vadim Ogievetsky 
AuthorDate: Fri Jun 21 14:20:15 2024 -0700

moves
---
 .../generic-output-table/generic-output-table.tsx  |  11 +--
 web-console/src/modules/models/query-source.ts |  20 +++-
 web-console/src/utils/cast-breakdown.ts|  92 +++
 web-console/src/utils/index.tsx|   1 +
 .../edit-column-dialog/edit-column-dialog.scss}|  46 +-
 .../edit-column-dialog/edit-column-dialog.tsx  | 102 +
 .../explore-view/resource-pane/resource-pane.tsx   |  18 +++-
 .../column-editor/column-editor.tsx|  85 ++---
 8 files changed, 266 insertions(+), 109 deletions(-)

diff --git 
a/web-console/src/modules/components/generic-output-table/generic-output-table.tsx
 
b/web-console/src/modules/components/generic-output-table/generic-output-table.tsx
index b41e3842248..22f9c21eb2f 100644
--- 
a/web-console/src/modules/components/generic-output-table/generic-output-table.tsx
+++ 
b/web-console/src/modules/components/generic-output-table/generic-output-table.tsx
@@ -227,16 +227,7 @@ export const GenericOutputTable = React.memo(function 
GenericOutputTable(
 if (column.isTimeColumn()) {
   // ToDo: clean
 } else if (column.sqlType === 'TIMESTAMP') {
-  menuItems.push(
- {
-onQueryAction(q => q.changeSelect(headerIndex, 
selectExpression.as(TIME_COLUMN)));
-  }}
-/>,
-  );
+  // ToDo: clean
 } else {
   // Not a time column ---
   const values = queryResult.rows.map(row => row[headerIndex]);
diff --git a/web-console/src/modules/models/query-source.ts 
b/web-console/src/modules/models/query-source.ts
index 6baac7cd02c..ef5cc65b7ee 100644
--- a/web-console/src/modules/models/query-source.ts
+++ b/web-console/src/modules/models/query-source.ts
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-import type { SqlQuery } from '@druid-toolkit/query';
+import type { SqlExpression, SqlQuery } from '@druid-toolkit/query';
 import { C, SqlStar } from '@druid-toolkit/query';
 
 import type { ExpressionMeta } from '../models';
@@ -60,10 +60,28 @@ export class QuerySource {
 this.columns = columns;
   }
 
+  public getSourceExpressionForColumn(outputName: string): SqlExpression {
+const sourceExpression = this.query
+  .getSelectExpressionsArray()
+  .find(ex => ex.getOutputName() === outputName);
+if (sourceExpression) return sourceExpression;
+return C(outputName);
+  }
+
   public deleteColumn(outputName: string): SqlQuery {
 const noStarQuery = QuerySource.materializeStarIfNeeded(this.query, 
this.columns);
 return noStarQuery.changeSelectExpressions(
   noStarQuery.getSelectExpressionsArray().filter(ex => ex.getOutputName() 
!== outputName),
 );
   }
+
+  public changeExpression(newExpression: SqlExpression): SqlQuery {
+const noStarQuery = QuerySource.materializeStarIfNeeded(this.query, 
this.columns);
+const outputName = newExpression.getOutputName();
+return noStarQuery.changeSelectExpressions(
+  noStarQuery
+.getSelectExpressionsArray()
+.map(ex => (ex.getOutputName() === outputName ? newExpression : ex)),
+);
+  }
 }
diff --git a/web-console/src/utils/cast-breakdown.ts 
b/web-console/src/utils/cast-breakdown.ts
new file mode 100644
index 000..5aee18054df
--- /dev/null
+++ b/web-console/src/utils/cast-breakdown.ts
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ */
+
+import type { SqlType } from '@druid-toolkit/query';
+import { F, SqlExpression, SqlFunction } from '@druid-toolkit/query';
+
+export interface CastBreakdown {
+  formula: string;
+  castType?: SqlType;
+  forceMultiValue: boolean;
+  outputName: string;
+}
+
+export function expressio

(druid) 04/04: edit column wokrs

2024-06-21 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a commit to branch power-tiles
in repository https://gitbox.apache.org/repos/asf/druid.git

commit 252001378cb4fcf383749474cb9bedf88357d1e8
Author: Vadim Ogievetsky 
AuthorDate: Fri Jun 21 18:33:03 2024 -0700

edit column wokrs
---
 web-console/src/modules/models/query-source.ts |  5 ++---
 .../edit-column-dialog/edit-column-dialog.scss | 18 --
 .../edit-column-dialog/edit-column-dialog.tsx  | 12 ++--
 .../views/explore-view/resource-pane/resource-pane.tsx |  7 ++-
 4 files changed, 30 insertions(+), 12 deletions(-)

diff --git a/web-console/src/modules/models/query-source.ts 
b/web-console/src/modules/models/query-source.ts
index ef5cc65b7ee..e7aaac392b5 100644
--- a/web-console/src/modules/models/query-source.ts
+++ b/web-console/src/modules/models/query-source.ts
@@ -75,13 +75,12 @@ export class QuerySource {
 );
   }
 
-  public changeExpression(newExpression: SqlExpression): SqlQuery {
+  public changeExpression(oldOutputName: string, newExpression: 
SqlExpression): SqlQuery {
 const noStarQuery = QuerySource.materializeStarIfNeeded(this.query, 
this.columns);
-const outputName = newExpression.getOutputName();
 return noStarQuery.changeSelectExpressions(
   noStarQuery
 .getSelectExpressionsArray()
-.map(ex => (ex.getOutputName() === outputName ? newExpression : ex)),
+.map(ex => (ex.getOutputName() === oldOutputName ? newExpression : 
ex)),
 );
   }
 }
diff --git 
a/web-console/src/views/explore-view/edit-column-dialog/edit-column-dialog.scss 
b/web-console/src/views/explore-view/edit-column-dialog/edit-column-dialog.scss
index 744ccf6bf8e..0fa0616668d 100644
--- 
a/web-console/src/views/explore-view/edit-column-dialog/edit-column-dialog.scss
+++ 
b/web-console/src/views/explore-view/edit-column-dialog/edit-column-dialog.scss
@@ -26,14 +26,28 @@
 
   .#{$bp-ns}-dialog-body {
 display: flex;
-gap: 8px;
+gap: 10px;
 
 .controls {
   flex: 1;
+  display: flex;
+  flex-direction: column;
+
+  .sql-expression-form-group {
+flex: 1;
+
+.#{$bp-ns}-form-content {
+  flex: 1;
+
+  .flexible-query-input {
+height: 100%;
+  }
+}
+  }
 }
 
 .preview {
-  width: 200px;
+  width: 250px;
 }
   }
 
diff --git 
a/web-console/src/views/explore-view/edit-column-dialog/edit-column-dialog.tsx 
b/web-console/src/views/explore-view/edit-column-dialog/edit-column-dialog.tsx
index b56cdbc1b6b..a1b814ae4d8 100644
--- 
a/web-console/src/views/explore-view/edit-column-dialog/edit-column-dialog.tsx
+++ 
b/web-console/src/views/explore-view/edit-column-dialog/edit-column-dialog.tsx
@@ -27,7 +27,7 @@ import { FlexibleQueryInput } from 
'../../workbench-view/flexible-query-input/fl
 import './edit-column-dialog.scss';
 
 export interface EditColumnDialogProps {
-  initExpression?: SqlExpression;
+  initExpression: SqlExpression | undefined;
   onApply(expression: SqlExpression): void;
   onClose(): void;
 }
@@ -35,11 +35,10 @@ export interface EditColumnDialogProps {
 export const EditColumnDialog = React.memo(function EditColumnDialog(props: 
EditColumnDialogProps) {
   const { initExpression, onApply, onClose } = props;
 
-  const [initBreakdown] = useState(
-initExpression ? expressionToCastBreakdown(initExpression) : undefined,
-  );
   const [currentBreakdown, setCurrentBreakdown] = useState(
-initBreakdown || { formula: '', forceMultiValue: false, outputName: '' },
+initExpression
+  ? expressionToCastBreakdown(initExpression)
+  : { formula: '', forceMultiValue: false, outputName: '' },
   );
 
   return (
@@ -54,7 +53,7 @@ export const EditColumnDialog = React.memo(function 
EditColumnDialog(props: Edit
   }}
 />
   
-  
+  
 
   
 
diff --git a/web-console/src/views/explore-view/resource-pane/resource-pane.tsx 
b/web-console/src/views/explore-view/resource-pane/resource-pane.tsx
index 877b96cb3c5..8ae19029136 100644
--- a/web-console/src/views/explore-view/resource-pane/resource-pane.tsx
+++ b/web-console/src/views/explore-view/resource-pane/resource-pane.tsx
@@ -106,7 +106,12 @@ export const ResourcePane = function ResourcePane(props: 
ResourcePaneProps) {
   
   {editedExpression && (
  
onQueryChange(querySource.changeExpression(newExpression))}
+  initExpression={editedExpression}
+  onApply={newExpression =>
+onQueryChange(
+  querySource.changeExpression(editedExpression.getOutputName()!, 
newExpression),
+)
+  }
   onClose={() => setEditedExpression(undefined)}
 />
   )}


-
To 

(druid) branch power-tiles created (now 252001378cb)

2024-06-21 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch power-tiles
in repository https://gitbox.apache.org/repos/asf/druid.git


  at 252001378cb edit column wokrs

This branch includes the following new commits:

 new cfd6078e8a9 start
 new a5a4036a6d5 filter sane
 new 70099ea4a89 moves
 new 252001378cb edit column wokrs

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch 30.0.0 updated: Web console: fix pagination and filtering regression in supervisor view (#16571) (#16575)

2024-06-07 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/30.0.0 by this push:
 new 925bbc275db Web console: fix pagination and filtering regression in 
supervisor view (#16571) (#16575)
925bbc275db is described below

commit 925bbc275db8f804f6fe745dcdb8a69b0d62c6d2
Author: Karan Kumar 
AuthorDate: Fri Jun 7 22:12:24 2024 +0530

Web console: fix pagination and filtering regression in supervisor view 
(#16571) (#16575)

* fix pagination and filtering in supervisor view

* update snapshot

(cherry picked from commit efe9079f0a4163636fb41bfecd0200c4c12065f8)

Co-authored-by: Vadim Ogievetsky 
---
 .../__snapshots__/supervisors-view.spec.tsx.snap   | 10 +
 .../views/supervisors-view/supervisors-view.tsx| 24 +++---
 2 files changed, 23 insertions(+), 11 deletions(-)

diff --git 
a/web-console/src/views/supervisors-view/__snapshots__/supervisors-view.spec.tsx.snap
 
b/web-console/src/views/supervisors-view/__snapshots__/supervisors-view.spec.tsx.snap
index f43b9d3eb90..b20802ca4b8 100644
--- 
a/web-console/src/views/supervisors-view/__snapshots__/supervisors-view.spec.tsx.snap
+++ 
b/web-console/src/views/supervisors-view/__snapshots__/supervisors-view.spec.tsx.snap
@@ -192,7 +192,7 @@ exports[`SupervisorsView matches snapshot 1`] = `
   "accessor": "detailed_state",
   "id": "detailed_state",
   "show": true,
-  "width": 130,
+  "width": 150,
 },
 {
   "Cell": [Function],
@@ -374,11 +374,12 @@ exports[`SupervisorsView matches snapshot 1`] = `
 indexKey="_index"
 loading={false}
 loadingText="Loading..."
+manual={true}
 multiSort={true}
 nestingLevelKey="_nestingLevel"
 nextText="Next"
 noDataText=""
-ofText="of"
+ofText=""
 onFetchData={[Function]}
 onFilteredChange={[Function]}
 originalKey="_original"
@@ -391,6 +392,7 @@ exports[`SupervisorsView matches snapshot 1`] = `
   ]
 }
 pageText="Page"
+pages={1000}
 pivotDefaults={{}}
 pivotIDKey="_pivotID"
 pivotValKey="_pivotVal"
@@ -399,9 +401,9 @@ exports[`SupervisorsView matches snapshot 1`] = `
 resolveData={[Function]}
 rowsSelectorText="rows per page"
 rowsText="rows"
-showPageJump={true}
+showPageJump={false}
 showPageSizeOptions={true}
-showPagination={false}
+showPagination={true}
 showPaginationBottom={true}
 showPaginationTop={false}
 sortable={true}
diff --git a/web-console/src/views/supervisors-view/supervisors-view.tsx 
b/web-console/src/views/supervisors-view/supervisors-view.tsx
index f6604445587..68654cbce79 100644
--- a/web-console/src/views/supervisors-view/supervisors-view.tsx
+++ b/web-console/src/views/supervisors-view/supervisors-view.tsx
@@ -19,6 +19,7 @@
 import { Icon, Intent, Menu, MenuItem, Position, Tag } from 
'@blueprintjs/core';
 import { IconNames } from '@blueprintjs/icons';
 import { Popover2 } from '@blueprintjs/popover2';
+import { SqlExpression } from '@druid-toolkit/query';
 import * as JSONBig from 'json-bigint-native';
 import type { JSX } from 'react';
 import React from 'react';
@@ -65,6 +66,7 @@ import {
   assemble,
   checkedCircleIcon,
   deepGet,
+  filterMap,
   formatByteRate,
   formatBytes,
   formatInteger,
@@ -227,6 +229,12 @@ export class SupervisorsView extends React.PureComponent<
   ) => {
 let supervisors: SupervisorQueryResultRow[];
 if (capabilities.hasSql()) {
+  let filterClause = '';
+  const whereParts = filterMap(filtered, sqlQueryCustomTableFilter);
+  if (whereParts.length) {
+filterClause = SqlExpression.and(...whereParts).toString();
+  }
+
   const sqlQuery = assemble(
 'WITH s AS (SELECT',
 '  "supervisor_id",',
@@ -238,9 +246,7 @@ export class SupervisorsView extends React.PureComponent<
 'FROM "sys"."supervisors")',
 'SELECT *',
 'FROM s',
-filtered.length
-  ? `WHERE ${filtered.map(sqlQueryCustomTableFilter).join(' AND 
')}`
-  : undefined,
+filterClause ? `WHERE ${filterClause}` : undefined,
 sortedToOrderByClause(sorted),
 `LIMIT ${pageSize}`,
 page ? `OFFSET ${page * pageSize}` : undefined,
@@ -638,19 +644,23 @@ export class SupervisorsView extends React.PureCompone

(druid) branch master updated (540d3e6af5f -> 0b4ac78a7bb)

2024-06-04 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


from 540d3e6af5f Added new use cases and description of the use case - 
5/14/24 (#16451)
 add 0b4ac78a7bb Web console: fix delta sorting in the explore view table 
(#16542)

No new revisions were added by this update.

Summary of changes:
 licenses.yaml  | 2 +-
 web-console/package-lock.json  |14 +-
 web-console/package.json   | 2 +-
 web-console/script/druid   | 5 +-
 .../record-table-pane/record-table-pane.tsx| 3 +-
 .../supervisor-reset-offsets-dialog.tsx| 3 +-
 .../external-config/external-config.ts | 2 +-
 web-console/src/test-utils.ts  |66 +
 web-console/src/utils/general.tsx  |12 +
 .../src/views/explore-view/explore-view.tsx|42 +-
 .../time-relative-filter-control.tsx   |   108 +-
 .../explore-view/modules/table-react-module.tsx|   484 +-
 .../utils/__snapshots__/table-query.spec.ts.snap   | 39502 +++
 .../explore-view/modules/utils/table-query.spec.ts |   486 +
 .../explore-view/modules/utils/table-query.ts  |   874 +
 .../src/views/explore-view/modules/utils/utils.ts  |34 +-
 web-console/src/views/explore-view/utils/misc.ts   |13 +-
 .../number-menu-items/number-menu-items.tsx|11 +-
 .../src/views/workbench-view/demo-queries.ts   | 2 +-
 .../result-table-pane/result-table-pane.tsx|31 +-
 .../time-floor-menu-item/time-floor-menu-item.tsx  | 7 +-
 21 files changed, 41143 insertions(+), 560 deletions(-)
 create mode 100644 web-console/src/test-utils.ts
 create mode 100644 
web-console/src/views/explore-view/modules/utils/__snapshots__/table-query.spec.ts.snap
 create mode 100644 
web-console/src/views/explore-view/modules/utils/table-query.spec.ts
 create mode 100644 
web-console/src/views/explore-view/modules/utils/table-query.ts


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch more_explore_fixes deleted (was 198dc06543c)

2024-05-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch more_explore_fixes
in repository https://gitbox.apache.org/repos/asf/druid.git


 was 198dc06543c tidy up

This change permanently discards the following revisions:

 discard 198dc06543c tidy up
 discard 3ab96b1ecfd pivot values are just measures
 discard 901f14cae49 stuff is working
 discard 0e274e965af pre topValuesQuery removal
 discard e664222e9fd checkpoint
 discard a28853b90aa steps
 discard 6092f27cf19 some stop
 discard a9912337c4a tidy up
 discard b166c76f699 tidy up
 discard 1d4a72d09f0 progress
 discard d1f40dde622 more robust query naming


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 01/11: more robust query naming

2024-05-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit d1f40dde6229352f6230194a927e3835965dcf67
Author: Vadim Ogievetsky 
AuthorDate: Fri May 17 10:54:24 2024 -0700

more robust query naming
---
 .../src/views/explore-view/explore-view.tsx| 16 +++-
 .../explore-view/modules/table-react-module.tsx| 89 +++---
 2 files changed, 59 insertions(+), 46 deletions(-)

diff --git a/web-console/src/views/explore-view/explore-view.tsx 
b/web-console/src/views/explore-view/explore-view.tsx
index cdc19d96d3e..376334c8443 100644
--- a/web-console/src/views/explore-view/explore-view.tsx
+++ b/web-console/src/views/explore-view/explore-view.tsx
@@ -18,7 +18,7 @@
 
 import './modules';
 
-import { Menu, MenuItem } from '@blueprintjs/core';
+import { Intent, Menu, MenuItem } from '@blueprintjs/core';
 import { IconNames } from '@blueprintjs/icons';
 import type { SqlExpression, SqlTable } from '@druid-toolkit/query';
 import { C, L, sql, SqlLiteral, SqlQuery, T } from '@druid-toolkit/query';
@@ -28,11 +28,13 @@ import {
   useParameterValues,
   useSingleHost,
 } from '@druid-toolkit/visuals-react';
+import copy from 'copy-to-clipboard';
 import React, { useEffect, useMemo, useRef, useState } from 'react';
 import { useStore } from 'zustand';
 
 import { ShowValueDialog } from 
'../../dialogs/show-value-dialog/show-value-dialog';
 import { useLocalStorageState, useQueryManager } from '../../hooks';
+import { AppToaster } from '../../singletons';
 import { deepGet, filterMap, findMap, LocalStorageKeys, oneOf, queryDruidSql } 
from '../../utils';
 
 import { ControlPane } from './control-pane/control-pane';
@@ -320,6 +322,18 @@ export const ExploreView = React.memo(function 
ExploreView() {
   }}
   moreMenu={
 
+   {
+  copy(QUERY_HISTORY[0]?.sqlQuery, { format: 'text/plain' });
+  AppToaster.show({
+message: `Copied query to clipboard`,
+intent: Intent.SUCCESS,
+  });
+}}
+  />
{
+  return getInitQuery(table, shiftTimeInExpression(where, compare))
+.applyIf(topValuesQuery, q =>
+  q.addInnerJoin(
+T(TOP_VALUES_NAME),
+getJoinCondition(splitColumns, T('t'), T(TOP_VALUES_NAME)),
+  ),
+)
+.applyForEach(splitColumns, (q, splitColumn) =>
+  q.addSelect(toGroupByExpression(splitColumn, timeBucket, compare), {
+addToGroupBy: 'end',
+  }),
+)
+.applyIf(orderByCompareDuration === compare, q =>
+  q.applyForEach(showColumns, (q, showColumn) =>
+q.addSelect(toShowColumnExpression(showColumn, multipleValueMode)),
+  ),
+)
+.applyForEach(metrics, (q, metric) =>
+  
q.addSelect(metric.expression.as(`${metric.name}:cmp:${compare}:value`)),
+)
+.applyIf(compare === orderByCompareDuration && orderByCompareType === 
'value', q =>
+  q
+
.changeOrderByExpression(effectiveOrderBy.changeExpression(C(orderByCompareMeasure!)))
+.changeLimitValue(maxRows),
+);
+};
+
 const main = T('main');
 const leader = T(orderByCompareDuration ? 
`compare_${orderByCompareDuration}` : 'main');
 const query = SqlQuery.from(leader)
@@ -465,36 +493,7 @@ function TableModule(props: TableModuleProps) {
 ).concat(
   SqlWithPart.simple('main', mainQuery),
   compares.map(compare =>
-SqlWithPart.simple(
-  `compare_${compare}`,
-  getInitQuery(table, shiftTimeInExpression(where, compare))
-.applyIf(topValuesQuery, q =>
-  q.addInnerJoin(
-T(TOP_VALUES_NAME),
-getJoinCondition(splitColumns, T('t'), T(TOP_VALUES_NAME)),
-  ),
-)
-.applyForEach(splitColumns, (q, splitColumn) =>
-  q.addSelect(toGroupByExpression(splitColumn, timeBucket, 
compare), {
-addToGroupBy: 'end',
-  }),
-)
-.applyIf(orderByCompareDuration === compare, q =>
-  q.applyForEach(showColumns, (q, showColumn) =>
-q.addSelect(toShowColumnExpression(showColumn, 
multipleValueMode)),
-  ),
-)
-.applyForEach(metrics, (q, metric) =>
-  q.addSelect(metric.expression.a

(druid) 09/11: stuff is working

2024-05-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 901f14cae49c2202205c1ef8849c9ec745b91482
Author: Vadim Ogievetsky 
AuthorDate: Fri May 24 20:36:47 2024 -0700

stuff is working
---
 .../explore-view/modules/table-react-module.tsx| 151 -
 1 file changed, 84 insertions(+), 67 deletions(-)

diff --git a/web-console/src/views/explore-view/modules/table-react-module.tsx 
b/web-console/src/views/explore-view/modules/table-react-module.tsx
index d1c540301e5..3cc7b130eaa 100644
--- a/web-console/src/views/explore-view/modules/table-react-module.tsx
+++ b/web-console/src/views/explore-view/modules/table-react-module.tsx
@@ -53,9 +53,11 @@ import './table-react-module.scss';
 
 type MultipleValueMode = 'null' | 'empty' | 'latest' | 'latestNonNull' | 
'count';
 
+type Compare = `P${string}`;
+
 type CompareType = 'value' | 'delta' | 'absDelta' | 'percent' | 'absPercent';
 
-type RestrictTop = 'always' | 'orderByDelta' | 'never';
+type RestrictTop = 'always' | 'never';
 
 // As of this writing ordering the outer query on something other than __time 
sometimes throws an error, set this to false / remove it
 // when ordering on non __time is more robust
@@ -90,6 +92,8 @@ const KNOWN_AGGREGATIONS = [
   'ANY_VALUE',
 ];
 
+const TOTAL_SUB_QUERY_LIMIT = 10;
+
 const TOP_VALUES_NAME = 'top_values';
 const TOP_VALUES_K = 5000;
 
@@ -108,7 +112,7 @@ function anyValue(ex: SqlExpression) {
 function toGroupByExpression(
   splitColumn: ExpressionMeta,
   timeBucket: string,
-  compareShiftDuration?: string,
+  compareShiftDuration: string | undefined,
 ): SqlAlias {
   const { expression, sqlType, name } = splitColumn;
   return addTableScope(expression, 't')
@@ -116,7 +120,7 @@ function toGroupByExpression(
   F.timeShift(e, compareShiftDuration!, 1),
 )
 .applyIf(sqlType === 'TIMESTAMP', e => F.timeFloor(e, timeBucket))
-.as(name) as SqlAlias;
+.as(name);
 }
 
 function toShowColumnExpression(showColumn: ExpressionMeta, mode: 
MultipleValueMode): SqlAlias {
@@ -157,7 +161,7 @@ function toShowColumnExpression(showColumn: ExpressionMeta, 
mode: MultipleValueM
 ex = 
SqlCase.ifThenElse(SqlFunction.countDistinct(showColumn.expression).equal(1), 
ex, elseEx);
   }
 
-  return ex.as(showColumn.name) as SqlAlias;
+  return ex.as(showColumn.name);
 }
 
 function getJoinConditions(
@@ -179,13 +183,12 @@ function getInnerJoinConditions(groupByExpressions: 
SqlAlias[]): SqlExpression[]
   );
 }
 
-/// getJoinConditions(splitColumns, T('t'), T(TOP_VALUES_NAME)),
-
-function makeCompareMetricName(metricName: string, compare: string, 
compareType: CompareType) {
+function makeCompareMetricName(metricName: string, compare: Compare, 
compareType: CompareType) {
   return `${metricName}:compare:${compare}:${compareType}`;
 }
 
 interface DecodedOrderBy {
+  orderedThing: ExpressionMeta;
   orderedSplitColumn?: ExpressionMeta;
   orderedShowColumn?: ExpressionMeta;
   orderedMetric?: ExpressionMeta;
@@ -202,22 +205,24 @@ function decodeTableOrderBy(
   if (!(orderBy?.expression instanceof SqlColumn)) return;
 
   const orderByColumnName = orderBy.expression.getName();
+  let orderedThing: ExpressionMeta;
   let orderedSplitColumn: ExpressionMeta | undefined;
   let orderedShowColumn: ExpressionMeta | undefined;
   let orderedMetric: ExpressionMeta | undefined;
-  let orderedCompareDuration: string | undefined;
+  let orderedCompareDuration: Compare | undefined;
   let orderedCompareType: CompareType | undefined;
 
   const m = orderByColumnName.match(
-/^(.+):compare:([^:]+):(value|delta|absDelta|percent|absPercent)$/,
+/^(.+):compare:(P[^:]+):(value|delta|absDelta|percent|absPercent)$/,
   );
   if (m) {
 if (!hasCompare) return;
 const compareMetricName = m[1];
-orderedCompareDuration = m[2];
+orderedCompareDuration = m[2] as Compare;
 orderedCompareType = m[3] as CompareType;
 orderedMetric = metrics.find(metric => metric.name === compareMetricName);
 if (!orderedMetric) return;
+orderedThing = orderedMetric;
   } else {
 orderedSplitColumn = splitColumns.find(splitColumn => splitColumn.name === 
orderByColumnName);
 orderedShowColumn = showColumns.find(showColumn => showColumn.name === 
orderByColumnName);
@@ -228,9 +233,11 @@ function decodeTableOrderBy(
 ) {
   return;
 }
+orderedThing = (orderedSplitColumn || orderedShowColumn || orderedMetric)!;
   }
 
   return {
+orderedThing,
 orderedSplitColumn,
 orderedShowColumn,
 orderedMetric,
@@ -342,7 +349,7 @@ export default typedVisualModule({
 },
 restrictTop: {
   typ

(druid) 04/11: tidy up

2024-05-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit a9912337c4a5316918dbf375ad031cd37fbc0637
Author: Vadim Ogievetsky 
AuthorDate: Mon May 20 11:43:21 2024 -0700

tidy up
---
 web-console/src/utils/general.tsx  | 12 +
 .../explore-view/modules/table-react-module.tsx| 62 +-
 2 files changed, 49 insertions(+), 25 deletions(-)

diff --git a/web-console/src/utils/general.tsx 
b/web-console/src/utils/general.tsx
index 4fda8cd0c02..c4474ef2227 100644
--- a/web-console/src/utils/general.tsx
+++ b/web-console/src/utils/general.tsx
@@ -281,6 +281,18 @@ export function formatMillions(n: NumberLike): string {
   return s + ' M';
 }
 
+export function forceSignInNumberFormatter(
+  formatter: (n: NumberLike) => string,
+): (n: NumberLike) => string {
+  return (n: NumberLike) => {
+if (n < 0) {
+  return formatter(n);
+} else {
+  return '+' + formatter(n);
+}
+  };
+}
+
 function pad2(str: string | number): string {
   return ('00' + str).slice(-2);
 }
diff --git a/web-console/src/views/explore-view/modules/table-react-module.tsx 
b/web-console/src/views/explore-view/modules/table-react-module.tsx
index 01b4c22a70f..1593925d8d3 100644
--- a/web-console/src/views/explore-view/modules/table-react-module.tsx
+++ b/web-console/src/views/explore-view/modules/table-react-module.tsx
@@ -17,7 +17,7 @@
  */
 
 import { Button } from '@blueprintjs/core';
-import type { SqlExpression, SqlOrderByExpression, SqlTable } from 
'@druid-toolkit/query';
+import type { SqlAlias, SqlExpression, SqlOrderByExpression, SqlTable } from 
'@druid-toolkit/query';
 import {
   C,
   F,
@@ -38,7 +38,12 @@ import ReactDOM from 'react-dom';
 import { Loader } from '../../../components';
 import { useQueryManager } from '../../../hooks';
 import type { ColumnHint } from '../../../utils';
-import { formatInteger, formatPercent } from '../../../utils';
+import {
+  forceSignInNumberFormatter,
+  formatInteger,
+  formatNumber,
+  formatPercent,
+} from '../../../utils';
 import { getInitQuery } from '../utils';
 
 import { GenericOutputTable } from './components';
@@ -111,20 +116,17 @@ function toGroupByExpression(
   splitColumn: ExpressionMeta,
   timeBucket: string,
   compareShiftDuration?: string,
-) {
+): SqlAlias {
   const { expression, sqlType, name } = splitColumn;
   return addTableScope(expression, 't')
 .applyIf(sqlType === 'TIMESTAMP' && compareShiftDuration, e =>
   F.timeShift(e, compareShiftDuration!, 1),
 )
 .applyIf(sqlType === 'TIMESTAMP', e => F.timeFloor(e, timeBucket))
-.as(name);
+.as(name) as SqlAlias;
 }
 
-function toShowColumnExpression(
-  showColumn: ExpressionMeta,
-  mode: MultipleValueMode,
-): SqlExpression {
+function toShowColumnExpression(showColumn: ExpressionMeta, mode: 
MultipleValueMode): SqlAlias {
   let ex: SqlExpression = SqlFunction.simple('LATEST', [showColumn.expression, 
1024]);
 
   let elseEx: SqlExpression | undefined;
@@ -162,7 +164,7 @@ function toShowColumnExpression(
 ex = 
SqlCase.ifThenElse(SqlFunction.countDistinct(showColumn.expression).equal(1), 
ex, elseEx);
   }
 
-  return ex.as(showColumn.name);
+  return ex.as(showColumn.name) as SqlAlias;
 }
 
 function getJoinConditions(
@@ -178,15 +180,16 @@ function getJoinConditions(
 function cascadingInnerJoin(
   outerQuery: SqlQuery,
   innerQuery: SqlQuery,
-  splitColumns: ExpressionMeta[],
+  groupByExpressions: SqlAlias[],
 ) {
-  const innerAggregators = 
innerQuery.getOutputColumns().slice(splitColumns.length);
+  const innerAggregators = 
innerQuery.getOutputColumns().slice(groupByExpressions.length);
 
   outerQuery = outerQuery.addInnerJoin(
 innerQuery.as('i'),
-splitColumns.map(
-  ({ expression, name }) =>
-addTableScope(expression, 't').isNotDistinctFrom(T('i').column(name)), 
// ToDo: use a form of 'toGroupByExpression
+groupByExpressions.map(groupByExpression =>
+  addTableScope(groupByExpression.getUnderlyingExpression(), 
't').isNotDistinctFrom(
+T('i').column(groupByExpression.getOutputName()!),
+  ),
 ),
   );
 
@@ -407,12 +410,20 @@ function TableModule(props: TableModuleProps) {
   }
 }
 
+const groupByExpressions = splitColumns.map(splitColumn =>
+  toGroupByExpression(splitColumn, timeBucket),
+);
+
+const showColumnExpressions: SqlAlias[] = showColumns.map(showColumn =>
+  toShowColumnExpression(showColumn, multipleValueMode),
+);
+
 const metricExpression = metrics.find(m => m.name === 
orderByCompareMeasure)?.expression;
 

(druid) 11/11: tidy up

2024-05-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 198dc06543c922f4e8af4f21d6ce3200902205af
Author: Vadim Ogievetsky 
AuthorDate: Fri May 24 21:30:40 2024 -0700

tidy up
---
 web-console/src/views/explore-view/modules/table-react-module.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/web-console/src/views/explore-view/modules/table-react-module.tsx 
b/web-console/src/views/explore-view/modules/table-react-module.tsx
index f6d97a2f1fd..e226dab7e67 100644
--- a/web-console/src/views/explore-view/modules/table-react-module.tsx
+++ b/web-console/src/views/explore-view/modules/table-react-module.tsx
@@ -612,17 +612,17 @@ function TableModule(props: TableModuleProps) {
   const metricName = metric.name;
 
   const mainMetric = main
-.column(metric.name)
+.column(metricName)
 .applyIf(NEEDS_GROUPING_TO_ORDER, anyValue)
 .apply(coalesce0);
 
   return [
-mainMetric.as(metric.name),
+mainMetric.as(metricName),
 ...compares.flatMap(compare => {
   const group = `${compare} comparison`;
 
   const prevMetric = T(`compare_${compare}`)
-.column(metric.name)
+.column(metricName)
 .applyIf(NEEDS_GROUPING_TO_ORDER, anyValue)
 .apply(coalesce0);
 


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 07/11: checkpoint

2024-05-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit e664222e9fd48e9da6560d4b626cba8c858d745a
Author: Vadim Ogievetsky 
AuthorDate: Wed May 22 08:32:14 2024 -0700

checkpoint
---
 licenses.yaml  |  2 +-
 web-console/package-lock.json  | 14 ++---
 web-console/package.json   |  2 +-
 .../explore-view/modules/table-react-module.tsx| 70 --
 web-console/src/views/explore-view/utils/misc.ts   | 13 +++-
 .../number-menu-items/number-menu-items.tsx| 11 ++--
 6 files changed, 65 insertions(+), 47 deletions(-)

diff --git a/licenses.yaml b/licenses.yaml
index c8380e3940d..56fee9a6362 100644
--- a/licenses.yaml
+++ b/licenses.yaml
@@ -5094,7 +5094,7 @@ license_category: binary
 module: web-console
 license_name: Apache License version 2.0
 copyright: Imply Data
-version: 0.22.13
+version: 0.22.14
 
 ---
 
diff --git a/web-console/package-lock.json b/web-console/package-lock.json
index 7e6a2fd0dc2..f931544654e 100644
--- a/web-console/package-lock.json
+++ b/web-console/package-lock.json
@@ -15,7 +15,7 @@
 "@blueprintjs/icons": "^4.16.0",
 "@blueprintjs/popover2": "^1.14.9",
 "@blueprintjs/select": "^4.9.24",
-"@druid-toolkit/query": "^0.22.13",
+"@druid-toolkit/query": "^0.22.14",
 "@druid-toolkit/visuals-core": "^0.3.3",
 "@druid-toolkit/visuals-react": "^0.3.3",
 "ace-builds": "~1.4.14",
@@ -1005,9 +1005,9 @@
   }
 },
 "node_modules/@druid-toolkit/query": {
-  "version": "0.22.13",
-  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.13.tgz";,
-  "integrity": 
"sha512-p0Cmmbk55vLaYs2WWcUr09qDRU2IrkXOxGgUG+wS6Uuq/ALBqSmUDlbMSxB3vJjMvegiwgJ8+n7VfVpO0t/bJg==",
+  "version": "0.22.14",
+  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.14.tgz";,
+  "integrity": 
"sha512-f+VCqThTx5jiIL7V1vYeqxPJCS3dIp0K9iqo38BJyPbOJ+piq5K+fZcGsrQnEzbomre7odr5qOrN7Mlb7Q8obw==",
   "dependencies": {
 "tslib": "^2.5.2"
   }
@@ -19147,9 +19147,9 @@
   "dev": true
 },
 "@druid-toolkit/query": {
-  "version": "0.22.13",
-  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.13.tgz";,
-  "integrity": 
"sha512-p0Cmmbk55vLaYs2WWcUr09qDRU2IrkXOxGgUG+wS6Uuq/ALBqSmUDlbMSxB3vJjMvegiwgJ8+n7VfVpO0t/bJg==",
+  "version": "0.22.14",
+  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.14.tgz";,
+  "integrity": 
"sha512-f+VCqThTx5jiIL7V1vYeqxPJCS3dIp0K9iqo38BJyPbOJ+piq5K+fZcGsrQnEzbomre7odr5qOrN7Mlb7Q8obw==",
   "requires": {
 "tslib": "^2.5.2"
   }
diff --git a/web-console/package.json b/web-console/package.json
index a6f4e514660..2f5d0f5c904 100644
--- a/web-console/package.json
+++ b/web-console/package.json
@@ -69,7 +69,7 @@
 "@blueprintjs/icons": "^4.16.0",
 "@blueprintjs/popover2": "^1.14.9",
 "@blueprintjs/select": "^4.9.24",
-"@druid-toolkit/query": "^0.22.13",
+"@druid-toolkit/query": "^0.22.14",
 "@druid-toolkit/visuals-core": "^0.3.3",
 "@druid-toolkit/visuals-react": "^0.3.3",
 "ace-builds": "~1.4.14",
diff --git a/web-console/src/views/explore-view/modules/table-react-module.tsx 
b/web-console/src/views/explore-view/modules/table-react-module.tsx
index 86be17da06a..d1c540301e5 100644
--- a/web-console/src/views/explore-view/modules/table-react-module.tsx
+++ b/web-console/src/views/explore-view/modules/table-react-module.tsx
@@ -44,7 +44,7 @@ import {
   formatNumber,
   formatPercent,
 } from '../../../utils';
-import { getInitQuery } from '../utils';
+import { addTableScope, getInitQuery } from '../utils';
 
 import { GenericOutputTable } from './components';
 import { getWhereForCompares, shiftTimeInExpression } from './utils/utils';
@@ -55,6 +55,8 @@ type MultipleValueMode = 'null' | 'empty' | 'latest' | 
'latestNonNull' | 'count'
 
 type CompareType = 'value' | 'delta' | 'absDelta' | 'percent' | 

(druid) 10/11: pivot values are just measures

2024-05-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 3ab96b1ecfdaa094f32913da124f81a040939b55
Author: Vadim Ogievetsky 
AuthorDate: Fri May 24 21:22:33 2024 -0700

pivot values are just measures
---
 .../explore-view/modules/table-react-module.tsx| 196 ++---
 1 file changed, 92 insertions(+), 104 deletions(-)

diff --git a/web-console/src/views/explore-view/modules/table-react-module.tsx 
b/web-console/src/views/explore-view/modules/table-react-module.tsx
index 3cc7b130eaa..f6d97a2f1fd 100644
--- a/web-console/src/views/explore-view/modules/table-react-module.tsx
+++ b/web-console/src/views/explore-view/modules/table-react-module.tsx
@@ -327,7 +327,6 @@ export default typedVisualModule({
   P1M: '1 month',
   P1Y: '1 year',
 },
-visible: ({ params }) => !params.pivotColumn,
   },
 },
 
@@ -337,7 +336,7 @@ export default typedVisualModule({
   default: ['value', 'delta'],
   control: {
 label: 'Compare types',
-visible: ({ params }) => Boolean((params.compares || []).length) && 
!params.pivotColumn,
+visible: ({ params }) => Boolean((params.compares || []).length),
 optionLabels: {
   value: 'Value',
   delta: 'Delta',
@@ -353,7 +352,7 @@ export default typedVisualModule({
   default: 'always',
   control: {
 label: `Restrict to top ${formatInteger(TOP_VALUES_K)} values when...`,
-visible: ({ params }) => Boolean((params.compares || []).length) && 
!params.pivotColumn,
+visible: ({ params }) => Boolean((params.compares || []).length),
   },
 },
 
@@ -430,16 +429,28 @@ function TableModule(props: TableModuleProps) {
 const showColumns: ExpressionMeta[] = parameterValues.showColumns;
 const multipleValueMode: MultipleValueMode = 
parameterValues.multipleValueMode || 'null';
 const pivotColumn: ExpressionMeta = parameterValues.pivotColumn;
-const metrics: ExpressionMeta[] = parameterValues.metrics;
+let metrics: ExpressionMeta[] = parameterValues.metrics;
 const compares: Compare[] = parameterValues.compares || [];
 const compareTypes: CompareType[] = parameterValues.compareTypes;
 const restrictTop: RestrictTop = parameterValues.restrictTop;
 const maxRows: number = parameterValues.maxRows;
 
 const pivotValues = pivotColumn ? pivotValueState.data : undefined;
-if (pivotColumn && !pivotValues) return;
+if (pivotColumn) {
+  if (!pivotValues) return;
+  metrics = pivotValues.flatMap(pivotValue =>
+metrics.map(metric => ({
+  ...metric,
+  name: `${pivotValue}:${metric.name}`,
+  expression: metric.expression.addFilterToAggregations(
+pivotColumn.expression.equal(pivotValue),
+KNOWN_AGGREGATIONS,
+  ),
+})),
+  );
+}
 
-const hasCompare = !pivotColumn && Boolean(compares.length) && 
Boolean(compareTypes.length);
+const hasCompare = Boolean(compares.length) && 
Boolean(compareTypes.length);
 
 let decodedOrderBy = decodeTableOrderBy(
   orderBy,
@@ -483,31 +494,10 @@ function TableModule(props: TableModuleProps) {
   addToGroupBy: 'end',
 }),
   )
-  .applyIf(!orderByCompareDuration, q =>
-q.applyForEach(showColumnExpressions, (q, showColumnExpression) =>
-  q.addSelect(showColumnExpression),
-),
-  )
-  .applyForEach(pivotValues || [''], (q, pivotValue, i) =>
-q.applyForEach(metrics, (q, metric) => {
-  const alias = `${metric.name}${pivotColumn && i > 0 ? 
`:${pivotValue}` : ''}`;
-  if (pivotColumn) {
-columnHints.set(alias, { displayName: metric.name, group: 
pivotValue });
-  }
-  return q.addSelect(
-metric.expression
-  .as(metric.name)
-  .applyIf(pivotColumn, q =>
-q
-  .addFilterToAggregations(
-pivotColumn.expression.equal(pivotValue),
-KNOWN_AGGREGATIONS,
-  )
-  .as(alias),
-  ),
-  );
-}),
+  .applyForEach(showColumnExpressions, (q, showColumnExpression) =>
+q.addSelect(showColumnExpression),
   )
+  .applyForEach(metrics, (q, metric) => 
q.addSelect(metric.expression.as(metric.name)))
   .changeOrderByExpression(effectiveOrderBy)
   .changeLimitValue(maxRows);
 
@@ -618,82 +608,80 @@ function TableModule(props: TableModuleProps) {
 ),
   ).as(showColumn.name),
 ),
-...metrics.map(metric =>
-

(druid) 08/11: pre topValuesQuery removal

2024-05-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 0e274e965afff364d140a3854e4e3890ad9a285d
Author: Vadim Ogievetsky 
AuthorDate: Wed May 22 21:01:50 2024 -0700

pre topValuesQuery removal
---
 licenses.yaml  |  2 +-
 web-console/package-lock.json  | 14 +++---
 web-console/package.json   |  2 +-
 .../src/druid-models/external-config/external-config.ts|  2 +-
 .../workbench-view/result-table-pane/result-table-pane.tsx |  4 ++--
 .../time-floor-menu-item/time-floor-menu-item.tsx  |  7 ---
 6 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/licenses.yaml b/licenses.yaml
index 56fee9a6362..752e8208164 100644
--- a/licenses.yaml
+++ b/licenses.yaml
@@ -5094,7 +5094,7 @@ license_category: binary
 module: web-console
 license_name: Apache License version 2.0
 copyright: Imply Data
-version: 0.22.14
+version: 0.22.15
 
 ---
 
diff --git a/web-console/package-lock.json b/web-console/package-lock.json
index f931544654e..26999644f1e 100644
--- a/web-console/package-lock.json
+++ b/web-console/package-lock.json
@@ -15,7 +15,7 @@
 "@blueprintjs/icons": "^4.16.0",
 "@blueprintjs/popover2": "^1.14.9",
 "@blueprintjs/select": "^4.9.24",
-"@druid-toolkit/query": "^0.22.14",
+"@druid-toolkit/query": "^0.22.15",
 "@druid-toolkit/visuals-core": "^0.3.3",
 "@druid-toolkit/visuals-react": "^0.3.3",
 "ace-builds": "~1.4.14",
@@ -1005,9 +1005,9 @@
   }
 },
 "node_modules/@druid-toolkit/query": {
-  "version": "0.22.14",
-  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.14.tgz";,
-  "integrity": 
"sha512-f+VCqThTx5jiIL7V1vYeqxPJCS3dIp0K9iqo38BJyPbOJ+piq5K+fZcGsrQnEzbomre7odr5qOrN7Mlb7Q8obw==",
+  "version": "0.22.15",
+  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.15.tgz";,
+  "integrity": 
"sha512-LyQVIVkVNhduscf2wnBO/oGBvj353tS5ElIws20xQzApvEIwNNxmlkA+8npqwy77BkJj3nRQvlenbSEDHQdqow==",
   "dependencies": {
 "tslib": "^2.5.2"
   }
@@ -19147,9 +19147,9 @@
   "dev": true
 },
 "@druid-toolkit/query": {
-  "version": "0.22.14",
-  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.14.tgz";,
-  "integrity": 
"sha512-f+VCqThTx5jiIL7V1vYeqxPJCS3dIp0K9iqo38BJyPbOJ+piq5K+fZcGsrQnEzbomre7odr5qOrN7Mlb7Q8obw==",
+  "version": "0.22.15",
+  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.15.tgz";,
+  "integrity": 
"sha512-LyQVIVkVNhduscf2wnBO/oGBvj353tS5ElIws20xQzApvEIwNNxmlkA+8npqwy77BkJj3nRQvlenbSEDHQdqow==",
   "requires": {
 "tslib": "^2.5.2"
   }
diff --git a/web-console/package.json b/web-console/package.json
index 2f5d0f5c904..44e6986c2bd 100644
--- a/web-console/package.json
+++ b/web-console/package.json
@@ -69,7 +69,7 @@
 "@blueprintjs/icons": "^4.16.0",
 "@blueprintjs/popover2": "^1.14.9",
 "@blueprintjs/select": "^4.9.24",
-"@druid-toolkit/query": "^0.22.14",
+"@druid-toolkit/query": "^0.22.15",
 "@druid-toolkit/visuals-core": "^0.3.3",
 "@druid-toolkit/visuals-react": "^0.3.3",
 "ace-builds": "~1.4.14",
diff --git a/web-console/src/druid-models/external-config/external-config.ts 
b/web-console/src/druid-models/external-config/external-config.ts
index d088a856f12..d6541747ce5 100644
--- a/web-console/src/druid-models/external-config/external-config.ts
+++ b/web-console/src/druid-models/external-config/external-config.ts
@@ -131,7 +131,7 @@ export function externalConfigToInitDimensions(
   timeExpression: SqlExpression | undefined,
   arrayMode: ArrayMode,
 ): SqlExpression[] {
-  return (timeExpression ? [timeExpression.as('__time')] : [])
+  return (timeExpression ? [timeExpression.setAlias('__time')] : [])
 .concat(
   filterMap(config.signature, columnDeclaration => {
 const columnName = columnDeclaration.getColumnName();
diff --git 
a/web-console/src/views/workbench-view/result-table-pane/result-table-pane.tsx 
b/web-co

(druid) 03/11: tidy up

2024-05-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit b166c76f699d47586459e8383099e7a5fbacd43f
Author: Vadim Ogievetsky 
AuthorDate: Mon May 20 09:34:40 2024 -0700

tidy up
---
 .../src/views/explore-view/explore-view.tsx|  26 +++--
 .../time-relative-filter-control.tsx   | 108 ++---
 .../explore-view/modules/table-react-module.tsx|  16 ++-
 3 files changed, 53 insertions(+), 97 deletions(-)

diff --git a/web-console/src/views/explore-view/explore-view.tsx 
b/web-console/src/views/explore-view/explore-view.tsx
index 376334c8443..885e272b411 100644
--- a/web-console/src/views/explore-view/explore-view.tsx
+++ b/web-console/src/views/explore-view/explore-view.tsx
@@ -20,8 +20,8 @@ import './modules';
 
 import { Intent, Menu, MenuItem } from '@blueprintjs/core';
 import { IconNames } from '@blueprintjs/icons';
-import type { SqlExpression, SqlTable } from '@druid-toolkit/query';
-import { C, L, sql, SqlLiteral, SqlQuery, T } from '@druid-toolkit/query';
+import type { SqlExpression } from '@druid-toolkit/query';
+import { C, L, sql, SqlLiteral, SqlQuery, SqlTable, T } from 
'@druid-toolkit/query';
 import type { ExpressionMeta, TransferValue } from 
'@druid-toolkit/visuals-core';
 import {
   useModuleContainer,
@@ -35,7 +35,7 @@ import { useStore } from 'zustand';
 import { ShowValueDialog } from 
'../../dialogs/show-value-dialog/show-value-dialog';
 import { useLocalStorageState, useQueryManager } from '../../hooks';
 import { AppToaster } from '../../singletons';
-import { deepGet, filterMap, findMap, LocalStorageKeys, oneOf, queryDruidSql } 
from '../../utils';
+import { deepGet, filterMap, LocalStorageKeys, oneOf, queryDruidSql } from 
'../../utils';
 
 import { ControlPane } from './control-pane/control-pane';
 import { DroppableContainer } from './droppable-container/droppable-container';
@@ -150,9 +150,12 @@ async function getMaxTimeForTable(tableName: string): 
Promise
 query: sql`SELECT MAX(__time) AS "maxTime" FROM ${T(tableName)}`,
   });
 
-  const maxTime = new Date(deepGet(d, '0.maxTime'));
+  let maxTime = new Date(deepGet(d, '0.maxTime'));
   if (isNaN(maxTime.valueOf())) return;
 
+  // Add 1ms to the maxTime date so as to allow filters like `"__time" < 
{maxTime}" to capture the last event which might also be the only event
+  maxTime = new Date(maxTime.valueOf() + 1);
+
   // micro-cache set
   lastMaxTimeTable = tableName;
   lastMaxTimeValue = maxTime;
@@ -162,12 +165,15 @@ async function getMaxTimeForTable(tableName: string): 
Promise
 }
 
 function getFirstTableName(q: SqlQuery): string | undefined {
-  return (
-findMap(q.getWithParts(), withPart => {
-  if (!(withPart.query instanceof SqlQuery)) return;
-  return getFirstTableName(withPart.query);
-}) ?? q.getFirstTableName()
-  );
+  let tableName: string | undefined;
+  q.walk(ex => {
+if (ex instanceof SqlTable) {
+  tableName = ex.getName();
+  return;
+}
+return ex;
+  });
+  return tableName;
 }
 
 async function extendedQueryDruidSql(sqlQueryPayload: Record): Promise {
diff --git 
a/web-console/src/views/explore-view/filter-pane/filter-menu/time-relative-filter-control/time-relative-filter-control.tsx
 
b/web-console/src/views/explore-view/filter-pane/filter-menu/time-relative-filter-control/time-relative-filter-control.tsx
index b7b0e63bc3a..b1ec8061117 100644
--- 
a/web-console/src/views/explore-view/filter-pane/filter-menu/time-relative-filter-control/time-relative-filter-control.tsx
+++ 
b/web-console/src/views/explore-view/filter-pane/filter-menu/time-relative-filter-control/time-relative-filter-control.tsx
@@ -53,96 +53,48 @@ interface GroupedNamedPartialPatterns {
   namedPartialPatterns: NamedPartialPattern[];
 }
 
+const DURATIONS_TO_SHOW: [string, string][] = [
+  ['Hour', 'PT1H'],
+  ['Day', 'P1D'],
+  ['Week', 'P1W'],
+  ['Month', 'P1M'],
+  ['Year', 'P1Y'],
+];
+
 const GROUPS: GroupedNamedPartialPatterns[] = [
   {
 groupName: 'Latest',
-namedPartialPatterns: [
-  {
-name: 'Hour',
-partialPattern: {
-  anchor: 'maxDataTime',
-  rangeDuration: 'PT1H',
-},
-  },
-  {
-name: 'Day',
-partialPattern: {
-  anchor: 'maxDataTime',
-  rangeDuration: 'P1D',
-},
-  },
-  {
-name: 'Week',
-partialPattern: {
-  anchor: 'maxDataTime',
-  rangeDuration: '

(druid) 05/11: some stop

2024-05-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 6092f27cf1907de9bcce2066ad8b43cd30218cd4
Author: Vadim Ogievetsky 
AuthorDate: Mon May 20 13:46:33 2024 -0700

some stop
---
 web-console/src/utils/general.tsx  |   6 +-
 .../explore-view/modules/table-react-module.tsx| 473 +++--
 2 files changed, 242 insertions(+), 237 deletions(-)

diff --git a/web-console/src/utils/general.tsx 
b/web-console/src/utils/general.tsx
index c4474ef2227..9d6adf203ac 100644
--- a/web-console/src/utils/general.tsx
+++ b/web-console/src/utils/general.tsx
@@ -285,10 +285,10 @@ export function forceSignInNumberFormatter(
   formatter: (n: NumberLike) => string,
 ): (n: NumberLike) => string {
   return (n: NumberLike) => {
-if (n < 0) {
-  return formatter(n);
-} else {
+if (n > 0) {
   return '+' + formatter(n);
+} else {
+  return formatter(n);
 }
   };
 }
diff --git a/web-console/src/views/explore-view/modules/table-react-module.tsx 
b/web-console/src/views/explore-view/modules/table-react-module.tsx
index 1593925d8d3..a97ec519ae5 100644
--- a/web-console/src/views/explore-view/modules/table-react-module.tsx
+++ b/web-console/src/views/explore-view/modules/table-react-module.tsx
@@ -177,25 +177,58 @@ function getJoinConditions(
   );
 }
 
-function cascadingInnerJoin(
-  outerQuery: SqlQuery,
-  innerQuery: SqlQuery,
-  groupByExpressions: SqlAlias[],
-) {
-  const innerAggregators = 
innerQuery.getOutputColumns().slice(groupByExpressions.length);
-
-  outerQuery = outerQuery.addInnerJoin(
-innerQuery.as('i'),
-groupByExpressions.map(groupByExpression =>
-  addTableScope(groupByExpression.getUnderlyingExpression(), 
't').isNotDistinctFrom(
-T('i').column(groupByExpression.getOutputName()!),
-  ),
-),
+interface DecodedOrderBy {
+  orderedSplitColumn?: ExpressionMeta;
+  orderedShowColumn?: ExpressionMeta;
+  orderedMetric?: ExpressionMeta;
+  orderedCompareDuration?: string;
+  orderedCompareType?: CompareType;
+}
+function decodeTableOrderBy(
+  orderBy: SqlOrderByExpression | undefined,
+  hasCompare: boolean,
+  splitColumns: ExpressionMeta[],
+  showColumns: ExpressionMeta[],
+  metrics: ExpressionMeta[],
+): DecodedOrderBy | undefined {
+  if (!(orderBy?.expression instanceof SqlColumn)) return;
+
+  const orderByColumnName = orderBy.expression.getName();
+  let orderedSplitColumn: ExpressionMeta | undefined;
+  let orderedShowColumn: ExpressionMeta | undefined;
+  let orderedMetric: ExpressionMeta | undefined;
+  let orderedCompareDuration: string | undefined;
+  let orderedCompareType: CompareType | undefined;
+
+  const m = orderByColumnName.match(
+/^(.+):compare:([^:]+):(value|delta|absDelta|percent|absPercent)$/,
   );
+  if (m) {
+if (!hasCompare) return;
+const compareMetricName = m[1];
+orderedCompareDuration = m[2];
+orderedCompareType = m[3] as CompareType;
+orderedMetric = metrics.find(metric => metric.name === compareMetricName);
+if (!orderedMetric) return;
+  } else {
+orderedSplitColumn = splitColumns.find(splitColumn => splitColumn.name === 
orderByColumnName);
+orderedShowColumn = showColumns.find(showColumn => showColumn.name === 
orderByColumnName);
+orderedMetric = metrics.find(metric => metric.name === orderByColumnName);
+if (
+  (orderedSplitColumn ? 1 : 0) + (orderedShowColumn ? 1 : 0) + 
(orderedMetric ? 1 : 0) !==
+  1
+) {
+  return;
+}
+  }
 
-  return outerQuery.applyForEach(innerAggregators, (q, innerAggregator) =>
-q.addSelect(F('ANY_VALUE', C(innerAggregator)).as(innerAggregator)),
-  );
+  return {
+orderedSplitColumn,
+orderedShowColumn,
+orderedMetric,
+orderedCompareDuration,
+orderedCompareType,
+  };
 }
 
 interface QueryAndHints {
@@ -390,26 +423,35 @@ function TableModule(props: TableModuleProps) {
 const pivotValues = pivotColumn ? pivotValueState.data : undefined;
 if (pivotColumn && !pivotValues) return;
 
-const effectiveOrderBy =
-  orderBy || C(metrics[0]?.name || 
splitColumns[0]?.name).toOrderByExpression('DESC');
-
 const hasCompare = !pivotColumn && Boolean(compares.length) && 
Boolean(compareTypes.length);
 
-const orderByColumnName = (effectiveOrderBy.expression as 
SqlColumn).getName();
-let orderByCompareMeasure: string | undefined;
-let orderByCompareDuration: string | undefined;
-let orderByCompareType: CompareType | undefined;
-if (hasCompare) {
-  const m = orderByColumnName.match(
-/^(.+):cmp:([^:]+):(value|delta|absDelta|percent|absPercent)$/,
+let decodedOrderBy = decodeTableOrderBy(
+  orderBy,
+  hasCompare,
+  splitColumns,
+  showColumns,
+ 

(druid) branch more_explore_fixes created (now 198dc06543c)

2024-05-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch more_explore_fixes
in repository https://gitbox.apache.org/repos/asf/druid.git


  at 198dc06543c tidy up

This branch includes the following new commits:

 new d1f40dde622 more robust query naming
 new 1d4a72d09f0 progress
 new b166c76f699 tidy up
 new a9912337c4a tidy up
 new 6092f27cf19 some stop
 new a28853b90aa steps
 new e664222e9fd checkpoint
 new 0e274e965af pre topValuesQuery removal
 new 901f14cae49 stuff is working
 new 3ab96b1ecfd pivot values are just measures
 new 198dc06543c tidy up

The 11 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 02/11: progress

2024-05-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 1d4a72d09f0d9a788f55bfb6538d38b7834f27c5
Author: Vadim Ogievetsky 
AuthorDate: Fri May 17 15:39:02 2024 -0700

progress
---
 .../explore-view/modules/table-react-module.tsx| 303 -
 1 file changed, 181 insertions(+), 122 deletions(-)

diff --git a/web-console/src/views/explore-view/modules/table-react-module.tsx 
b/web-console/src/views/explore-view/modules/table-react-module.tsx
index e0f1f70db04..bc95413e937 100644
--- a/web-console/src/views/explore-view/modules/table-react-module.tsx
+++ b/web-console/src/views/explore-view/modules/table-react-module.tsx
@@ -17,13 +17,12 @@
  */
 
 import { Button } from '@blueprintjs/core';
-import type { SqlOrderByExpression, SqlTable } from '@druid-toolkit/query';
+import type { SqlExpression, SqlOrderByExpression, SqlTable } from 
'@druid-toolkit/query';
 import {
   C,
   F,
   SqlCase,
   SqlColumn,
-  SqlExpression,
   SqlFunction,
   SqlLiteral,
   SqlQuery,
@@ -165,16 +164,34 @@ function toShowColumnExpression(
   return ex.as(showColumn.name);
 }
 
-function getJoinCondition(
+function getJoinConditions(
   splitColumns: ExpressionMeta[],
   table1: SqlTable,
   table2: SqlTable,
-): SqlExpression {
-  return SqlExpression.and(
-...splitColumns.map(splitColumn =>
-  
table1.column(splitColumn.name).isNotDistinctFrom(table2.column(splitColumn.name)),
+): SqlExpression[] {
+  return splitColumns.map(splitColumn =>
+
table1.column(splitColumn.name).isNotDistinctFrom(table2.column(splitColumn.name)),
+  );
+}
+
+function cascadingInnerJoin(
+  outerQuery: SqlQuery,
+  innerQuery: SqlQuery,
+  splitColumns: ExpressionMeta[],
+) {
+  const innerAggregators = 
innerQuery.getOutputColumns().slice(splitColumns.length);
+
+  outerQuery = outerQuery.addInnerJoin(
+innerQuery.as('i'),
+splitColumns.map(
+  ({ expression, name }) =>
+addTableScope(expression, 't').isNotDistinctFrom(T('i').column(name)), 
// ToDo: use a form of 'toGroupByExpression
 ),
   );
+
+  return outerQuery.applyForEach(innerAggregators, (q, innerAggregator) =>
+q.addSelect(F('ANY_VALUE', C(innerAggregator)).as(innerAggregator)),
+  );
 }
 
 interface QueryAndHints {
@@ -406,7 +423,7 @@ function TableModule(props: TableModuleProps) {
   .applyIf(topValuesQuery, q =>
 q.addInnerJoin(
   T(TOP_VALUES_NAME),
-  getJoinCondition(splitColumns, T('t'), T(TOP_VALUES_NAME)),
+  getJoinConditions(splitColumns, T('t'), T(TOP_VALUES_NAME)),
 ),
   )
   .applyForEach(splitColumns, (q, splitColumn) =>
@@ -459,7 +476,7 @@ function TableModule(props: TableModuleProps) {
 .applyIf(topValuesQuery, q =>
   q.addInnerJoin(
 T(TOP_VALUES_NAME),
-getJoinCondition(splitColumns, T('t'), T(TOP_VALUES_NAME)),
+getJoinConditions(splitColumns, T('t'), T(TOP_VALUES_NAME)),
   ),
 )
 .applyForEach(splitColumns, (q, splitColumn) =>
@@ -482,131 +499,173 @@ function TableModule(props: TableModuleProps) {
 );
 };
 
+const getCompareExpressions = (
+  metricName: string,
+  compare: string,
+  mainMetric: SqlExpression,
+  prevMetric: SqlExpression,
+): SqlExpression[] => {
+  const diff = mainMetric.subtract(prevMetric);
+
+  const ret: SqlExpression[] = [];
+
+  if (compareTypes.includes('value')) {
+const valueName = `${metricName}:cmp:${compare}:value`;
+columnHints.set(valueName, {
+  group: `Comparison to ${compare}`,
+  displayName: `${metricName} (value)`,
+});
+ret.push(prevMetric.as(valueName));
+  }
+
+  if (compareTypes.includes('delta')) {
+const deltaName = `${metricName}:cmp:${compare}:delta`;
+columnHints.set(deltaName, {
+  group: `Comparison to ${compare}`,
+  displayName: `${metricName} (delta)`,
+});
+ret.push(diff.as(deltaName));
+  }
+
+  if (compareTypes.includes('absDelta')) {
+const absDeltaName = `${metricName}:cmp:${compare}:absDelta`;
+columnHints.set(absDeltaName, {
+  group: `Comparison to ${compare}`,
+  displayName: `${metricName} (Abs. delta)`,
+});
+ret.push(F('ABS', diff).as(absDeltaName));
+  }
+
+  if (compareTypes.includes('percent')) {
+const percentName = `${metricName}:cmp:${compare}:percent`;
+columnHints.set(percentName, {
+  group: `Comparison to ${compare}`,
+  displayName: `${metricName} (%)`,
+  formatter: formatPercent,
+});
+ret.push(safe

(druid) 06/11: steps

2024-05-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit a28853b90aa235c905fbbb2a1316c1185aa13ffe
Author: Vadim Ogievetsky 
AuthorDate: Mon May 20 20:46:36 2024 -0700

steps
---
 .../explore-view/modules/table-react-module.tsx| 43 --
 1 file changed, 23 insertions(+), 20 deletions(-)

diff --git a/web-console/src/views/explore-view/modules/table-react-module.tsx 
b/web-console/src/views/explore-view/modules/table-react-module.tsx
index a97ec519ae5..86be17da06a 100644
--- a/web-console/src/views/explore-view/modules/table-react-module.tsx
+++ b/web-console/src/views/explore-view/modules/table-react-module.tsx
@@ -177,6 +177,10 @@ function getJoinConditions(
   );
 }
 
+function makeCompareMetricName(metricName: string, compare: string, 
compareType: CompareType) {
+  return `${metricName}:compare:${compare}:${compareType}`;
+}
+
 interface DecodedOrderBy {
   orderedSplitColumn?: ExpressionMeta;
   orderedShowColumn?: ExpressionMeta;
@@ -510,14 +514,7 @@ function TableModule(props: TableModuleProps) {
 const orderOnSpecificInnerQuery = !orderByCompareType || 
orderByCompareType === 'value';
 const topValuesQuery =
   (orderOnSpecificInnerQuery || restrictTop) && splitColumns.length
-? getInitQuery(
-table,
-orderOnSpecificInnerQuery
-  ? orderByCompareDuration
-? shiftTimeInExpression(where, orderByCompareDuration)
-: where
-  : getWhereForCompares(where, compares),
-  )
+? getInitQuery(table, getWhereForCompares(where, compares))
 .applyForEach(groupByExpressions, (q, groupByExpression) =>
   q.addSelect(groupByExpression, {
 addToGroupBy: 'end',
@@ -530,7 +527,7 @@ function TableModule(props: TableModuleProps) {
 decodedOrderBy.orderedMetric
   )?.expression.toOrderByExpression('DESC'),
 )
-.changeLimitValue(orderOnSpecificInnerQuery ? maxRows : 
TOP_VALUES_K)
+.changeLimitValue(TOP_VALUES_K)
 : undefined;
 
 const mainQuery = singleQuery.applyIf(topValuesQuery && 
orderByCompareDuration, q =>
@@ -578,7 +575,13 @@ function TableModule(props: TableModuleProps) {
 ),
   ])
   .changeSelectExpressions([
-...splitColumns.map(splitColumn => 
main.column(splitColumn.name).as(splitColumn.name)),
+...splitColumns.map(splitColumn =>
+  F(
+'COALESCE',
+main.column(splitColumn.name),
+...compares.map(compare => 
T(`compare_${compare}`).column(splitColumn.name)),
+  ).as(splitColumn.name),
+),
 ...showColumns.map(showColumn =>
   leader
 .column(showColumn.name)
@@ -589,7 +592,7 @@ function TableModule(props: TableModuleProps) {
   main
 .column(metric.name)
 .applyIf(NEEDS_GROUPING_TO_ORDER, anyValue)
-.applyIf(orderByCompareDuration, coalesce0)
+.apply(coalesce0)
 .as(metric.name),
 ),
 ...compares.flatMap(compare =>
@@ -599,19 +602,19 @@ function TableModule(props: TableModuleProps) {
 const mainMetric = main
   .column(metric.name)
   .applyIf(NEEDS_GROUPING_TO_ORDER, anyValue)
-  .applyIf(orderByCompareDuration, coalesce0);
+  .apply(coalesce0);
 
 const prevMetric = T(`compare_${compare}`)
   .column(metric.name)
   .applyIf(NEEDS_GROUPING_TO_ORDER, anyValue)
-  .applyIf(compare !== orderByCompareDuration, coalesce0);
+  .apply(coalesce0);
 
 const diff = mainMetric.subtract(prevMetric);
 
 const ret: SqlExpression[] = [];
 
 if (compareTypes.includes('value')) {
-  const valueName = `${metricName}:compare:${compare}:value`;
+  const valueName = makeCompareMetricName(metricName, compare, 
'value');
   columnHints.set(valueName, {
 group: `Comparison to ${compare}`,
 displayName: `${metricName} (value)`,
@@ -620,7 +623,7 @@ function TableModule(props: TableModuleProps) {
 }
 
 if (compareTypes.includes('delta')) {
-  const deltaName = `${metricName}:compare:${compare}:delta`;
+  const deltaName = makeCompareMetricName(metricName, compare, 
'delta');
   columnHints.set(deltaName, {
 group: `Comparison to ${compare}`,
 displayName: `${metricName} (delta)`,
@@ -630,7 +633,7 @@ function TableModule(props: TableModuleProps) {
 }
 
 if (compareTypes.includes('absDel

(druid) branch master updated: [Web Console] Datasource page support search datasource by keyword (#16371)

2024-05-24 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 6bc29534a7f [Web Console] Datasource page support search datasource by 
keyword (#16371)
6bc29534a7f is described below

commit 6bc29534a7fbfe161a8ea1d866a014f57a5b0187
Author: Sensor 
AuthorDate: Sat May 25 02:54:26 2024 +0800

[Web Console] Datasource page support search datasource by keyword (#16371)

* Frontend segment_timeline support filter by datasource

* add dependency

* fix eslint issues

* resolve code style issue, update snapshot

* fix comment

* update licence

* update package-lock.json

* update snapshot

* Update segment-timeline.tsx

* Update segment-timeline.tsx
---
 licenses.yaml  |  6 +-
 web-console/package-lock.json  | 49 ++---
 web-console/package.json   |  1 +
 .../__snapshots__/segment-timeline.spec.tsx.snap   | 56 +++
 .../segment-timeline/segment-timeline.tsx  | 81 +-
 5 files changed, 120 insertions(+), 73 deletions(-)

diff --git a/licenses.yaml b/licenses.yaml
index bd03e20d67d..c8380e3940d 100644
--- a/licenses.yaml
+++ b/licenses.yaml
@@ -5040,7 +5040,7 @@ license_category: binary
 module: web-console
 license_name: Apache License version 2.0
 copyright: Palantir Technologies
-version: 4.20.1
+version: 4.20.2
 
 ---
 
@@ -5076,7 +5076,7 @@ license_category: binary
 module: web-console
 license_name: Apache License version 2.0
 copyright: Palantir Technologies
-version: 1.14.9
+version: 1.14.11
 
 ---
 
@@ -5085,7 +5085,7 @@ license_category: binary
 module: web-console
 license_name: Apache License version 2.0
 copyright: Palantir Technologies
-version: 4.9.22
+version: 4.9.24
 
 ---
 
diff --git a/web-console/package-lock.json b/web-console/package-lock.json
index 9d835e3da04..7e6a2fd0dc2 100644
--- a/web-console/package-lock.json
+++ b/web-console/package-lock.json
@@ -14,6 +14,7 @@
 "@blueprintjs/datetime2": "^0.9.35",
 "@blueprintjs/icons": "^4.16.0",
 "@blueprintjs/popover2": "^1.14.9",
+"@blueprintjs/select": "^4.9.24",
 "@druid-toolkit/query": "^0.22.13",
 "@druid-toolkit/visuals-core": "^0.3.3",
 "@druid-toolkit/visuals-react": "^0.3.3",
@@ -823,9 +824,9 @@
   }
 },
 "node_modules/@blueprintjs/core": {
-  "version": "4.20.1",
-  "resolved": 
"https://registry.npmjs.org/@blueprintjs/core/-/core-4.20.1.tgz";,
-  "integrity": 
"sha512-nKFXfWj8PQrkweLrCr6VazYd4JJHCwiAxcgT9zzoxbEs0mSJF4yI7Qjoh5QkomtWugXrVLCDSzs4uJdaO1reAA==",
+  "version": "4.20.2",
+  "resolved": 
"https://registry.npmjs.org/@blueprintjs/core/-/core-4.20.2.tgz";,
+  "integrity": 
"sha512-5v4Nr0jozfAjiOkjY4zvt1XSpt4ldnrSaxtwo506S2cxJYfwFeMTmDshXNPFcc8L1fjZMxi0IWI2WABXzZXS6w==",
   "dependencies": {
 "@blueprintjs/colors": "^4.2.1",
 "@blueprintjs/icons": "^4.16.0",
@@ -929,11 +930,11 @@
   }
 },
 "node_modules/@blueprintjs/popover2": {
-  "version": "1.14.9",
-  "resolved": 
"https://registry.npmjs.org/@blueprintjs/popover2/-/popover2-1.14.9.tgz";,
-  "integrity": 
"sha512-46gesoxeEbp1owKDGz7JwurXmVqSLq9ALes5etHqtjwdCpenBQc7GM+sFuJoLlEU7twcIlzwE6xaSU2+vnYVCQ==",
+  "version": "1.14.11",
+  "resolved": 
"https://registry.npmjs.org/@blueprintjs/popover2/-/popover2-1.14.11.tgz";,
+  "integrity": 
"sha512-5XAjeb2mlWjYXC0pqrNDLzHSsX85Zaiv8jixxUN9abarMUUFKGATgGF8MRsWTLAW94Gli6CB1lzVkrYkRHHf6Q==",
   "dependencies": {
-"@blueprintjs/core": "^4.20.1",
+"@blueprintjs/core": "^4.20.2",
 "@juggle/resize-observer": "^3.4.0",
 "@popperjs/core": "^2.11.7",
 "classnames": "^2.3.1",
@@ -953,12 +954,12 @@
   }
 },
 "node_modules/@blueprintjs/select": {
-  "version": "4.9.22",
-  "resolved": 
"https://registry.npmjs.org/@blueprintjs/select/-/select-4.9.22.tgz";,
-  "integrity": 
"sha512-T5ofz571kPfycbxAuXlTrE7ndXIiHPCDMjADYJpb5HVOk0SYwwzDvnWjsYbyAj1SONbxOAKh4/wmFTDjZv7G2g==",
+  "version": "4.9.24",
+  &q

(druid) branch master updated: Use typecasting comparator for numeric "any" aggregations. (#16494)

2024-05-22 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new eb410f712da Use typecasting comparator for numeric "any" aggregations. 
(#16494)
eb410f712da is described below

commit eb410f712daca251881d9d580a54735b20abedcd
Author: Gian Merlino 
AuthorDate: Wed May 22 12:38:51 2024 -0700

Use typecasting comparator for numeric "any" aggregations. (#16494)

This brings them in line with the behavior of other numeric aggregations.
It is important because otherwise ClassCastExceptions can arise if comparing
different numeric types that may arise from deserialization.
---
 .../apache/druid/query/aggregation/FloatSumAggregator.java|  2 +-
 .../org/apache/druid/query/aggregation/LongSumAggregator.java |  2 +-
 .../query/aggregation/any/DoubleAnyAggregatorFactory.java |  5 ++---
 .../query/aggregation/any/FloatAnyAggregatorFactory.java  |  5 ++---
 .../druid/query/aggregation/any/LongAnyAggregatorFactory.java |  5 ++---
 .../druid/query/aggregation/any/DoubleAnyAggregationTest.java | 11 +++
 .../druid/query/aggregation/any/FloatAnyAggregationTest.java  | 11 +++
 .../druid/query/aggregation/any/LongAnyAggregationTest.java   | 11 +++
 8 files changed, 41 insertions(+), 11 deletions(-)

diff --git 
a/processing/src/main/java/org/apache/druid/query/aggregation/FloatSumAggregator.java
 
b/processing/src/main/java/org/apache/druid/query/aggregation/FloatSumAggregator.java
index 90a2fd4fa76..caa5a26c46e 100644
--- 
a/processing/src/main/java/org/apache/druid/query/aggregation/FloatSumAggregator.java
+++ 
b/processing/src/main/java/org/apache/druid/query/aggregation/FloatSumAggregator.java
@@ -28,7 +28,7 @@ import java.util.Comparator;
  */
 public class FloatSumAggregator implements Aggregator
 {
-  static final Comparator COMPARATOR = new Ordering()
+  public static final Comparator COMPARATOR = new Ordering()
   {
 @Override
 public int compare(Object o, Object o1)
diff --git 
a/processing/src/main/java/org/apache/druid/query/aggregation/LongSumAggregator.java
 
b/processing/src/main/java/org/apache/druid/query/aggregation/LongSumAggregator.java
index 30b339337d1..f9ae93c9d6a 100644
--- 
a/processing/src/main/java/org/apache/druid/query/aggregation/LongSumAggregator.java
+++ 
b/processing/src/main/java/org/apache/druid/query/aggregation/LongSumAggregator.java
@@ -29,7 +29,7 @@ import java.util.Comparator;
  */
 public class LongSumAggregator implements Aggregator
 {
-  static final Comparator COMPARATOR = new Ordering()
+  public static final Comparator COMPARATOR = new Ordering()
   {
 @Override
 public int compare(Object o, Object o1)
diff --git 
a/processing/src/main/java/org/apache/druid/query/aggregation/any/DoubleAnyAggregatorFactory.java
 
b/processing/src/main/java/org/apache/druid/query/aggregation/any/DoubleAnyAggregatorFactory.java
index 0a51e563394..eaebec9da49 100644
--- 
a/processing/src/main/java/org/apache/druid/query/aggregation/any/DoubleAnyAggregatorFactory.java
+++ 
b/processing/src/main/java/org/apache/druid/query/aggregation/any/DoubleAnyAggregatorFactory.java
@@ -28,6 +28,7 @@ import org.apache.druid.query.aggregation.Aggregator;
 import org.apache.druid.query.aggregation.AggregatorFactory;
 import org.apache.druid.query.aggregation.AggregatorUtil;
 import org.apache.druid.query.aggregation.BufferAggregator;
+import org.apache.druid.query.aggregation.DoubleSumAggregator;
 import org.apache.druid.query.aggregation.VectorAggregator;
 import org.apache.druid.query.cache.CacheKeyBuilder;
 import org.apache.druid.segment.BaseDoubleColumnValueSelector;
@@ -48,8 +49,6 @@ import java.util.Objects;
 
 public class DoubleAnyAggregatorFactory extends AggregatorFactory
 {
-  private static final Comparator VALUE_COMPARATOR = 
Comparator.nullsFirst(Double::compare);
-
   private static final Aggregator NIL_AGGREGATOR = new DoubleAnyAggregator(
   NilColumnValueSelector.instance()
   )
@@ -136,7 +135,7 @@ public class DoubleAnyAggregatorFactory extends 
AggregatorFactory
   @Override
   public Comparator getComparator()
   {
-return VALUE_COMPARATOR;
+return DoubleSumAggregator.COMPARATOR;
   }
 
   @Override
diff --git 
a/processing/src/main/java/org/apache/druid/query/aggregation/any/FloatAnyAggregatorFactory.java
 
b/processing/src/main/java/org/apache/druid/query/aggregation/any/FloatAnyAggregatorFactory.java
index a9ee3519b9e..9015a6eda25 100644
--- 
a/processing/src/main/java/org/apache/druid/query/aggregation/any/FloatAnyAggregatorFactory.java
+++ 
b/processing/src/main/java/org/apache/druid/query/aggregation/any/FloatAnyAggregatorFactory.java
@@ -28,6 +28,7 @@ import org.apache.druid.query.aggregation.Aggregator;
 import org.apache.druid.query.aggregation.Aggreg

(druid) branch master updated (80db8cd93b0 -> 0ab3b341171)

2024-05-22 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


from 80db8cd93b0 Bump org.openrewrite.maven:rewrite-maven-plugin from 
5.27.0 to 5.31.0 (#16477)
 add 0ab3b341171 Web console: enable copy data as inline SQL (via VALUES) 
(#16458)

No new revisions were added by this update.

Summary of changes:
 web-console/script/create-sql-docs.js  |   5 +-
 web-console/script/druid   |   7 +-
 web-console/src/utils/download.ts  |  56 +-
 web-console/src/utils/index.tsx|   2 +-
 web-console/src/utils/sample-query.tsx |  82 --
 web-console/src/utils/table-helpers.ts |   6 +-
 web-console/src/utils/types.ts |  19 +++-
 ...sample-query.spec.tsx => values-query.spec.tsx} |  35 +++---
 web-console/src/utils/values-query.tsx | 121 +
 .../schema-step/schema-step.tsx|   4 +-
 .../execution-summary-panel.tsx|  27 +++--
 .../result-table-pane/result-table-pane.tsx|   2 +-
 12 files changed, 220 insertions(+), 146 deletions(-)
 delete mode 100644 web-console/src/utils/sample-query.tsx
 rename web-console/src/utils/{sample-query.spec.tsx => values-query.spec.tsx} 
(57%)
 create mode 100644 web-console/src/utils/values-query.tsx


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) branch master updated: Web console: fix Druid doctor check to accept Java 17 (#16250)

2024-05-15 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 435b58f1017 Web console: fix Druid doctor check to accept Java 17 
(#16250)
435b58f1017 is described below

commit 435b58f10176a3bf61bf2ffc9459bb4c70029e8c
Author: Vadim Ogievetsky 
AuthorDate: Wed May 15 20:37:15 2024 -0700

Web console: fix Druid doctor check to accept Java 17 (#16250)

* fix Druid doctor check

* fix doc link

* Update web-console/src/dialogs/doctor-dialog/doctor-checks.tsx

Co-authored-by: Abhishek Radhakrishnan 

-

Co-authored-by: Abhishek Radhakrishnan 
---
 .../src/dialogs/doctor-dialog/doctor-checks.tsx| 66 +-
 .../src/druid-models/flatten-spec/flatten-spec.tsx |  5 +-
 2 files changed, 32 insertions(+), 39 deletions(-)

diff --git a/web-console/src/dialogs/doctor-dialog/doctor-checks.tsx 
b/web-console/src/dialogs/doctor-dialog/doctor-checks.tsx
index db437f960e3..2104c046b88 100644
--- a/web-console/src/dialogs/doctor-dialog/doctor-checks.tsx
+++ b/web-console/src/dialogs/doctor-dialog/doctor-checks.tsx
@@ -31,6 +31,11 @@ export interface DoctorCheck {
   check: (controls: CheckControls) => Promise;
 }
 
+interface HistoricalFill {
+  historical: string;
+  fill: number;
+}
+
 const RUNTIME_PROPERTIES_ALL_NODES_MUST_AGREE_ON: string[] = [
   'user.timezone',
   'druid.zk.service.host',
@@ -90,14 +95,15 @@ export const DOCTOR_CHECKS: DoctorCheck[] = [
 );
   }
 
-  // Check for Java 8 or 11
+  // Check for Java 8u92+, 11, or 17
   if (
 properties['java.specification.version'] &&
 properties['java.specification.version'] !== '1.8' &&
-properties['java.specification.version'] !== '11'
+properties['java.specification.version'] !== '11' &&
+properties['java.specification.version'] !== '17'
   ) {
 controls.addSuggestion(
-  `It looks like are running Java 
${properties['java.runtime.version']}. Druid officially supports Java 8 or 11`,
+  `It looks like are running Java 
${properties['java.runtime.version']}. Druid officially supports Java 8u92+, 
11, or 17`,
 );
   }
 
@@ -291,61 +297,45 @@ export const DOCTOR_CHECKS: DoctorCheck[] = [
 },
   },
   {
-name: 'Verify that there are historical services',
+name: 'Verify that there are historicals and they are not too full',
 check: async controls => {
-  // Make sure that there are broker and historical services reported from 
sys.servers
-  let sqlResult: any[];
+  // Make sure that no services are reported that are over 95% capacity
+  let historicalFills: HistoricalFill[];
   try {
-sqlResult = await queryDruidSql({
+historicalFills = await queryDruidSql({
   query: `SELECT
-  COUNT(*) AS "historicals"
+  "server" AS "historical",
+  "curr_size" * 100.0 / "max_size" AS "fill"
 FROM sys.servers
-WHERE "server_type" = 'historical'`,
+WHERE "server_type" = 'historical'
+ORDER BY "fill" DESC`,
 });
+// Note: for some reason adding ` AND "curr_size" * 100.0 / "max_size" 
> 90` to the filter does not work as of this writing Apr 8, 2024
   } catch (e) {
 controls.addIssue(`Could not run a sys.servers query. Got: 
${e.message}`);
 return;
   }
 
-  if (sqlResult.length === 1 && sqlResult[0]['historicals'] === 0) {
+  if (!historicalFills.length) {
 controls.addIssue(`There do not appear to be any historical 
services.`);
-  }
-},
-  },
-  {
-name: 'Verify that the historicals are not overfilled',
-check: async controls => {
-  // Make sure that no services are reported that are over 95% capacity
-  let sqlResult: any[];
-  try {
-sqlResult = await queryDruidSql({
-  query: `SELECT
-  "server" AS "service",
-  "curr_size" * 1.0 / "max_size" AS "fill"
-FROM sys.servers
-WHERE "server_type" = 'historical' AND "curr_size" * 1.0 / "max_size" > 0.9
-ORDER BY "server" DESC`,
-});
-  } catch (e) {
-controls.addIssue(`Could not run a sys.servers query. Got: 
${e.message}`);
 return;
   }
 
-  function formatPercent(service: any): string {
-return (service['fill'] * 100).toFixed(2);
+  function formatFill(historicalFill: HistoricalFill): string {
+return 

(druid) branch 30.0.0 updated: use objectGlob (#16452) (#16455)

2024-05-15 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/30.0.0 by this push:
 new dacf1eb933f use objectGlob (#16452) (#16455)
dacf1eb933f is described below

commit dacf1eb933f7a9a2a21c8813b050727f10367836
Author: Adarsh Sanjeev 
AuthorDate: Wed May 15 21:06:17 2024 +0530

use objectGlob (#16452) (#16455)

Catching up to a change introduced in #13027

Co-authored-by: Vadim Ogievetsky 
---
 .../druid-models/ingestion-spec/ingestion-spec.tsx | 46 +++---
 .../src/druid-models/input-source/input-source.tsx | 54 ++
 2 files changed, 64 insertions(+), 36 deletions(-)

diff --git a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx 
b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx
index 393c3e7ee1b..37ec41d50e9 100644
--- a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx
+++ b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx
@@ -56,7 +56,11 @@ import { summarizeIndexSpec } from 
'../index-spec/index-spec';
 import type { InputFormat } from '../input-format/input-format';
 import { issueWithInputFormat } from '../input-format/input-format';
 import type { InputSource } from '../input-source/input-source';
-import { FILTER_SUGGESTIONS, issueWithInputSource } from 
'../input-source/input-source';
+import {
+  FILTER_SUGGESTIONS,
+  issueWithInputSource,
+  OBJECT_GLOB_SUGGESTIONS,
+} from '../input-source/input-source';
 import type { MetricSpec } from '../metric-spec/metric-spec';
 import {
   getMetricSpecOutputType,
@@ -584,21 +588,29 @@ export function getIoConfigFormFields(ingestionComboType: 
IngestionComboType): F
 ),
   };
 
-  const inputSourceFilter: Field = {
-name: 'inputSource.filter',
-label: 'File filter',
+  const inputSourceObjectGlob: Field = {
+name: 'inputSource.objectGlob',
+label: 'Object glob',
 type: 'string',
-suggestions: FILTER_SUGGESTIONS,
-placeholder: '*',
+suggestions: OBJECT_GLOB_SUGGESTIONS,
+placeholder: '(all files)',
 info: (
-  
-A wildcard filter for files. See{' '}
-https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/filefilter/WildcardFileFilter.html";>
-  here
-{' '}
-for format information. Files matching the filter criteria are 
considered for ingestion.
-Files not matching the filter criteria are ignored.
-  
+  <>
+A glob for the object part of the URI.
+
+  The glob must match the entire object part, not just the filename. 
For example, the glob
+  *.json does not match /bar/file.json, 
because and the{' '}
+  * does not match the slash. To match all objects ending 
in .json
+  , use **.json instead.
+
+
+  For more information, refer to the documentation for{' '}
+  https://docs.oracle.com/javase/8/docs/api/java/nio/file/FileSystem.html#getPathMatcher-java.lang.String-";>
+FileSystem#getPathMatcher
+  
+  .
+
+  
 ),
   };
 
@@ -781,7 +793,7 @@ export function getIoConfigFormFields(ingestionComboType: 
IngestionComboType): F
 
   ),
 },
-inputSourceFilter,
+inputSourceObjectGlob,
 {
   name: 'inputSource.properties.accessKeyId.type',
   label: 'Access key ID type',
@@ -944,7 +956,7 @@ export function getIoConfigFormFields(ingestionComboType: 
IngestionComboType): F
 
   ),
 },
-inputSourceFilter,
+inputSourceObjectGlob,
 {
   name: 'inputSource.properties.sharedAccessStorageToken',
   label: 'Shared Access Storage Token',
@@ -1018,7 +1030,7 @@ export function getIoConfigFormFields(ingestionComboType: 
IngestionComboType): F
 
   ),
 },
-inputSourceFilter,
+inputSourceObjectGlob,
   ];
 
 case 'index_parallel:delta':
diff --git a/web-console/src/druid-models/input-source/input-source.tsx 
b/web-console/src/druid-models/input-source/input-source.tsx
index 17b137412ef..174f8aba516 100644
--- a/web-console/src/druid-models/input-source/input-source.tsx
+++ b/web-console/src/druid-models/input-source/input-source.tsx
@@ -16,6 +16,7 @@
  * limitations under the License.
  */
 
+import { Code } from '@blueprintjs/core';
 import React from 'react';
 
 import type { Field } from '../../components';
@@ -36,6 +37,18 @@ export const FILTER_SUGGESTIONS: string[] = [
   '*.avro',

(druid) branch master updated: Web console: Fix order-by-delta in explore view table (#16417)

2024-05-13 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 760e4498755 Web console: Fix order-by-delta in explore view table 
(#16417)
760e4498755 is described below

commit 760e4498755408e0d8fd8c99aeb43f480f28c59c
Author: Vadim Ogievetsky 
AuthorDate: Mon May 13 19:03:46 2024 -0700

Web console: Fix order-by-delta in explore view table (#16417)

* change to using measure name

* Implment order by delta

* less paring, stricter types

* safeDivide0

* fix no query

* new DTQ alows parsing JSON_VALUE(...RETURNING...)
---
 licenses.yaml  |   2 +-
 web-console/package-lock.json  |  14 +-
 web-console/package.json   |   2 +-
 .../record-table-pane/record-table-pane.tsx|   2 +-
 .../async-action-dialog/async-action-dialog.tsx|   4 +-
 .../kill-datasource-dialog.tsx |   7 +-
 .../src/druid-models/execution/execution.ts|  10 +-
 .../workbench-query/workbench-query.ts |   5 +-
 web-console/src/utils/general.tsx  |  16 +
 web-console/src/utils/table-helpers.ts |  12 +-
 .../views/datasources-view/datasources-view.tsx|  31 +-
 .../generic-output-table/generic-output-table.tsx  |  56 +--
 .../explore-view/modules/table-react-module.tsx| 411 +++--
 .../views/explore-view/modules/utils/utils.spec.ts |  57 ++-
 .../src/views/explore-view/modules/utils/utils.ts  |  63 +++-
 web-console/src/views/explore-view/utils/misc.ts   |   2 +-
 .../src/views/lookups-view/lookups-view.tsx|  14 +-
 .../src/views/services-view/services-view.tsx  |  14 +-
 .../schema-step/preview-table/preview-table.tsx|   2 +-
 .../schema-step/schema-step.tsx|   2 +-
 .../flexible-query-input/flexible-query-input.tsx  |   2 +-
 .../result-table-pane/result-table-pane.tsx|   2 +-
 22 files changed, 553 insertions(+), 177 deletions(-)

diff --git a/licenses.yaml b/licenses.yaml
index ea993bb905e..bd03e20d67d 100644
--- a/licenses.yaml
+++ b/licenses.yaml
@@ -5094,7 +5094,7 @@ license_category: binary
 module: web-console
 license_name: Apache License version 2.0
 copyright: Imply Data
-version: 0.22.11
+version: 0.22.13
 
 ---
 
diff --git a/web-console/package-lock.json b/web-console/package-lock.json
index 816f734948e..9d835e3da04 100644
--- a/web-console/package-lock.json
+++ b/web-console/package-lock.json
@@ -14,7 +14,7 @@
 "@blueprintjs/datetime2": "^0.9.35",
 "@blueprintjs/icons": "^4.16.0",
 "@blueprintjs/popover2": "^1.14.9",
-"@druid-toolkit/query": "^0.22.11",
+"@druid-toolkit/query": "^0.22.13",
 "@druid-toolkit/visuals-core": "^0.3.3",
 "@druid-toolkit/visuals-react": "^0.3.3",
 "ace-builds": "~1.4.14",
@@ -1004,9 +1004,9 @@
   }
 },
 "node_modules/@druid-toolkit/query": {
-  "version": "0.22.11",
-  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.11.tgz";,
-  "integrity": 
"sha512-VVEn/tsEr9fb+8eKc+nu3/YH7l+LZ1vd0D32UDo66GLS3cI+EKOCM7VYC8lTvB1tAS+98w/EzfbdlRPlkSeOoQ==",
+  "version": "0.22.13",
+  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.13.tgz";,
+  "integrity": 
"sha512-p0Cmmbk55vLaYs2WWcUr09qDRU2IrkXOxGgUG+wS6Uuq/ALBqSmUDlbMSxB3vJjMvegiwgJ8+n7VfVpO0t/bJg==",
   "dependencies": {
 "tslib": "^2.5.2"
   }
@@ -19146,9 +19146,9 @@
   "dev": true
 },
 "@druid-toolkit/query": {
-  "version": "0.22.11",
-  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.11.tgz";,
-  "integrity": 
"sha512-VVEn/tsEr9fb+8eKc+nu3/YH7l+LZ1vd0D32UDo66GLS3cI+EKOCM7VYC8lTvB1tAS+98w/EzfbdlRPlkSeOoQ==",
+  "version": "0.22.13",
+  "resolved": 
"https://registry.npmjs.org/@druid-toolkit/query/-/query-0.22.13.tgz";,
+  "integrity": 
"sha512-p0Cmmbk55vLaYs2WWcUr09qDRU2IrkXOxGgUG+wS6Uuq/ALBqSmUDlbMSxB3vJjMvegiwgJ8+n7VfVpO0t/bJg==",
   "requires": {
 "tslib": "^2.5.2"
   }
diff --git a/web-console/package.json b/web-console/package.json
index 8cd0985f644..3e713fc2f68 100644
--- a/web-console/package.json
+++ b/web-console/package.json
@@ -68,7 +68,7 @@
 "@blueprintjs

(druid) branch sod deleted (was c6f1321e2d7)

2024-05-08 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a change to branch sod
in repository https://gitbox.apache.org/repos/asf/druid.git


 was c6f1321e2d7 top values query

This change permanently discards the following revisions:

 discard c6f1321e2d7 top values query
 discard 5fe3eb9cf25 add abs
 discard 628472d29b0 column hints
 discard 583547fbd4b basic works
 discard d6c2eabed99 progress
 discard 6ea58e8b72c Step
 discard 5f92d19df61 change to using measure name


-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



(druid) 03/04: add abs

2024-05-08 Thread vogievetsky
This is an automated email from the ASF dual-hosted git repository.

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

commit 5fe3eb9cf25c9fc6bad55165711dc5c85495b1e9
Author: Vadim Ogievetsky 
AuthorDate: Tue May 7 15:13:25 2024 -0700

add abs
---
 .../explore-view/modules/table-react-module.tsx| 86 +++---
 1 file changed, 60 insertions(+), 26 deletions(-)

diff --git a/web-console/src/views/explore-view/modules/table-react-module.tsx 
b/web-console/src/views/explore-view/modules/table-react-module.tsx
index efdc922217f..e03d3e90851 100644
--- a/web-console/src/views/explore-view/modules/table-react-module.tsx
+++ b/web-console/src/views/explore-view/modules/table-react-module.tsx
@@ -232,18 +232,23 @@ export default typedVisualModule({
   },
 },
 
-showDelta: {
-  type: 'boolean',
-  control: {
-visible: ({ params }) => Boolean((params.compares || []).length),
-  },
-},
-showPercent: {
-  type: 'boolean',
+compareTypes: {
+  type: 'options',
+  options: ['value', 'delta', 'absDelta', 'percent', 'absPercent'],
+  default: ['value', 'delta'],
   control: {
-visible: ({ params }) => Boolean((params.compares || []).length),
+label: 'Compare types',
+visible: ({ params }) => Boolean((params.compares || []).length) && 
!params.pivotColumn,
+optionLabels: {
+  value: 'Value',
+  delta: 'Delta',
+  absDelta: 'Abs. delta',
+  percent: 'Percent',
+  absPercent: 'Abs. percent',
+},
   },
 },
+
 maxRows: {
   type: 'number',
   default: 200,
@@ -319,8 +324,7 @@ function TableModule(props: TableModuleProps) {
 const pivotColumn: ExpressionMeta = parameterValues.pivotColumn;
 const metrics: ExpressionMeta[] = parameterValues.metrics;
 const compares: string[] = parameterValues.compares || [];
-const showDelta: boolean = parameterValues.showDelta;
-const showPercent: boolean = parameterValues.showPercent;
+const compareTypes: CompareType[] = parameterValues.compareTypes;
 const maxRows: number = parameterValues.maxRows;
 
 const pivotValues = pivotColumn ? pivotValueState.data : undefined;
@@ -329,14 +333,16 @@ function TableModule(props: TableModuleProps) {
 const effectiveOrderBy =
   orderBy || C(metrics[0]?.name || 
splitColumns[0]?.name).toOrderByExpression('DESC');
 
-const hasCompare = Boolean(compares.length);
+const hasCompare = !pivotColumn && Boolean(compares.length) && 
Boolean(compareTypes.length);
 
 const orderByColumnName = (effectiveOrderBy.expression as 
SqlColumn).getName();
 let orderByCompareMeasure: string | undefined;
 let orderByCompareDuration: string | undefined;
 let orderByCompareType: CompareType | undefined;
 if (hasCompare) {
-  const m = 
orderByColumnName.match(/^(.+):cmp:([^:]+):(value|delta|percent)$/);
+  const m = orderByColumnName.match(
+/^(.+):cmp:([^:]+):(value|delta|absDelta|percent|absPercent)$/,
+  );
   if (m) {
 orderByCompareMeasure = m[1];
 orderByCompareDuration = m[2];
@@ -356,9 +362,9 @@ function TableModule(props: TableModuleProps) {
   q.addSelect(toShowColumnExpression(showColumn, multipleValueMode)),
 ),
   )
-  .applyForEach(pivotValues || [''], (q, pivotValue) =>
+  .applyForEach(pivotValues || [''], (q, pivotValue, i) =>
 q.applyForEach(metrics, (q, metric) => {
-  const alias = `${metric.name}${pivotColumn ? `:${pivotValue}` : ''}`;
+  const alias = `${metric.name}${pivotColumn && i > 0 ? 
`:${pivotValue}` : ''}`;
   if (pivotColumn) {
 columnHints.set(alias, { displayName: metric.name, group: 
pivotValue });
   }
@@ -449,27 +455,43 @@ function TableModule(props: TableModuleProps) {
   .applyIf(NEEDS_GROUPING_TO_ORDER, anyValue)
   .applyIf(compare !== orderByCompareDuration, coalesce0);
 
-const valueName = `${metric.name}:cmp:${compare}:value`;
-columnHints.set(valueName, {
-  group: `Comparison to ${compare}`,
-  displayName: `${metric.name} (value)`,
-});
-const ret = [c.as(valueName)];
 const mainMetric = main
   .column(metric.name)
   .applyIf(NEEDS_GROUPING_TO_ORDER, anyValue)
-  .applyIf(orderByCompareDuration, ex => F('COALESCE', ex, 0));
+  .applyIf(orderByCompareDuration, coalesce0);
+
+const diff = SqlExpression.pars

  1   2   3   4   5   6   7   8   9   >