-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add where clause support for covering index (#85)
* Add where clause for create skipping and covering index Signed-off-by: Chen Dai <[email protected]> * Fix optional where clause Signed-off-by: Chen Dai <[email protected]> * Add filtering condition support for covering index Signed-off-by: Chen Dai <[email protected]> --------- Signed-off-by: Chen Dai <[email protected]>
- Loading branch information
Showing
11 changed files
with
140 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,6 +174,7 @@ SHOW: 'SHOW'; | |
TRUE: 'TRUE'; | ||
VIEW: 'VIEW'; | ||
VIEWS: 'VIEWS'; | ||
WHERE: 'WHERE'; | ||
WITH: 'WITH'; | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...-integration/src/test/scala/org/opensearch/flint/spark/sql/FlintSparkSqlParserSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.flint.spark.sql | ||
|
||
import org.scalatest.matchers.should.Matchers | ||
|
||
import org.apache.spark.FlintSuite | ||
|
||
class FlintSparkSqlParserSuite extends FlintSuite with Matchers { | ||
|
||
test("create skipping index with filtering condition") { | ||
the[UnsupportedOperationException] thrownBy { | ||
sql(""" | ||
| CREATE SKIPPING INDEX ON alb_logs | ||
| (client_ip VALUE_SET) | ||
| WHERE status != 200 | ||
| WITH (auto_refresh = true) | ||
|""".stripMargin) | ||
} should have message "Filtering condition is not supported: WHERE status != 200" | ||
} | ||
|
||
ignore("create covering index with filtering condition") { | ||
the[UnsupportedOperationException] thrownBy { | ||
sql(""" | ||
| CREATE INDEX test ON alb_logs | ||
| (elb, client_ip) | ||
| WHERE status != 404 | ||
| WITH (auto_refresh = true) | ||
|""".stripMargin) | ||
} should have message "Filtering condition is not supported: WHERE status != 404" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters