Apache-Phoenix | 5.1 | HBase 2.2 | Build #118 ABORTED

2022-01-11 Thread Apache Jenkins Server

5.1 branch  HBase 2.2  build #118 status ABORTED
Build #118 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/118/


Apache-Phoenix | 5.1 | HBase 2.3 | Build #118 FAILURE

2022-01-11 Thread Apache Jenkins Server

5.1 branch  HBase 2.3  build #118 status FAILURE
Build #118 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/118/


Apache-Phoenix | 5.1 | HBase 2.1 | Build #118 SUCCESS

2022-01-11 Thread Apache Jenkins Server

5.1 branch  HBase 2.1  build #118 status SUCCESS
Build #118 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/118/


Apache-Phoenix | 5.1 | HBase 2.4 | Build #117 ABORTED

2022-01-11 Thread Apache Jenkins Server

5.1 branch  HBase 2.4  build #117 status ABORTED
Build #117 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/117/


Apache-Phoenix | 5.1 | HBase 2.2 | Build #117 ABORTED

2022-01-11 Thread Apache Jenkins Server

5.1 branch  HBase 2.2  build #117 status ABORTED
Build #117 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/117/


Apache-Phoenix | master | HBase 2.2 | Build #376 ABORTED

2022-01-11 Thread Apache Jenkins Server

master branch  HBase 2.2  build #376 status ABORTED
Build #376 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/376/


Apache-Phoenix | 4.16 | HBase 1.4 | Build #103 ABORTED

2022-01-11 Thread Apache Jenkins Server

4.16 branch  HBase 1.4  build #103 status ABORTED
Build #103 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/4.16/103/


Apache-Phoenix | master | HBase 2.2 | Build #375 SUCCESS

2022-01-11 Thread Apache Jenkins Server

master branch  HBase 2.2  build #375 status SUCCESS
Build #375 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/375/


Apache-Phoenix | master | HBase 2.1 | Build #376 FAILURE

2022-01-11 Thread Apache Jenkins Server

master branch  HBase 2.1  build #376 status FAILURE
Build #376 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/376/


Apache-Phoenix | 5.1 | HBase 2.1 | Build #117 SUCCESS

2022-01-11 Thread Apache Jenkins Server

5.1 branch  HBase 2.1  build #117 status SUCCESS
Build #117 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/117/


Apache-Phoenix | 5.1 | HBase 2.4 | Build #118 FAILURE

2022-01-11 Thread Apache Jenkins Server

5.1 branch  HBase 2.4  build #118 status FAILURE
Build #118 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/118/


Apache-Phoenix | master | HBase 2.3 | Build #376 FAILURE

2022-01-11 Thread Apache Jenkins Server

master branch  HBase 2.3  build #376 status FAILURE
Build #376 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/376/


Apache-Phoenix | 4.x | HBase 1.4 | Build #353 SUCCESS

2022-01-11 Thread Apache Jenkins Server

4.x branch  HBase 1.4  build #353 status SUCCESS
Build #353 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/4.x/353/


Apache-Phoenix | 4.x | HBase 1.6 | Build #353 FAILURE

2022-01-11 Thread Apache Jenkins Server

4.x branch  HBase 1.6  build #353 status FAILURE
Build #353 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/4.x/353/


Apache-Phoenix | 4.16 | HBase 1.3 | Build #103 FAILURE

2022-01-11 Thread Apache Jenkins Server

4.16 branch  HBase 1.3  build #103 status FAILURE
Build #103 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/4.16/103/


Apache-Phoenix | 4.16 | HBase 1.6 | Build #103 FAILURE

2022-01-11 Thread Apache Jenkins Server

4.16 branch  HBase 1.6  build #103 status FAILURE
Build #103 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/4.16/103/


Apache-Phoenix | master | HBase 2.1 | Build #375 SUCCESS

2022-01-11 Thread Apache Jenkins Server

master branch  HBase 2.1  build #375 status SUCCESS
Build #375 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/375/


Apache-Phoenix | master | HBase 2.4 | Build #375 SUCCESS

2022-01-11 Thread Apache Jenkins Server

master branch  HBase 2.4  build #375 status SUCCESS
Build #375 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/375/


Apache-Phoenix | master | HBase 2.3 | Build #375 SUCCESS

2022-01-11 Thread Apache Jenkins Server

master branch  HBase 2.3  build #375 status SUCCESS
Build #375 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/375/


Apache-Phoenix | master | HBase 2.4 | Build #376 SUCCESS

2022-01-11 Thread Apache Jenkins Server

master branch  HBase 2.4  build #376 status SUCCESS
Build #376 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/376/


Apache-Phoenix | 5.1 | HBase 2.3 | Build #117 FAILURE

2022-01-11 Thread Apache Jenkins Server

5.1 branch  HBase 2.3  build #117 status FAILURE
Build #117 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/117/


[phoenix] branch 5.1 updated: PHOENIX-6579 ACL check doesn't honor the namespace mapping for mapped views.

2022-01-11 Thread ssa
This is an automated email from the ASF dual-hosted git repository.

ssa pushed a commit to branch 5.1
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/5.1 by this push:
 new 78e9060  PHOENIX-6579 ACL check doesn't honor the namespace mapping 
for mapped views.
78e9060 is described below

commit 78e9060186d3db3b71436a181f59f378c7b9302f
Author: Sergey Soldatov 
AuthorDate: Fri Oct 29 20:29:56 2021 +0300

PHOENIX-6579 ACL check doesn't honor the namespace mapping for mapped views.
---
 .../apache/phoenix/end2end/BasePermissionsIT.java  |  6 +--
 .../phoenix/end2end/PermissionNSEnabledIT.java | 45 ++
 .../phoenix/coprocessor/MetaDataEndpointImpl.java  |  4 +-
 .../coprocessor/PhoenixAccessController.java   | 27 +++--
 4 files changed, 66 insertions(+), 16 deletions(-)

diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java
index fe966dd..77ae600 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java
@@ -99,7 +99,7 @@ public abstract class BasePermissionsIT extends BaseTest {
 
 private static final String SUPER_USER = System.getProperty("user.name");
 
-private static HBaseTestingUtility testUtil;
+static HBaseTestingUtility testUtil;
 private static final Set PHOENIX_SYSTEM_TABLES =
 new HashSet<>(Arrays.asList("SYSTEM.CATALOG", "SYSTEM.SEQUENCE", 
"SYSTEM.STATS",
 "SYSTEM.FUNCTION", "SYSTEM.MUTEX", "SYSTEM.CHILD_LINK"));
@@ -365,7 +365,7 @@ public abstract class BasePermissionsIT extends BaseTest {
 // UG Object
 // 1. Instance of String --> represents GROUP name
 // 2. Instance of User --> represents HBase user
-private AccessTestAction grantPermissions(final String actions, final 
Object ug,
+AccessTestAction grantPermissions(final String actions, final Object ug,
   final String tableOrSchemaList, final 
boolean isSchema) throws SQLException {
 return grantPermissions(actions, ug, 
Collections.singleton(tableOrSchemaList), isSchema);
 }
@@ -958,7 +958,7 @@ public abstract class BasePermissionsIT extends BaseTest {
 }
 }
 
-private String surroundWithDoubleQuotes(String input) {
+String surroundWithDoubleQuotes(String input) {
 return "\"" + input + "\"";
 }
 
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PermissionNSEnabledIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PermissionNSEnabledIT.java
index 7a2a995..292654f 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PermissionNSEnabledIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PermissionNSEnabledIT.java
@@ -18,8 +18,14 @@
 package org.apache.phoenix.end2end;
 
 import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder;
+import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
 import org.apache.hadoop.hbase.security.AccessDeniedException;
 import org.apache.hadoop.hbase.security.access.Permission;
+import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.util.SchemaUtil;
 import org.junit.BeforeClass;
@@ -29,11 +35,13 @@ import org.junit.experimental.categories.Category;
 import java.security.PrivilegedExceptionAction;
 import java.sql.Connection;
 import java.sql.SQLException;
+import java.sql.Statement;
 import java.util.Collections;
 
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_TABLE;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CHILD_LINK_TABLE;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_SCHEMA_NAME;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -48,6 +56,43 @@ public class PermissionNSEnabledIT extends BasePermissionsIT 
{
 public static synchronized void doSetup() throws Exception {
 BasePermissionsIT.initCluster(true);
 }
+private AccessTestAction createMappedView(final String schemaName, final 
String tableName) throws SQLException {
+return new AccessTestAction() {
+@Override
+public Object run() throws Exception {
+try (Connection conn = getConnection(); Statement stmt = 
conn.createStatement();) {
+String viewStmtSQL = "CREATE VIEW \"" + schemaName + 
"\".\"" + tableName + "\" ( PK varchar primary key)";
+assertFalse(stmt.execute(viewS

[phoenix] branch 4.16 updated: PHOENIX-6596 Schema extraction double quotes expressions, resulting in un-executabe create statements

2022-01-11 Thread richardantal
This is an automated email from the ASF dual-hosted git repository.

richardantal pushed a commit to branch 4.16
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.16 by this push:
 new ecc8862  PHOENIX-6596 Schema extraction double quotes expressions, 
resulting in un-executabe create statements
ecc8862 is described below

commit ecc8862fb70ae7d1fc84b6aa51d2a2022a82a62f
Author: Richard Antal 
AuthorDate: Thu Dec 9 14:00:08 2021 +0100

PHOENIX-6596 Schema extraction double quotes expressions, resulting in 
un-executabe create statements

Co-authored-by: Istvan Toth 
---
 .../schema/tool/SchemaToolExtractionIT.java| 63 --
 .../schema/tool/SchemaExtractionProcessor.java | 28 --
 .../org/apache/phoenix/schema/tool/SchemaTool.java |  1 -
 .../java/org/apache/phoenix/util/SchemaUtil.java   | 23 
 4 files changed, 106 insertions(+), 9 deletions(-)

diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
index 6ba411c..0a733ae 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
@@ -93,13 +93,18 @@ public class SchemaToolExtractionIT extends 
ParallelStatsEnabledIT {
 String indexName = generateUniqueName();
 String indexName1 = generateUniqueName();
 String indexName2 = generateUniqueName();
+String indexName3 = generateUniqueName();
 String properties = "TTL=2592000,IMMUTABLE_ROWS=true,DISABLE_WAL=true";
 String pTableFullName = SchemaUtil.getQualifiedTableName(schemaName, 
tableName);
-String createTableStatement = "CREATE TABLE "+pTableFullName + "(k 
VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR, v2 VARCHAR)"
+String createTableStatement = "CREATE TABLE "+pTableFullName + "(k 
VARCHAR NOT NULL PRIMARY KEY, \"v1\" VARCHAR, v2 VARCHAR)"
 + properties;
-String createIndexStatement = "CREATE INDEX "+indexName + " ON 
"+pTableFullName+"(v1 DESC) INCLUDE (v2)";
-String createIndexStatement1 = "CREATE INDEX "+indexName1 + " ON 
"+pTableFullName+"(v2 DESC) INCLUDE (v1)";
+//FIXME never verified
+String createIndexStatement = "CREATE INDEX "+indexName + " ON 
"+pTableFullName+"(\"v1\" DESC) INCLUDE (v2)";
+//FIXME never verified
+String createIndexStatement1 = "CREATE INDEX "+indexName1 + " ON 
"+pTableFullName+"(v2 DESC) INCLUDE (\"v1\")";
 String createIndexStatement2 = "CREATE INDEX "+indexName2 + " ON 
"+pTableFullName+"(k)";
+String createIndexStatement3 ="CREATE INDEX " + indexName3 + " ON " + 
pTableFullName +
+"('QUOTED' || \"v1\" || V2 DESC, \"v1\" DESC, K) INCLUDE (V2)";
 List queries = new ArrayList(){};
 queries.add(createTableStatement);
 queries.add(createIndexStatement);
@@ -108,6 +113,12 @@ public class SchemaToolExtractionIT extends 
ParallelStatsEnabledIT {
 
 String result = runSchemaExtractionTool(schemaName, indexName2, null, 
queries);
 Assert.assertEquals(createIndexStatement2.toUpperCase(), 
result.toUpperCase());
+
+List queries3 = new ArrayList(){};
+queries3.add(createIndexStatement3);
+
+String result3 = runSchemaExtractionTool(schemaName, indexName3, null, 
queries3);
+Assert.assertEquals(createIndexStatement3, result3);
 }
 
 @Test
@@ -144,17 +155,45 @@ public class SchemaToolExtractionIT extends 
ParallelStatsEnabledIT {
 String tableName = generateUniqueName();
 String schemaName = generateUniqueName();
 String indexName = generateUniqueName();
+String indexName2 = generateUniqueName();
 String properties = "TTL=2592000,IMMUTABLE_ROWS=true,DISABLE_WAL=true";
 String pTableFullName = SchemaUtil.getQualifiedTableName(schemaName, 
tableName);
 String createTableStatement = "CREATE TABLE "+pTableFullName + "(k 
VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR, v2 VARCHAR)"
 + properties;
 String createIndexStatement = "CREATE LOCAL INDEX "+indexName + " ON 
"+pTableFullName+"(v1 DESC, k) INCLUDE (v2)";
+String createIndexStatement2 = "CREATE LOCAL INDEX "+indexName2 + " ON 
"+pTableFullName+"( LPAD(v1,10) DESC, k) INCLUDE (v2)";
+
 List queries = new ArrayList(){};
 queries.add(createTableStatement);
 queries.add(createIndexStatement);
 
 String result = runSchemaExtractionTool(schemaName, indexName, null, 
queries);
 Assert.assertEquals(createIndexStatement.toUpperCase(), 
result.toUpperCase());
+
+List queries2 = new ArrayList(){};
+queries2.add(createIndexStatement2);
+
+String result2 = runSchemaExtractionTool(schemaName, index

[phoenix] branch 4.x updated: PHOENIX-6596 Schema extraction double quotes expressions, resulting in un-executabe create statements

2022-01-11 Thread richardantal
This is an automated email from the ASF dual-hosted git repository.

richardantal pushed a commit to branch 4.x
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x by this push:
 new 0f5fac9  PHOENIX-6596 Schema extraction double quotes expressions, 
resulting in un-executabe create statements
0f5fac9 is described below

commit 0f5fac99a981a781e0dd517e7aaeb15abaaa9012
Author: Richard Antal 
AuthorDate: Thu Dec 9 14:00:08 2021 +0100

PHOENIX-6596 Schema extraction double quotes expressions, resulting in 
un-executabe create statements

Co-authored-by: Istvan Toth 
---
 .../schema/tool/SchemaToolExtractionIT.java| 63 --
 .../schema/tool/SchemaExtractionProcessor.java | 28 --
 .../org/apache/phoenix/schema/tool/SchemaTool.java |  1 -
 .../java/org/apache/phoenix/util/SchemaUtil.java   | 23 
 4 files changed, 106 insertions(+), 9 deletions(-)

diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
index 6ba411c..0a733ae 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
@@ -93,13 +93,18 @@ public class SchemaToolExtractionIT extends 
ParallelStatsEnabledIT {
 String indexName = generateUniqueName();
 String indexName1 = generateUniqueName();
 String indexName2 = generateUniqueName();
+String indexName3 = generateUniqueName();
 String properties = "TTL=2592000,IMMUTABLE_ROWS=true,DISABLE_WAL=true";
 String pTableFullName = SchemaUtil.getQualifiedTableName(schemaName, 
tableName);
-String createTableStatement = "CREATE TABLE "+pTableFullName + "(k 
VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR, v2 VARCHAR)"
+String createTableStatement = "CREATE TABLE "+pTableFullName + "(k 
VARCHAR NOT NULL PRIMARY KEY, \"v1\" VARCHAR, v2 VARCHAR)"
 + properties;
-String createIndexStatement = "CREATE INDEX "+indexName + " ON 
"+pTableFullName+"(v1 DESC) INCLUDE (v2)";
-String createIndexStatement1 = "CREATE INDEX "+indexName1 + " ON 
"+pTableFullName+"(v2 DESC) INCLUDE (v1)";
+//FIXME never verified
+String createIndexStatement = "CREATE INDEX "+indexName + " ON 
"+pTableFullName+"(\"v1\" DESC) INCLUDE (v2)";
+//FIXME never verified
+String createIndexStatement1 = "CREATE INDEX "+indexName1 + " ON 
"+pTableFullName+"(v2 DESC) INCLUDE (\"v1\")";
 String createIndexStatement2 = "CREATE INDEX "+indexName2 + " ON 
"+pTableFullName+"(k)";
+String createIndexStatement3 ="CREATE INDEX " + indexName3 + " ON " + 
pTableFullName +
+"('QUOTED' || \"v1\" || V2 DESC, \"v1\" DESC, K) INCLUDE (V2)";
 List queries = new ArrayList(){};
 queries.add(createTableStatement);
 queries.add(createIndexStatement);
@@ -108,6 +113,12 @@ public class SchemaToolExtractionIT extends 
ParallelStatsEnabledIT {
 
 String result = runSchemaExtractionTool(schemaName, indexName2, null, 
queries);
 Assert.assertEquals(createIndexStatement2.toUpperCase(), 
result.toUpperCase());
+
+List queries3 = new ArrayList(){};
+queries3.add(createIndexStatement3);
+
+String result3 = runSchemaExtractionTool(schemaName, indexName3, null, 
queries3);
+Assert.assertEquals(createIndexStatement3, result3);
 }
 
 @Test
@@ -144,17 +155,45 @@ public class SchemaToolExtractionIT extends 
ParallelStatsEnabledIT {
 String tableName = generateUniqueName();
 String schemaName = generateUniqueName();
 String indexName = generateUniqueName();
+String indexName2 = generateUniqueName();
 String properties = "TTL=2592000,IMMUTABLE_ROWS=true,DISABLE_WAL=true";
 String pTableFullName = SchemaUtil.getQualifiedTableName(schemaName, 
tableName);
 String createTableStatement = "CREATE TABLE "+pTableFullName + "(k 
VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR, v2 VARCHAR)"
 + properties;
 String createIndexStatement = "CREATE LOCAL INDEX "+indexName + " ON 
"+pTableFullName+"(v1 DESC, k) INCLUDE (v2)";
+String createIndexStatement2 = "CREATE LOCAL INDEX "+indexName2 + " ON 
"+pTableFullName+"( LPAD(v1,10) DESC, k) INCLUDE (v2)";
+
 List queries = new ArrayList(){};
 queries.add(createTableStatement);
 queries.add(createIndexStatement);
 
 String result = runSchemaExtractionTool(schemaName, indexName, null, 
queries);
 Assert.assertEquals(createIndexStatement.toUpperCase(), 
result.toUpperCase());
+
+List queries2 = new ArrayList(){};
+queries2.add(createIndexStatement2);
+
+String result2 = runSchemaExtractionTool(schemaName, indexNa

[phoenix] branch 5.1 updated: PHOENIX-6596 Schema extraction double quotes expressions, resulting in un-executabe create statements

2022-01-11 Thread richardantal
This is an automated email from the ASF dual-hosted git repository.

richardantal pushed a commit to branch 5.1
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/5.1 by this push:
 new 811b70d  PHOENIX-6596 Schema extraction double quotes expressions, 
resulting in un-executabe create statements
811b70d is described below

commit 811b70d9655ec458fa39a5309b69a827d001c665
Author: Richard Antal 
AuthorDate: Thu Dec 9 14:00:08 2021 +0100

PHOENIX-6596 Schema extraction double quotes expressions, resulting in 
un-executabe create statements

Co-authored-by: Istvan Toth 
---
 .../schema/tool/SchemaToolExtractionIT.java| 63 --
 .../schema/tool/SchemaExtractionProcessor.java | 28 --
 .../org/apache/phoenix/schema/tool/SchemaTool.java |  1 -
 .../java/org/apache/phoenix/util/SchemaUtil.java   | 23 
 4 files changed, 106 insertions(+), 9 deletions(-)

diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
index 6ba411c..0a733ae 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
@@ -93,13 +93,18 @@ public class SchemaToolExtractionIT extends 
ParallelStatsEnabledIT {
 String indexName = generateUniqueName();
 String indexName1 = generateUniqueName();
 String indexName2 = generateUniqueName();
+String indexName3 = generateUniqueName();
 String properties = "TTL=2592000,IMMUTABLE_ROWS=true,DISABLE_WAL=true";
 String pTableFullName = SchemaUtil.getQualifiedTableName(schemaName, 
tableName);
-String createTableStatement = "CREATE TABLE "+pTableFullName + "(k 
VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR, v2 VARCHAR)"
+String createTableStatement = "CREATE TABLE "+pTableFullName + "(k 
VARCHAR NOT NULL PRIMARY KEY, \"v1\" VARCHAR, v2 VARCHAR)"
 + properties;
-String createIndexStatement = "CREATE INDEX "+indexName + " ON 
"+pTableFullName+"(v1 DESC) INCLUDE (v2)";
-String createIndexStatement1 = "CREATE INDEX "+indexName1 + " ON 
"+pTableFullName+"(v2 DESC) INCLUDE (v1)";
+//FIXME never verified
+String createIndexStatement = "CREATE INDEX "+indexName + " ON 
"+pTableFullName+"(\"v1\" DESC) INCLUDE (v2)";
+//FIXME never verified
+String createIndexStatement1 = "CREATE INDEX "+indexName1 + " ON 
"+pTableFullName+"(v2 DESC) INCLUDE (\"v1\")";
 String createIndexStatement2 = "CREATE INDEX "+indexName2 + " ON 
"+pTableFullName+"(k)";
+String createIndexStatement3 ="CREATE INDEX " + indexName3 + " ON " + 
pTableFullName +
+"('QUOTED' || \"v1\" || V2 DESC, \"v1\" DESC, K) INCLUDE (V2)";
 List queries = new ArrayList(){};
 queries.add(createTableStatement);
 queries.add(createIndexStatement);
@@ -108,6 +113,12 @@ public class SchemaToolExtractionIT extends 
ParallelStatsEnabledIT {
 
 String result = runSchemaExtractionTool(schemaName, indexName2, null, 
queries);
 Assert.assertEquals(createIndexStatement2.toUpperCase(), 
result.toUpperCase());
+
+List queries3 = new ArrayList(){};
+queries3.add(createIndexStatement3);
+
+String result3 = runSchemaExtractionTool(schemaName, indexName3, null, 
queries3);
+Assert.assertEquals(createIndexStatement3, result3);
 }
 
 @Test
@@ -144,17 +155,45 @@ public class SchemaToolExtractionIT extends 
ParallelStatsEnabledIT {
 String tableName = generateUniqueName();
 String schemaName = generateUniqueName();
 String indexName = generateUniqueName();
+String indexName2 = generateUniqueName();
 String properties = "TTL=2592000,IMMUTABLE_ROWS=true,DISABLE_WAL=true";
 String pTableFullName = SchemaUtil.getQualifiedTableName(schemaName, 
tableName);
 String createTableStatement = "CREATE TABLE "+pTableFullName + "(k 
VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR, v2 VARCHAR)"
 + properties;
 String createIndexStatement = "CREATE LOCAL INDEX "+indexName + " ON 
"+pTableFullName+"(v1 DESC, k) INCLUDE (v2)";
+String createIndexStatement2 = "CREATE LOCAL INDEX "+indexName2 + " ON 
"+pTableFullName+"( LPAD(v1,10) DESC, k) INCLUDE (v2)";
+
 List queries = new ArrayList(){};
 queries.add(createTableStatement);
 queries.add(createIndexStatement);
 
 String result = runSchemaExtractionTool(schemaName, indexName, null, 
queries);
 Assert.assertEquals(createIndexStatement.toUpperCase(), 
result.toUpperCase());
+
+List queries2 = new ArrayList(){};
+queries2.add(createIndexStatement2);
+
+String result2 = runSchemaExtractionTool(schemaName, indexNa

[phoenix] branch master updated: PHOENIX-6596 Schema extraction double quotes expressions, resulting in un-executabe create statements

2022-01-11 Thread richardantal
This is an automated email from the ASF dual-hosted git repository.

richardantal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/master by this push:
 new faa5da8  PHOENIX-6596 Schema extraction double quotes expressions, 
resulting in un-executabe create statements
faa5da8 is described below

commit faa5da80a663fa916a4906142eb0eaf68da0cc53
Author: Richard Antal 
AuthorDate: Thu Dec 9 14:00:08 2021 +0100

PHOENIX-6596 Schema extraction double quotes expressions, resulting in 
un-executabe create statements

Co-authored-by: Istvan Toth 
---
 .../schema/tool/SchemaToolExtractionIT.java| 63 --
 .../schema/tool/SchemaExtractionProcessor.java | 28 --
 .../org/apache/phoenix/schema/tool/SchemaTool.java |  1 -
 .../java/org/apache/phoenix/util/SchemaUtil.java   | 23 
 4 files changed, 106 insertions(+), 9 deletions(-)

diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
index 6ba411c..0a733ae 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java
@@ -93,13 +93,18 @@ public class SchemaToolExtractionIT extends 
ParallelStatsEnabledIT {
 String indexName = generateUniqueName();
 String indexName1 = generateUniqueName();
 String indexName2 = generateUniqueName();
+String indexName3 = generateUniqueName();
 String properties = "TTL=2592000,IMMUTABLE_ROWS=true,DISABLE_WAL=true";
 String pTableFullName = SchemaUtil.getQualifiedTableName(schemaName, 
tableName);
-String createTableStatement = "CREATE TABLE "+pTableFullName + "(k 
VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR, v2 VARCHAR)"
+String createTableStatement = "CREATE TABLE "+pTableFullName + "(k 
VARCHAR NOT NULL PRIMARY KEY, \"v1\" VARCHAR, v2 VARCHAR)"
 + properties;
-String createIndexStatement = "CREATE INDEX "+indexName + " ON 
"+pTableFullName+"(v1 DESC) INCLUDE (v2)";
-String createIndexStatement1 = "CREATE INDEX "+indexName1 + " ON 
"+pTableFullName+"(v2 DESC) INCLUDE (v1)";
+//FIXME never verified
+String createIndexStatement = "CREATE INDEX "+indexName + " ON 
"+pTableFullName+"(\"v1\" DESC) INCLUDE (v2)";
+//FIXME never verified
+String createIndexStatement1 = "CREATE INDEX "+indexName1 + " ON 
"+pTableFullName+"(v2 DESC) INCLUDE (\"v1\")";
 String createIndexStatement2 = "CREATE INDEX "+indexName2 + " ON 
"+pTableFullName+"(k)";
+String createIndexStatement3 ="CREATE INDEX " + indexName3 + " ON " + 
pTableFullName +
+"('QUOTED' || \"v1\" || V2 DESC, \"v1\" DESC, K) INCLUDE (V2)";
 List queries = new ArrayList(){};
 queries.add(createTableStatement);
 queries.add(createIndexStatement);
@@ -108,6 +113,12 @@ public class SchemaToolExtractionIT extends 
ParallelStatsEnabledIT {
 
 String result = runSchemaExtractionTool(schemaName, indexName2, null, 
queries);
 Assert.assertEquals(createIndexStatement2.toUpperCase(), 
result.toUpperCase());
+
+List queries3 = new ArrayList(){};
+queries3.add(createIndexStatement3);
+
+String result3 = runSchemaExtractionTool(schemaName, indexName3, null, 
queries3);
+Assert.assertEquals(createIndexStatement3, result3);
 }
 
 @Test
@@ -144,17 +155,45 @@ public class SchemaToolExtractionIT extends 
ParallelStatsEnabledIT {
 String tableName = generateUniqueName();
 String schemaName = generateUniqueName();
 String indexName = generateUniqueName();
+String indexName2 = generateUniqueName();
 String properties = "TTL=2592000,IMMUTABLE_ROWS=true,DISABLE_WAL=true";
 String pTableFullName = SchemaUtil.getQualifiedTableName(schemaName, 
tableName);
 String createTableStatement = "CREATE TABLE "+pTableFullName + "(k 
VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR, v2 VARCHAR)"
 + properties;
 String createIndexStatement = "CREATE LOCAL INDEX "+indexName + " ON 
"+pTableFullName+"(v1 DESC, k) INCLUDE (v2)";
+String createIndexStatement2 = "CREATE LOCAL INDEX "+indexName2 + " ON 
"+pTableFullName+"( LPAD(v1,10) DESC, k) INCLUDE (v2)";
+
 List queries = new ArrayList(){};
 queries.add(createTableStatement);
 queries.add(createIndexStatement);
 
 String result = runSchemaExtractionTool(schemaName, indexName, null, 
queries);
 Assert.assertEquals(createIndexStatement.toUpperCase(), 
result.toUpperCase());
+
+List queries2 = new ArrayList(){};
+queries2.add(createIndexStatement2);
+
+String result2 = runSchemaExtractionTool(schemaName, i

[phoenix] branch 5.1 updated: PHOENIX-5865 Column that has default value can not be correctly indexed

2022-01-11 Thread richardantal
This is an automated email from the ASF dual-hosted git repository.

richardantal pushed a commit to branch 5.1
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/5.1 by this push:
 new c9d663c  PHOENIX-5865 Column that has default value can not be 
correctly indexed
c9d663c is described below

commit c9d663ccf155a9add374b6a4f16cf1685c0fb9a9
Author: Richard Antal 
AuthorDate: Wed Dec 1 12:28:11 2021 +0100

PHOENIX-5865 Column that has default value can not be correctly indexed
---
 .../phoenix/end2end/IndexWithDefaultValueIT.java   | 280 +
 .../expression/KeyValueColumnExpression.java   |   9 +
 .../expression/SingleCellColumnExpression.java |  24 +-
 .../function/DefaultValueExpression.java   |  12 +-
 .../phoenix/hbase/index/AbstractValueGetter.java   |   4 +-
 .../org/apache/phoenix/schema/MetaDataClient.java  |  33 ++-
 .../phoenix/schema/tuple/ValueGetterTuple.java |  29 ++-
 7 files changed, 362 insertions(+), 29 deletions(-)

diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexWithDefaultValueIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexWithDefaultValueIT.java
new file mode 100644
index 000..a93f4ab
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexWithDefaultValueIT.java
@@ -0,0 +1,280 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+
+import org.junit.Test;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.util.Properties;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertEquals;
+
+
+public class IndexWithDefaultValueIT extends ParallelStatsDisabledIT {
+
+@Test
+public void testQueryTableWithIndex() throws Exception {
+String tableName = generateUniqueName();
+String indexName = generateUniqueName();
+
+Properties props = new Properties();
+String schema = generateUniqueName();
+Connection conn = DriverManager.getConnection(getUrl(), props);
+
+conn.setSchema(schema);
+conn.createStatement().execute("\n" +
+"create table " + tableName + "(\n" +
+"pk VARCHAR,\n" +
+"b VARCHAR,\n" +
+"c VARCHAR default '0',\n" +
+"CONSTRAINT my_pk PRIMARY KEY (pk)\n" +
+")");
+
+conn.commit();
+
+conn.createStatement().execute("upsert into " + tableName + " 
values('1','1','1')");
+conn.commit();
+
+conn.createStatement().execute("CREATE INDEX " + indexName + " ON " + 
tableName + "(pk, b, c)");
+conn.commit();
+
+
+final PreparedStatement select = conn.prepareStatement(
+"select * from " + tableName);
+
+ResultSet rs = select.executeQuery();
+
+assertTrue(rs.next());
+assertEquals("1", rs.getString(3));
+assertFalse(rs.next());
+rs.close();
+conn.close();
+}
+
+
+
+@Test
+public void testQueryTableWithIndexBigintDefault() throws Exception {
+String tableName = generateUniqueName();
+String indexName = generateUniqueName();
+
+Properties props = new Properties();
+String schema = generateUniqueName();
+Connection conn = DriverManager.getConnection(getUrl(), props);
+
+
+conn.setSchema(schema);
+conn.createStatement().execute("\n" +
+"create table " + tableName + "(\n" +
+"id CHAR(32) NOT NULL,\n" +
+"no CHAR(32) default 'AB'," +
+"total BIGINT default 0,\n" +
+"score INTEGER default 0," +
+"CONSTRAINT my_pk PRIMARY KEY (id)\n" +
+")");
+
+conn.commit();
+
+conn.createStatement().execute("upsert into " + tableName + "(id, no, 
total, score) values ('','1112', 1113, 1114)");
+conn.createStatement().execute("upsert into " + tableName + "(id, 
total) values ('1121', 1123)");
+conn.commit();
+
+ 

[phoenix] branch master updated (7997503 -> 3749cfc)

2022-01-11 Thread richardantal
This is an automated email from the ASF dual-hosted git repository.

richardantal pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git.


from 7997503  PHOENIX-6620 TransformTool to fix unverified rows and do 
validation
 add 3749cfc  PHOENIX-5865 Column that has default value can not be 
correctly indexed

No new revisions were added by this update.

Summary of changes:
 .../phoenix/end2end/IndexWithDefaultValueIT.java   | 280 +
 .../expression/KeyValueColumnExpression.java   |   9 +
 .../expression/SingleCellColumnExpression.java |  24 +-
 .../function/DefaultValueExpression.java   |  12 +-
 .../phoenix/hbase/index/AbstractValueGetter.java   |   4 +-
 .../org/apache/phoenix/schema/MetaDataClient.java  |  33 ++-
 .../phoenix/schema/tuple/ValueGetterTuple.java |  29 ++-
 7 files changed, 362 insertions(+), 29 deletions(-)
 create mode 100644 
phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexWithDefaultValueIT.java


Apache-Phoenix | master | HBase 2.1 | Build #374 SUCCESS

2022-01-11 Thread Apache Jenkins Server

master branch  HBase 2.1  build #374 status SUCCESS
Build #374 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/374/


Apache-Phoenix | 4.x | HBase 1.4 | Build #352 SUCCESS

2022-01-11 Thread Apache Jenkins Server

4.x branch  HBase 1.4  build #352 status SUCCESS
Build #352 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/4.x/352/


Apache-Phoenix | master | HBase 2.2 | Build #374 SUCCESS

2022-01-11 Thread Apache Jenkins Server

master branch  HBase 2.2  build #374 status SUCCESS
Build #374 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/374/


Apache-Phoenix | master | HBase 2.4 | Build #374 SUCCESS

2022-01-11 Thread Apache Jenkins Server

master branch  HBase 2.4  build #374 status SUCCESS
Build #374 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/374/


Apache-Phoenix | master | HBase 2.3 | Build #374 SUCCESS

2022-01-11 Thread Apache Jenkins Server

master branch  HBase 2.3  build #374 status SUCCESS
Build #374 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/374/