File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
elasticsearch-sql-core/src
main/java/io/github/iamazy/elasticsearch/dsl/sql/parser
test/java/io/github/iamazy/elasticsearch/dsl/sql Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 552019-09-08: add geo polygon support and update geo bounding box syntax
662019-09-10: add dis max support
772019-09-23: add geo shape support
8- 2019-12-14: add insert/update support
8+ 2019-12-14: add insert/update support
9+ 2021-12-21: remove order by default sortMode, fixed in语句不能参与or计算
10+ 2022-01-19: fixed distinct support
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ private void parseNotGroupByClause(ElasticDslContext dslContext) {
7171 dslContext .getParseResult ().getHighlighter ().add (distinctName );
7272 }
7373 }
74- if (StringUtils .isNotBlank (dslContext .getParseResult ().getDistinctName ())) {
74+ if (StringUtils .isBlank (dslContext .getParseResult ().getDistinctName ())) {
7575 dslContext .getParseResult ().setDistinctName (distinctName );
7676 }
7777 includeFields .add (distinctName );
Original file line number Diff line number Diff line change @@ -6,6 +6,14 @@ public class FixedHistoryTest {
66
77 protected static ElasticSql2DslParser parser = new ElasticSql2DslParser ();
88
9+ @ Test
10+ public void fixedAt20220119 (){
11+ // 1. distinct
12+ String distinctSql = "select distinct name from user " ;
13+ System .out .println (parser .parse (distinctSql ).toDsl ());
14+
15+ }
16+
917 @ Test
1018 public void fixedOn20211221 () {
1119 // 1. 去掉默认sortMode=avg ,默认为null
You can’t perform that action at this time.
0 commit comments