How to use the druid-query-toolkit/build/ast/sql-query/helpers.aliasFactory function in druid-query-toolkit

To help you get started, we’ve selected a few druid-query-toolkit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / druid / web-console / src / views / query-view / column-tree / column-tree-menu / time-menu-items / time-menu-items.tsx View on Github external
onClick={() => {
            onQueryChange(
              parsedQuery.addFunctionToGroupBy(
                'TIME_FLOOR',
                [' '],
                [stringFactory(columnName, `"`), stringFactory('PT1H', `'`)],
                aliasFactory(`${columnName}_time_floor`),
              ),
              true,
            );
          }}
        />
github apache / druid / web-console / src / views / query-view / column-tree / column-tree-menu / string-menu-items / string-menu-items.tsx View on Github external
onClick={() => {
            onQueryChange(
              parsedQuery.addFunctionToGroupBy(
                'SUBSTRING',
                [' ', ' '],
                [stringFactory(columnName, `"`), 1, 2],

                aliasFactory(`${columnName}_substring`),
              ),
              true,
            );
          }}
        />
github apache / druid / web-console / src / views / query-view / column-tree / column-tree-menu / number-menu-items / number-menu-items.tsx View on Github external
onClick={() => {
            onQueryChange(
              parsedQuery.addFunctionToGroupBy(
                'TRUNC',
                [' '],
                [
                  new StringType({
                    spacing: [],
                    chars: columnName,
                    quote: '"',
                  }),
                  -1,
                ],
                aliasFactory(`${columnName}_truncated`),
              ),
              true,
            );
          }}
        />
github apache / druid / web-console / src / views / query-view / column-tree / column-tree-menu / number-menu-items / number-menu-items.tsx View on Github external
onClick={() => {
            onQueryChange(
              parsedQuery.addAggregateColumn(columnName, 'MIN', aliasFactory(`min_${columnName}`)),
              true,
            );
          }}
        />
github apache / druid / web-console / src / views / query-view / column-tree / column-tree-menu / time-menu-items / time-menu-items.tsx View on Github external
onClick={() => {
            onQueryChange(
              parsedQuery.addAggregateColumn(columnName, 'MAX', aliasFactory(`max_${columnName}`)),
              true,
            );
          }}
        />
github apache / druid / web-console / src / views / query-view / column-tree / column-tree-menu / string-menu-items / string-menu-items.tsx View on Github external
onClick={() =>
            onQueryChange(
              parsedQuery.addAggregateColumn(
                columnName,
                'COUNT',
                aliasFactory(`dist_${columnName}`),
              ),
              true,
            )
          }