You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Tanuj Khurana (Jira)" <ji...@apache.org> on 2025/06/19 01:26:00 UTC

[jira] [Updated] (PHOENIX-7468) NPE in SchemaExtractionTool on salted table

     [ https://issues.apache.org/jira/browse/PHOENIX-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tanuj Khurana updated PHOENIX-7468:
-----------------------------------
    Fix Version/s: 5.2.3

> NPE in SchemaExtractionTool on salted table
> -------------------------------------------
>
>                 Key: PHOENIX-7468
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7468
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 5.2.0, 5.2.1, 5.2.2
>            Reporter: Tanuj Khurana
>            Assignee: Tanuj Khurana
>            Priority: Major
>             Fix For: 5.3.0, 5.2.3
>
>
> On a salted table, if the order of PK columns in the create table definition is different from the order specified in the primary key constraint the schema extraction tool fails with a NPE.
> {code:java}
> "CREATE TABLE IF NOT EXISTS TEST.FOO "
>         "(ID1 CHAR(15) NOT NULL,\n" +
>         "ID2 INTEGER NOT NULL,\n" +
>         "TEXT VARCHAR,\n" +
>         "INT INTEGER,\n" +
>         "DOUBLE DECIMAL(12,3),\n" +
>         "CREATED_DATE DATE NOT NULL,\n" +
>         "TS TIMESTAMP\n" +
>         "CONSTRAINT PK PRIMARY KEY (ID1, ID2, CREATED_DATE))\n" +
>         "SALT_BUCKETS=16,MULTI_TENANT=true";
> java.lang.NullPointerException	at org.apache.phoenix.schema.tool.SchemaExtractionProcessor.getColumnInfoString(SchemaExtractionProcessor.java:587)	at org.apache.phoenix.schema.tool.SchemaExtractionProcessor.getColumnInfoStringForTable(SchemaExtractionProcessor.java:504)	at org.apache.phoenix.schema.tool.SchemaExtractionProcessor.extractCreateTableDDL(SchemaExtractionProcessor.java:307)	at org.apache.phoenix.schema.tool.SchemaExtractionProcessor.process(SchemaExtractionProcessor.java:100)	at org.apache.phoenix.schema.tool.SchemaTool.run(SchemaTool.java:80)	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:82)	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:97)	at org.apache.phoenix.schema.tool.SchemaTool.main(SchemaTool.java:170) {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)