Skip to content

[Bug] (array-type) Error occurred while creating view from table with array types #12199

@xy720

Description

@xy720

Search before asking

  • I had searched in the issues and found no similar issues.

Version

master

What's Wrong?

Error occurred while creating view from table with array types.

2022-08-30 21:00:26,158 WARN (mysql-nio-pool-6|331) [StmtExecutor.execute():520] execute Exception. stmt[32, 7bcda192d7f744de-9c1d40a6c915fb04], errCode = 2, detailMessage = Unexpected exception: null
2022-08-30 21:26:45,032 WARN (mysql-nio-pool-7|333) [ScalarType.createType():192] type=ARRAY
2022-08-30 21:26:45,033 WARN (mysql-nio-pool-7|333) [StmtExecutor.analyze():681] Analyze failed. stmt[33, f2a782eb6a5e4f6f-b343307f12fe886b]
java.lang.IllegalStateException: null
        at com.google.common.base.Preconditions.checkState(Preconditions.java:492) ~[spark-dpp-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
        at org.apache.doris.catalog.ScalarType.createType(ScalarType.java:193) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.catalog.ScalarType.createType(ScalarType.java:131) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.analysis.BaseViewStmt.createColumnAndViewDefs(BaseViewStmt.java:104) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.analysis.CreateViewStmt.analyze(CreateViewStmt.java:81) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.analyze(StmtExecutor.java:677) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:390) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:357) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:262) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.qe.ConnectProcessor.dispatch(ConnectProcessor.java:399) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:603) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[doris-fe.jar:1.0-SNAPSHOT]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_131]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_131]
        at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_131]

What You Expected?

all is well

How to Reproduce?

CREATE TABLE `array_test` (

  `id` int(11) NULL,

  `c_array` array<int(11)> NULL

) ENGINE=OLAP

DUPLICATE KEY(`id`)

COMMENT 'OLAP'

DISTRIBUTED BY HASH(`id`) BUCKETS 1

PROPERTIES (

"in_memory" = "false",

"storage_format" = "V2"

);

create view v1 as select * from array_test;

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions