You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/01/18 10:19:00 UTC
[jira] [Updated] (CALCITE-4954) Group TEXT field failed in Elasticsearch Adapter
[ https://issues.apache.org/jira/browse/CALCITE-4954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated CALCITE-4954:
------------------------------------
Labels: pull-request-available (was: )
> Group TEXT field failed in Elasticsearch Adapter
> ------------------------------------------------
>
> Key: CALCITE-4954
> URL: https://issues.apache.org/jira/browse/CALCITE-4954
> Project: Calcite
> Issue Type: Bug
> Components: elasticsearch-adapter
> Affects Versions: 1.28.0
> Reporter: ZheHu
> Assignee: ZheHu
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Adding a text type field "cat6" in AggregationTest.java, I've run the following SQL:
> {code:java}
> @Test void testGroupTextField() {
> CalciteAssert.that()
> .with(newConnectionFactory())
> .query("select cat6 from view group by cat6")
> .returns("EXPR$0=1\n");
> }
> {code}
> and I get such exception:
> {code:java}
> {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [cat6] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}],......(useless message),"status":400}
> {code}
> As Elasticsearch does supports grouping text field(memory consumed), it's better to show SQL users how to implement it in Calcite by enriching ES's test cases.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)