Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select: Support dynamic columns #461

Closed
kou opened this issue Feb 1, 2016 · 2 comments
Closed

select: Support dynamic columns #461

kou opened this issue Feb 1, 2016 · 2 comments

Comments

@kou
Copy link
Member

kou commented Feb 1, 2016

The current Groonga can't use computed value for output_columns, drilldown and sortby.

If Groonga supports dynamic columns, we can use computed value for them. Because users just put computed values to dynamic columns. Dynamic columns can be implemented by columns for temporary table (result table is a temporary table).

There is another feature provided by dynamic columns. Naming computed value in output_columns. For example, --output_columns 'snippet_html(column1), snippet_html(column2)' uses snippet_html for both computed values for now. If Groonga supports dynamic columns, we can use another label for each computed value.

API idea:

select \
  --column[name].stage filtered \
  --column[name].type ShortText \
  --column[name].flags COLUMN_SCALAR \
  --column[name].value 'column1 + column2'

Available stage values:

  • initial: Created a column at the first. It can be used in query, filter, drilldown, sortby and output_columns.
  • filtered: Created a column after query and filter are evaluated. It can be used in drilldown, sortby and output_columns.
  • output: Created a column after sortby. The value of column should only evaluated only for limit records.
@kou
Copy link
Member Author

kou commented May 6, 2016

filtered is implemented at master.

@s-yata
Copy link
Contributor

s-yata commented Jan 11, 2018

Dynamic columns seem to be already supported.
It uses --columns[name].xxx instead of --column[name].xxx.

@s-yata s-yata closed this as completed Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants