-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add OpenSearchTable in flint core #479
Conversation
flint-core/src/main/java/org/opensearch/flint/core/RestHighLevelClientWrapper.java
Outdated
Show resolved
Hide resolved
flint-spark-integration/src/main/scala/org/apache/spark/sql/flint/FlintScanBuilder.scala
Outdated
Show resolved
Hide resolved
...n/src/test/scala/org/opensearch/flint/spark/covering/ApplyFlintSparkCoveringIndexSuite.scala
Outdated
Show resolved
Hide resolved
flint-core/src/main/scala/org/opensearch/flint/core/table/OpenSearchIndexTable.scala
Outdated
Show resolved
Hide resolved
flint-core/src/main/scala/org/opensearch/flint/core/table/OpenSearchIndexTable.scala
Outdated
Show resolved
Hide resolved
flint-core/src/main/scala/org/opensearch/flint/core/storage/FlintOpenSearchClient.java
Outdated
Show resolved
Hide resolved
val SUPPORT_SHARD = FlintConfig(s"spark.datasource.flint.${FlintOptions.SUPPORT_SHARD}") | ||
.datasourceOption() | ||
.doc("indicate does index support shard or not") | ||
.createWithDefault(String.valueOf(FlintOptions.DEFAULT_SUPPORT_SHARD)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this new option for testing or some use case? Does this actually mean if the OpenSearch table is partitioned or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This describes whether the OpenSearch index supports sharding. The reason is that OpenSearch serverless does not support sharding.
Currently, a table's partition is determined by the partition, but there is no hard limit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, we should remove this setting. However, currently, the AOSS index settings return shard information, so we cannot distinguish it.
{
"settings": {
"index": {
"number_of_shards": "2",
"number_of_replicas": "0",
}
}
}
}
Signed-off-by: Peng Huo <penghuo@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes!
Description
SELECT COUNT(*) FROM dev.default.logs-181998
SELECT COUNT(*) FROM dev.default.logs-181998 WHERE status <> 0
SELECT COUNT(*), AVG(size) FROM dev.default.logs-181998
SELECT AVG(CAST(size AS BIGINT)) FROM dev.default.logs-181998
SELECT MIN(@timestamp), MAX(@timestamp) FROM dev.default.logs-181998
SELECT status, COUNT() FROM dev.default.logs-181998 WHERE status <> 0 GROUP BY status ORDER BY COUNT() DESC
Issues Resolved
#494
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.