-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Support array type in primary and unique key. #1723
Support array type in primary and unique key. #1723
Conversation
@@ -174,7 +174,7 @@ public void analyze(boolean isOlap) throws AnalysisException { | |||
String.format("Cannot specify aggregate function '%s' for key column '%s'", aggregateType, | |||
name)); | |||
} | |||
if (!aggregateType.checkCompatibility(type.getPrimitiveType())) { | |||
if (!(aggregateType.checkCompatibility(type.getPrimitiveType()) || (aggregateType.isReplaceFamily() && type.isArrayType()))) { |
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.
|| (aggregateType.isReplaceFamily() && type.isArrayType())
IMO, it's better to place this check inside ggregateType.checkCompatibility
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.
the checkCompatibility is a simply table driven method, it check primitive types, the business logic of isArrayType, isHllType, isBitmapType, et al. is processed in analyze method right here.
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.
changed.
Could you please give more test results on the reads and writes on array columns? |
@kangkaisen @Seaven PTAL |
…lement to a more specialize name, checkPrimitiveTypeCompatibility.
* update * Update hive_catalog.md
* Update SHOW CATALOGS.md (StarRocks#1716) (StarRocks#1717) (cherry picked from commit 79ee002) Co-authored-by: Sihui <103574525+femiiii@users.noreply.github.com> * doc walkthrough "architecture" (StarRocks#1710) (StarRocks#1718) * doc walkthrough "architecture" * Update system_architecture.md * Update system_architecture.md (cherry picked from commit 1de4fe4) Co-authored-by: evelyn.zhaojie <98087056+evelynzhaojie@users.noreply.github.com> * 2.4 bugfix intoc (StarRocks#1722) * Create k8s_operator_cn.md * bugfix in 2.4rc * Update TOC.md * Update TOC.md * update-2.4 content (StarRocks#1723) (StarRocks#1724) * update * Update hive_catalog.md (cherry picked from commit 1ff43c4) Co-authored-by: Sihui <103574525+femiiii@users.noreply.github.com> * [Bugfix] add images for operator (StarRocks#1726) * Add 2.4 RN in TOC (StarRocks#1727) (StarRocks#1730) (cherry picked from commit 6b9c2b5) Co-authored-by: 絵空事スピリット <wanglichen@starrocks.com> * fix 2.4 (StarRocks#1731) * [Doc] enhancement in 2.4 release note (StarRocks#1729) * [Doc] enhancement in 2.4 release note * Update release-2.4.md * Update TOC.md (StarRocks#1736) (StarRocks#1737) (cherry picked from commit ca65610) Co-authored-by: 絵空事スピリット <wanglichen@starrocks.com> * update toc&etl&streamLoad&loadingIntro&Export Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Sihui <103574525+femiiii@users.noreply.github.com> Co-authored-by: evelyn.zhaojie <98087056+evelynzhaojie@users.noreply.github.com> Co-authored-by: hellolilyliuyi <96421222+hellolilyliuyi@users.noreply.github.com> Co-authored-by: 絵空事スピリット <wanglichen@starrocks.com>
* update * Update hive_catalog.md (cherry picked from commit 1ff43c4) Co-authored-by: Sihui <103574525+femiiii@users.noreply.github.com>
before this PR:
after this PR:
ATT, resolve #1715