-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
SQL: array columns for drivers #39700
Labels
:Analytics/SQL
SQL querying
Comments
Pinging @elastic/es-search |
Related and relevant issue #33204 |
costin
added a commit
to costin/elasticsearch
that referenced
this issue
Mar 15, 2019
For cases where fields can have multi values, allow the behavior to be customized through a dedicated configuration field. By default this will be enabled on the drivers so that existing datasets work instead of throwing an exception. For regular SQL usage, the behavior is false so that the user is aware of the underlying data. Fix elastic#39700
costin
added a commit
that referenced
this issue
Mar 18, 2019
For cases where fields can have multi values, allow the behavior to be customized through a dedicated configuration field. By default this will be enabled on the drivers so that existing datasets work instead of throwing an exception. For regular SQL usage, the behavior is false so that the user is aware of the underlying data. Fix #39700
costin
added a commit
that referenced
this issue
Mar 18, 2019
For cases where fields can have multi values, allow the behavior to be customized through a dedicated configuration field. By default this will be enabled on the drivers so that existing datasets work instead of throwing an exception. For regular SQL usage, the behavior is false so that the user is aware of the underlying data. Fix #39700 (cherry picked from commit 2b35157)
costin
added a commit
that referenced
this issue
Mar 18, 2019
For cases where fields can have multi values, allow the behavior to be customized through a dedicated configuration field. By default this will be enabled on the drivers so that existing datasets work instead of throwing an exception. For regular SQL usage, the behavior is false so that the user is aware of the underlying data. Fix #39700 (cherry picked from commit 2b35157)
costin
added a commit
that referenced
this issue
Mar 18, 2019
For cases where fields can have multi values, allow the behavior to be customized through a dedicated configuration field. By default this will be enabled on the drivers so that existing datasets work instead of throwing an exception. For regular SQL usage, the behavior is false so that the user is aware of the underlying data. Fix #39700 (cherry picked from commit 2b35157)
With a fresh build:
returns
and corresponding stacktrace:
. |
Works as expected (once request param |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The Kibana sample data includes array fields which can not be selected (yet), like
kibana_sample_data_ecommerce.manufacturer
.We would need a solution for these fields when the client is a driver, likely in line with #39471/#37801.
Example of a failure with ODBC:
{"query": "SELECT kibana_sample_data_ecommerce.category, kibana_sample_data_ecommerce.category.keyword, kibana_sample_data_ecommerce.currency, kibana_sample_data_ecommerce.customer_birth_date, kibana_sample_data_ecommerce.customer_first_name, kibana_sample_data_ecommerce.customer_first_name.keyword, kibana_sample_data_ecommerce.customer_full_name, kibana_sample_data_ecommerce.customer_full_name.keyword, kibana_sample_data_ecommerce.customer_gender, kibana_sample_data_ecommerce.customer_id, kibana_sample_data_ecommerce.customer_last_name, kibana_sample_data_ecommerce.customer_last_name.keyword, kibana_sample_data_ecommerce.customer_phone, kibana_sample_data_ecommerce.day_of_week, kibana_sample_data_ecommerce.day_of_week_i, kibana_sample_data_ecommerce.email, kibana_sample_data_ecommerce.geoip.city_name, kibana_sample_data_ecommerce.geoip.continent_name, kibana_sample_data_ecommerce.geoip.country_iso_code, kibana_sample_data_ecommerce.geoip.region_name, kibana_sample_data_ecommerce.manufacturer, kibana_sample_data_ecommerce.manufacturer.keyword, kibana_sample_data_ecommerce.order_date, kibana_sample_data_ecommerce.order_id, kibana_sample_data_ecommerce.products._id, kibana_sample_data_ecommerce.products._id.keyword, kibana_sample_data_ecommerce.products.base_price, kibana_sample_data_ecommerce.products.base_unit_price, kibana_sample_data_ecommerce.products.category, kibana_sample_data_ecommerce.products.category.keyword, kibana_sample_data_ecommerce.products.created_on, kibana_sample_data_ecommerce.products.discount_amount, kibana_sample_data_ecommerce.products.discount_percentage, kibana_sample_data_ecommerce.products.manufacturer, kibana_sample_data_ecommerce.products.manufacturer.keyword, kibana_sample_data_ecommerce.products.min_price, kibana_sample_data_ecommerce.products.price, kibana_sample_data_ecommerce.products.product_id, kibana_sample_data_ecommerce.products.product_name, kibana_sample_data_ecommerce.products.product_name.keyword, kibana_sample_data_ecommerce.products.quantity, kibana_sample_data_ecommerce.products.sku, kibana_sample_data_ecommerce.products.tax_amount, kibana_sample_data_ecommerce.products.taxful_price, kibana_sample_data_ecommerce.products.taxless_price, kibana_sample_data_ecommerce.products.unit_discount_amount, kibana_sample_data_ecommerce.sku, kibana_sample_data_ecommerce.taxful_total_price, kibana_sample_data_ecommerce.taxless_total_price, kibana_sample_data_ecommerce.total_quantity, kibana_sample_data_ecommerce.total_unique_products, kibana_sample_data_ecommerce.type, kibana_sample_data_ecommerce.user\r\nFROM distribution_run:kibana_sample_data_ecommerce kibana_sample_data_ecommerce", "mode": "ODBC", "client_id": "odbc64"}
generating
{"error":{"root_cause":[{"type":"sql_illegal_argument_exception","reason":"Arrays (returned by [manufacturer]) are not supported"}],"type":"sql_illegal_argument_exception","reason":"Arrays (returned by [manufacturer]) are not supported"},"status":500}
.The text was updated successfully, but these errors were encountered: