Skip to content

PHOENIX-6518 Implement SHOW CREATE TABLE SQL command - #1271

Merged
richardantal merged 1 commit into
apache:masterfrom
richardantal:PHOENIX-6518
Jul 29, 2021
Merged

PHOENIX-6518 Implement SHOW CREATE TABLE SQL command#1271
richardantal merged 1 commit into
apache:masterfrom
richardantal:PHOENIX-6518

Conversation

@richardantal

Copy link
Copy Markdown
Contributor

No description provided.

assertTrue(rs.getString(1).contains(ddl));
}

@Ignore

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assert.assertEquals(createTableStmt, result.toUpperCase());
}

// @Ignore

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


public class ShowCreateStatementIT extends ParallelStatsDisabledIT {
@Test
public void testDescribebasic() throws Exception {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not describe


ResultSet rs = conn.createStatement().executeQuery("SHOW CREATE STATEMENT " + tableName );
assertTrue(rs.next());
System.out.println(ddl);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove debug printlns


ResultSet rs = conn.createStatement().executeQuery("SHOW CREATE STATEMENT \"" + tableName + "\"");
assertTrue(rs.next());
System.out.println(ddl);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not commit printlns


ResultSet rs = conn.createStatement().executeQuery("SHOW CREATE STATEMENT " + tableFullName + "");
assertTrue(rs.next());
System.out.println(ddl);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug printlns

}
}

private static class ExecutableShowCreateTablesStatement extends ShowCreateTablesStatement

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class names don't match the command name

import org.apache.phoenix.jdbc.PhoenixStatement;

/**
* Parent class for all SHOW statements. SHOW SCHEMAS, SHOW TABLES etc.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment doesn't seem to be true

import java.util.Objects;

/**
* ParseNode implementation for DESCRIBE tablename.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does not match command

Comment on lines +46 to +63
if(tableName.getSchemaName() != null) {
if (tableName.isSchemaNameCaseSensitive()) {
buf.append("\"");
}
buf.append(tableName.getSchemaName());
if (tableName.isSchemaNameCaseSensitive()) {
buf.append("\"");
}
buf.append(".");
}

if (tableName.isTableNameCaseSensitive()) {
buf.append("\"");
}
buf.append(tableName.getTableName());
if (tableName.isTableNameCaseSensitive()) {
buf.append("\"");
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure we have a helper function already for this.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this to use the SchemaUtil.getEscapedTableName, its not exactly the same but works.

throw new SQLException(e.getMessage());
}

String stmtType;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we need to adjust the column name.
"CREATE STATEMENT" is probably enough.


import static org.apache.phoenix.schema.SchemaSynthesisProcessor.ENTITY_NAME_IN_BASE_AND_ALTER_DDL_DON_T_MATCH;
import static org.apache.phoenix.schema.SchemaSynthesisProcessor.UNSUPPORTED_DDL_EXCEPTION;
import static org.apache.phoenix.schematool.SchemaSynthesisProcessor.ENTITY_NAME_IN_BASE_AND_ALTER_DDL_DON_T_MATCH;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about the "schematool" package name.
Perhaps "schemaextract" or "sema.generate" or similar would be more descriptive.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this package there are the files I moved from phoenix-tools module.
It has the SchemaSynthesis functionality as well not only the schema extraction.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 28sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 1sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ master Compile Tests _
+0 🆗mvndep5m 21sMaven dependency ordering for branch
+1 💚mvninstall17m 39smaster passed
+0hbaserecompile29m 52sHBase recompiled.
+1 💚compile1m 35smaster passed
+1 💚checkstyle2m 3smaster passed
+1 💚javadoc1m 9smaster passed
+0 🆗spotbugs3m 3sphoenix-core in master has 964 extant spotbugs warnings.
+0 🆗spotbugs0m 43sphoenix-tools in master has 5 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall13m 38sthe patch passed
+0hbaserecompile19m 59sHBase recompiled.
+1 💚compile1m 34sthe patch passed
+1 💚javac1m 34sthe patch passed
-1 ❌checkstyle1m 49sphoenix-core: The patch generated 428 new + 2618 unchanged - 20 fixed = 3046 total (was 2638)
+1 💚checkstyle0m 16sphoenix-tools: The patch generated 0 new + 60 unchanged - 361 fixed = 60 total (was 421)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 1sThe patch has no ill-formed XML file.
+1 💚javadoc1m 9sthe patch passed
-1 ❌spotbugs3m 19sphoenix-core generated 6 new + 964 unchanged - 0 fixed = 970 total (was 964)
+1 💚spotbugs0m 54sphoenix-tools generated 0 new + 3 unchanged - 2 fixed = 3 total (was 5)
_ Other Tests _
-1 ❌unit111m 54sphoenix-core in the patch failed.
-1 ❌unit3m 41sphoenix-tools in the patch failed.
+1 💚asflicense1m 24sThe patch does not generate ASF License warnings.
188m 43s
ReasonTests
FindBugsmodule:phoenix-core
Found reliance on default encoding in org.apache.phoenix.schematool.SchemaSynthesisProcessor.getQueriesFromFile(String):in org.apache.phoenix.schematool.SchemaSynthesisProcessor.getQueriesFromFile(String): new java.io.FileReader(File) At SchemaSynthesisProcessor.java:[line 211]
Null passed for non-null parameter of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:[line 80]
Null passed for non-null parameter of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:[line 81]
org.apache.phoenix.schematool.SchemaSynthesisProcessor.getQueriesFromFile(String) may fail to close stream At SchemaSynthesisProcessor.java:stream At SchemaSynthesisProcessor.java:[line 211]
Invocation of toString on Throwable.getStackTrace() in org.apache.phoenix.util.QueryUtil.getShowCreateStatementStmt(PhoenixConnection, String, TableName) At QueryUtil.java:in org.apache.phoenix.util.QueryUtil.getShowCreateStatementStmt(PhoenixConnection, String, TableName) At QueryUtil.java:[line 788]
org.apache.phoenix.util.QueryUtil.getShowCreateStatementStmt(PhoenixConnection, String, TableName) may fail to clean up java.sql.Statement on checked exception Obligation to clean up resource created at QueryUtil.java:to clean up java.sql.Statement on checked exception Obligation to clean up resource created at QueryUtil.java:[line 804] is not discharged
Failed junit testsphoenix.end2end.BackwardCompatibilityIT
phoenix.schema.SchemaToolExtractionIT
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1271
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile xml
unameLinux 36dc51b6ef0f 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 6842c1d
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/1/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
spotbugshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/1/artifact/yetus-general-check/output/new-spotbugs-phoenix-core.html
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/1/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/1/artifact/yetus-general-check/output/patch-unit-phoenix-tools.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/1/testReport/
Max. process+thread count14695 (vs. ulimit of 30000)
modulesC: phoenix-core phoenix-tools U: .
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/1/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 28sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ master Compile Tests _
+0 🆗mvndep5m 9sMaven dependency ordering for branch
+1 💚mvninstall17m 19smaster passed
+0hbaserecompile30m 16sHBase recompiled.
+1 💚compile1m 32smaster passed
+1 💚checkstyle2m 3smaster passed
+1 💚javadoc1m 12smaster passed
+0 🆗spotbugs3m 6sphoenix-core in master has 964 extant spotbugs warnings.
+0 🆗spotbugs0m 44sphoenix-tools in master has 5 extant spotbugs warnings.
-0 ⚠️patch0m 59sUsed diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall13m 43sthe patch passed
+0hbaserecompile20m 41sHBase recompiled.
+1 💚compile1m 33sthe patch passed
+1 💚javac1m 33sthe patch passed
-1 ❌checkstyle1m 49sphoenix-core: The patch generated 428 new + 2618 unchanged - 20 fixed = 3046 total (was 2638)
+1 💚checkstyle0m 16sphoenix-tools: The patch generated 0 new + 60 unchanged - 361 fixed = 60 total (was 421)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 2sThe patch has no ill-formed XML file.
+1 💚javadoc1m 10sthe patch passed
-1 ❌spotbugs3m 22sphoenix-core generated 6 new + 964 unchanged - 0 fixed = 970 total (was 964)
+1 💚spotbugs0m 54sphoenix-tools generated 0 new + 3 unchanged - 2 fixed = 3 total (was 5)
_ Other Tests _
-1 ❌unit113m 11sphoenix-core in the patch failed.
-1 ❌unit3m 36sphoenix-tools in the patch failed.
+1 💚asflicense1m 22sThe patch does not generate ASF License warnings.
191m 3s
ReasonTests
FindBugsmodule:phoenix-core
Found reliance on default encoding in org.apache.phoenix.schematool.SchemaSynthesisProcessor.getQueriesFromFile(String):in org.apache.phoenix.schematool.SchemaSynthesisProcessor.getQueriesFromFile(String): new java.io.FileReader(File) At SchemaSynthesisProcessor.java:[line 211]
Null passed for non-null parameter of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:[line 80]
Null passed for non-null parameter of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:[line 81]
org.apache.phoenix.schematool.SchemaSynthesisProcessor.getQueriesFromFile(String) may fail to close stream At SchemaSynthesisProcessor.java:stream At SchemaSynthesisProcessor.java:[line 211]
Invocation of toString on Throwable.getStackTrace() in org.apache.phoenix.util.QueryUtil.getShowCreateStatementStmt(PhoenixConnection, String, TableName) At QueryUtil.java:in org.apache.phoenix.util.QueryUtil.getShowCreateStatementStmt(PhoenixConnection, String, TableName) At QueryUtil.java:[line 788]
org.apache.phoenix.util.QueryUtil.getShowCreateStatementStmt(PhoenixConnection, String, TableName) may fail to clean up java.sql.Statement on checked exception Obligation to clean up resource created at QueryUtil.java:to clean up java.sql.Statement on checked exception Obligation to clean up resource created at QueryUtil.java:[line 794] is not discharged
Failed junit testsphoenix.end2end.PermissionNSEnabledWithCustomAccessControllerIT
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1271
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile xml
unameLinux c9b4b2252172 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 6842c1d
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/2/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
spotbugshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/2/artifact/yetus-general-check/output/new-spotbugs-phoenix-core.html
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/2/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/2/artifact/yetus-general-check/output/patch-unit-phoenix-tools.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/2/testReport/
Max. process+thread count15739 (vs. ulimit of 30000)
modulesC: phoenix-core phoenix-tools U: .
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/2/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.


// Parse a describe statement. SHOW CREATE STATEMENT tablename ...
show_create_statement_node returns [ShowCreateStatement ret]
: SHOW CREATE STATEMENT tablename=from_table_name { $ret = factory.showCreateStatement(tablename); }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better to support to get the statements for index as well as views also. May be another JIRA.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This from_table_name can be actually a view or index table as well.

from_table_name returns [TableName ret]

It is already working for views and for indexes as well. I added some tests to be sure.
Istvan was in the favour of naming this SHOW CREATE STATEMENT as it works for views and indexes as well.


In case we chose to rename it to SHOW CREATE TABLE, should it work for views and indexes as well or Do you think those should be separate commands?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bq.In case we chose to rename it to SHOW CREATE TABLE, should it work for views and indexes as well or Do you think those should be separate commands?
Same should work for table,index and views as well instead of separate commands.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 58sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ master Compile Tests _
+0 🆗mvndep4m 58sMaven dependency ordering for branch
+1 💚mvninstall21m 55smaster passed
+0hbaserecompile35m 21sHBase recompiled.
+1 💚compile1m 56smaster passed
+1 💚checkstyle1m 50smaster passed
+1 💚javadoc1m 20smaster passed
+0 🆗spotbugs3m 56sphoenix-core in master has 964 extant spotbugs warnings.
+0 🆗spotbugs0m 50sphoenix-tools in master has 5 extant spotbugs warnings.
-0 ⚠️patch1m 7sUsed diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall17m 27sthe patch passed
+0hbaserecompile24m 17sHBase recompiled.
+1 💚compile1m 38sthe patch passed
+1 💚javac1m 38sthe patch passed
-1 ❌checkstyle1m 34sphoenix-core: The patch generated 408 new + 2638 unchanged - 0 fixed = 3046 total (was 2638)
-1 ❌checkstyle0m 16sphoenix-tools: The patch generated 3 new + 57 unchanged - 364 fixed = 60 total (was 421)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 1sThe patch has no ill-formed XML file.
+1 💚javadoc1m 9sthe patch passed
-1 ❌spotbugs3m 23sphoenix-core generated 6 new + 964 unchanged - 0 fixed = 970 total (was 964)
+1 💚spotbugs0m 52sphoenix-tools generated 0 new + 3 unchanged - 2 fixed = 3 total (was 5)
_ Other Tests _
+1 💚unit116m 53sphoenix-core in the patch passed.
-1 ❌unit3m 23sphoenix-tools in the patch failed.
+1 💚asflicense0m 28sThe patch does not generate ASF License warnings.
202m 12s
ReasonTests
FindBugsmodule:phoenix-core
Found reliance on default encoding in org.apache.phoenix.schematool.SchemaSynthesisProcessor.getQueriesFromFile(String):in org.apache.phoenix.schematool.SchemaSynthesisProcessor.getQueriesFromFile(String): new java.io.FileReader(File) At SchemaSynthesisProcessor.java:[line 211]
Null passed for non-null parameter of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:[line 80]
Null passed for non-null parameter of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:[line 81]
org.apache.phoenix.schematool.SchemaSynthesisProcessor.getQueriesFromFile(String) may fail to close stream At SchemaSynthesisProcessor.java:stream At SchemaSynthesisProcessor.java:[line 211]
Invocation of toString on Throwable.getStackTrace() in org.apache.phoenix.util.QueryUtil.getShowCreateStatementStmt(PhoenixConnection, String, TableName) At QueryUtil.java:in org.apache.phoenix.util.QueryUtil.getShowCreateStatementStmt(PhoenixConnection, String, TableName) At QueryUtil.java:[line 788]
org.apache.phoenix.util.QueryUtil.getShowCreateStatementStmt(PhoenixConnection, String, TableName) may fail to clean up java.sql.Statement on checked exception Obligation to clean up resource created at QueryUtil.java:to clean up java.sql.Statement on checked exception Obligation to clean up resource created at QueryUtil.java:[line 794] is not discharged
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1271
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile xml
unameLinux 4a5cb0890046 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 9b76bd5
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/3/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/3/artifact/yetus-general-check/output/diff-checkstyle-phoenix-tools.txt
spotbugshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/3/artifact/yetus-general-check/output/new-spotbugs-phoenix-core.html
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/3/artifact/yetus-general-check/output/patch-unit-phoenix-tools.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/3/testReport/
Max. process+thread count14392 (vs. ulimit of 30000)
modulesC: phoenix-core phoenix-tools U: .
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/3/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 32sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ master Compile Tests _
+0 🆗mvndep4m 54sMaven dependency ordering for branch
+1 💚mvninstall19m 4smaster passed
+0hbaserecompile32m 4sHBase recompiled.
+1 💚compile1m 44smaster passed
+1 💚checkstyle2m 4smaster passed
+1 💚javadoc1m 12smaster passed
+0 🆗spotbugs3m 23sphoenix-core in master has 964 extant spotbugs warnings.
+0 🆗spotbugs0m 47sphoenix-tools in master has 5 extant spotbugs warnings.
-0 ⚠️patch1m 3sUsed diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for patch
+1 💚mvninstall15m 10sthe patch passed
+0hbaserecompile21m 52sHBase recompiled.
+1 💚compile1m 41sthe patch passed
+1 💚javac1m 41sthe patch passed
-1 ❌checkstyle1m 49sphoenix-core: The patch generated 427 new + 2618 unchanged - 20 fixed = 3045 total (was 2638)
-1 ❌checkstyle0m 18sphoenix-tools: The patch generated 3 new + 57 unchanged - 364 fixed = 60 total (was 421)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 2sThe patch has no ill-formed XML file.
+1 💚javadoc1m 11sthe patch passed
-1 ❌spotbugs3m 32sphoenix-core generated 6 new + 964 unchanged - 0 fixed = 970 total (was 964)
+1 💚spotbugs0m 56sphoenix-tools generated 0 new + 3 unchanged - 2 fixed = 3 total (was 5)
_ Other Tests _
-1 ❌unit115m 14sphoenix-core in the patch failed.
-1 ❌unit3m 49sphoenix-tools in the patch failed.
+1 💚asflicense1m 20sThe patch does not generate ASF License warnings.
198m 27s
ReasonTests
FindBugsmodule:phoenix-core
Found reliance on default encoding in org.apache.phoenix.schematool.SchemaSynthesisProcessor.getQueriesFromFile(String):in org.apache.phoenix.schematool.SchemaSynthesisProcessor.getQueriesFromFile(String): new java.io.FileReader(File) At SchemaSynthesisProcessor.java:[line 211]
Null passed for non-null parameter of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:[line 80]
Null passed for non-null parameter of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:of new org.apache.phoenix.parse.SQLParser(String) in org.apache.phoenix.schematool.SchemaSynthesisProcessor.synthesize(String, String) Method invoked at SchemaSynthesisProcessor.java:[line 81]
org.apache.phoenix.schematool.SchemaSynthesisProcessor.getQueriesFromFile(String) may fail to close stream At SchemaSynthesisProcessor.java:stream At SchemaSynthesisProcessor.java:[line 211]
Invocation of toString on Throwable.getStackTrace() in org.apache.phoenix.util.QueryUtil.getShowCreateTableStmt(PhoenixConnection, String, TableName) At QueryUtil.java:in org.apache.phoenix.util.QueryUtil.getShowCreateTableStmt(PhoenixConnection, String, TableName) At QueryUtil.java:[line 788]
org.apache.phoenix.util.QueryUtil.getShowCreateTableStmt(PhoenixConnection, String, TableName) may fail to clean up java.sql.Statement on checked exception Obligation to clean up resource created at QueryUtil.java:to clean up java.sql.Statement on checked exception Obligation to clean up resource created at QueryUtil.java:[line 794] is not discharged
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/4/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1271
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile xml
unameLinux 85ac32b8f57d 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 9b76bd5
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/4/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/4/artifact/yetus-general-check/output/diff-checkstyle-phoenix-tools.txt
spotbugshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/4/artifact/yetus-general-check/output/new-spotbugs-phoenix-core.html
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/4/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/4/artifact/yetus-general-check/output/patch-unit-phoenix-tools.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/4/testReport/
Max. process+thread count10509 (vs. ulimit of 30000)
modulesC: phoenix-core phoenix-tools U: .
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1271/4/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@stotystoty left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 LGTM

@stoty

Copy link
Copy Markdown
Contributor

Don't forget to change the statement name in the ticket and commit message as well.

Change-Id: I2b8f693a94e1b9fee1e54ef09d2a28569de7a669
@richardantalrichardantal changed the title PHOENIX-6518 Implement SHOW CREATE STATEMENT SQL commandPHOENIX-6518 Implement SHOW CREATE TABLE SQL commandJul 29, 2021
@richardantal
richardantal merged commit d04b3d8 into apache:masterJul 29, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@richardantal@stoty@chrajeshbabu