Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.28.0
Description
Adding a text type field "cat6" in AggregationTest.java, I've run the following SQL:
@Test void testGroupTextField() { CalciteAssert.that() .with(newConnectionFactory()) .query("select cat6 from view group by cat6") .returns("EXPR$0=1\n"); }
and I get such exception:
{"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}
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.
Attachments
Issue Links
- fixes
-
CALCITE-5049 Error when executing join on Elasticsearch Adapter
-
- Resolved
-
- links to