[jira] [Created] (PHOENIX-5936) sqlAlchemy get_columns KeyError: None

2020-06-04 Thread Istvan Toth (Jira)
Istvan Toth created PHOENIX-5936:


 Summary: sqlAlchemy get_columns KeyError: None
 Key: PHOENIX-5936
 URL: https://issues.apache.org/jira/browse/PHOENIX-5936
 Project: Phoenix
  Issue Type: Bug
  Components: queryserver
Affects Versions: queryserver-1.0.0
Reporter: Romain Rigaux
Assignee: Istvan Toth


calling  inspector.get_columns() on a table with constraints will result in the 
following error:
Traceback (most recent call last):
  File 
"/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
 line 101, in decoratorreturn func(*args, **kwargs)
  File 
"/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
 line 362, in autocomplete
columns = assist.get_columns(database, table)
  File 
"/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
 line 453, in get_columnsreturn self.db.get_columns(table, database)
  File 
"/home/romain/projects/hue/build/env/lib/python3.8/site-packages/sqlalchemy/engine/reflection.py",
 line 372, in get_columns
col_defs = self.dialect.get_columns(
  File 
"/home/romain/projects/hue/build/env/lib/python3.8/site-packages/phoenixdb/sqlalchemy_phoenix.py",
 line 163, in get_columns
col_type = COLUMN_DATA_TYPE[row[1]]
KeyError: None



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (PHOENIX-5936) sqlAlchemy get_columns KeyError: None

2020-06-04 Thread Istvan Toth (Jira)


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

Istvan Toth updated PHOENIX-5936:
-
Description: 
calling  inspector.get_columns() on a table with constraints will result in the 
following error:
{noformat}
Traceback (most recent call last):
 File 
"/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
 line 101, in decorator return func(*args, **kwargs)
 File 
"/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
 line 362, in autocomplete
 columns = assist.get_columns(database, table)
 File 
"/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
 line 453, in get_columns return self.db.get_columns(table, database)
 File 
"/home/romain/projects/hue/build/env/lib/python3.8/site-packages/sqlalchemy/engine/reflection.py",
 line 372, in get_columns
 col_defs = self.dialect.get_columns(
 File 
"/home/romain/projects/hue/build/env/lib/python3.8/site-packages/phoenixdb/sqlalchemy_phoenix.py",
 line 163, in get_columns
 col_type = COLUMN_DATA_TYPE[row[1]]
 KeyError: None{noformat}

  was:
calling  inspector.get_columns() on a table with constraints will result in the 
following error:
Traceback (most recent call last):
  File 
"/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
 line 101, in decoratorreturn func(*args, **kwargs)
  File 
"/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
 line 362, in autocomplete
columns = assist.get_columns(database, table)
  File 
"/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
 line 453, in get_columnsreturn self.db.get_columns(table, database)
  File 
"/home/romain/projects/hue/build/env/lib/python3.8/site-packages/sqlalchemy/engine/reflection.py",
 line 372, in get_columns
col_defs = self.dialect.get_columns(
  File 
"/home/romain/projects/hue/build/env/lib/python3.8/site-packages/phoenixdb/sqlalchemy_phoenix.py",
 line 163, in get_columns
col_type = COLUMN_DATA_TYPE[row[1]]
KeyError: None


> sqlAlchemy get_columns KeyError: None
> -
>
> Key: PHOENIX-5936
> URL: https://issues.apache.org/jira/browse/PHOENIX-5936
> Project: Phoenix
>  Issue Type: Bug
>  Components: queryserver
>Affects Versions: queryserver-1.0.0
>Reporter: Romain Rigaux
>Assignee: Istvan Toth
>Priority: Major
>
> calling  inspector.get_columns() on a table with constraints will result in 
> the following error:
> {noformat}
> Traceback (most recent call last):
>  File 
> "/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
>  line 101, in decorator return func(*args, **kwargs)
>  File 
> "/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
>  line 362, in autocomplete
>  columns = assist.get_columns(database, table)
>  File 
> "/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
>  line 453, in get_columns return self.db.get_columns(table, database)
>  File 
> "/home/romain/projects/hue/build/env/lib/python3.8/site-packages/sqlalchemy/engine/reflection.py",
>  line 372, in get_columns
>  col_defs = self.dialect.get_columns(
>  File 
> "/home/romain/projects/hue/build/env/lib/python3.8/site-packages/phoenixdb/sqlalchemy_phoenix.py",
>  line 163, in get_columns
>  col_type = COLUMN_DATA_TYPE[row[1]]
>  KeyError: None{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (PHOENIX-5937) Order by on nullable column sometimes filters rows

2020-06-04 Thread Istvan Toth (Jira)
Istvan Toth created PHOENIX-5937:


 Summary: Order by on nullable column sometimes filters rows
 Key: PHOENIX-5937
 URL: https://issues.apache.org/jira/browse/PHOENIX-5937
 Project: Phoenix
  Issue Type: Bug
  Components: core
Affects Versions: master, 4.x
Reporter: Istvan Toth


When selecting using order by on a nullable column, the rows where the order 
column is null are sometimes not returned.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (PHOENIX-5764) Update website to reflect the new 4.x branch

2020-06-04 Thread Richard Antal (Jira)


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

Richard Antal reassigned PHOENIX-5764:
--

Assignee: Richard Antal  (was: Istvan Toth)

> Update website to reflect the new 4.x branch
> 
>
> Key: PHOENIX-5764
> URL: https://issues.apache.org/jira/browse/PHOENIX-5764
> Project: Phoenix
>  Issue Type: Task
>Reporter: Istvan Toth
>Assignee: Richard Antal
>Priority: Major
> Attachments: PHOENIX-5764.docs.v1.patch
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (PHOENIX-5764) Update website to reflect the new 4.x branch

2020-06-04 Thread Richard Antal (Jira)


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

Richard Antal updated PHOENIX-5764:
---
Attachment: PHOENIX-5764.docs.v1.patch

> Update website to reflect the new 4.x branch
> 
>
> Key: PHOENIX-5764
> URL: https://issues.apache.org/jira/browse/PHOENIX-5764
> Project: Phoenix
>  Issue Type: Task
>Reporter: Istvan Toth
>Assignee: Istvan Toth
>Priority: Major
> Attachments: PHOENIX-5764.docs.v1.patch
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (PHOENIX-5936) sqlAlchemy get_columns KeyError: None

2020-06-04 Thread Istvan Toth (Jira)


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

Istvan Toth resolved PHOENIX-5936.
--
Fix Version/s: queryserver-1.0.0
   Resolution: Fixed

> sqlAlchemy get_columns KeyError: None
> -
>
> Key: PHOENIX-5936
> URL: https://issues.apache.org/jira/browse/PHOENIX-5936
> Project: Phoenix
>  Issue Type: Bug
>  Components: queryserver
>Affects Versions: queryserver-1.0.0
>Reporter: Romain Rigaux
>Assignee: Istvan Toth
>Priority: Major
> Fix For: queryserver-1.0.0
>
>
> calling  inspector.get_columns() on a table with constraints will result in 
> the following error:
> {noformat}
> Traceback (most recent call last):
>  File 
> "/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
>  line 101, in decorator return func(*args, **kwargs)
>  File 
> "/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
>  line 362, in autocomplete
>  columns = assist.get_columns(database, table)
>  File 
> "/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py",
>  line 453, in get_columns return self.db.get_columns(table, database)
>  File 
> "/home/romain/projects/hue/build/env/lib/python3.8/site-packages/sqlalchemy/engine/reflection.py",
>  line 372, in get_columns
>  col_defs = self.dialect.get_columns(
>  File 
> "/home/romain/projects/hue/build/env/lib/python3.8/site-packages/phoenixdb/sqlalchemy_phoenix.py",
>  line 163, in get_columns
>  col_type = COLUMN_DATA_TYPE[row[1]]
>  KeyError: None{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (PHOENIX-5938) Support impersonation in the python driver

2020-06-04 Thread Istvan Toth (Jira)
Istvan Toth created PHOENIX-5938:


 Summary: Support impersonation in the python driver
 Key: PHOENIX-5938
 URL: https://issues.apache.org/jira/browse/PHOENIX-5938
 Project: Phoenix
  Issue Type: New Feature
  Components: queryserver
Affects Versions: queryserver-1.0.0
Reporter: Romain Rigaux
Assignee: Istvan Toth


Support impersonation via the doAs parameter in the python driver, and the 
SqlAlchemy driver.

For the SqlAlchemy driver, strive to make it compatible with the Hue 
_has_impersonation_ option.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (PHOENIX-5920) Skip SYSTEM TABLE checks while creating phoenix connection if client has set the DoNotUpgrade config

2020-06-04 Thread Neha Gupta (Jira)


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

Neha Gupta updated PHOENIX-5920:

Attachment: PHOENIX-5920.v3.patch

> Skip SYSTEM TABLE checks while creating phoenix connection if client has set 
> the DoNotUpgrade config
> 
>
> Key: PHOENIX-5920
> URL: https://issues.apache.org/jira/browse/PHOENIX-5920
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 5.0.0, 4.15.0, 4.14.3
>Reporter: Neha Gupta
>Assignee: Neha Gupta
>Priority: Major
> Fix For: 5.1.0, 4.16.0
>
> Attachments: PHOENIX-5920.patch, PHOENIX-5920.v1.patch, 
> PHOENIX-5920.v2.patch, PHOENIX-5920.v3.patch
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Phoenix checks upgrade path even if client has set "DoNotUpgrade" config. 
> When HMaster failover happens and Phoenix client creating phoenix connection, 
> we get exception "org.apache.hadoop.hbase.PleaseHoldException: Master is 
> initializing" because phoenix calls HBase admin apis to check if SYSTEM 
> tables are in place and does not require an upgrade.  
> [CQSI.init()|https://github.com/apache/phoenix/blob/aad583670ea821286ab5e2460ce0ab7255d474c4/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java#L3169]
>  initiates creating systems table and 
> [CQSI.ensureTableCreated|https://github.com/apache/phoenix/blob/aad583670ea821286ab5e2460ce0ab7255d474c4/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java#L1246]
>  is checking if SYTEM table requires upgrade and calls hbaseAdminApis to 
> perform this operation which fails if HMaster is not running. Can we honor 
> the "DoNotUpgrade" config by client(By making an assumption that SYSTEM table 
> is already up-to-date and phoenix client shouldn't perform any upgrades) and 
> skip this upgrade checks ?
> EnsureTableCreated performs bunch of client-server compatibility checks like:
> 1.SYSTEM.CATALOG exists and its timestamp < MIN_SYSTEM_TABLE_TIMESTAMP
> 2.SYSTEM.CATALOG exists, but client and server-side namespace mapping is 
> enabled so we need to migrate SYSTEM tables to the SYSTEM namespace
> 3.When an end-user uses the vanilla PhoenixDriver to create a connection and 
> a requirement for upgrade is detected. In this case, the user should get a 
> connection on which they are only able to run "EXECUTE UPGRADE".



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (PHOENIX-5932) View Index rebuild results in surplus rows from other view indexes

2020-06-04 Thread Abhishek Singh Chouhan (Jira)


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

Abhishek Singh Chouhan updated PHOENIX-5932:

Attachment: PHOENIX-5932-4.x.patch

> View Index rebuild results in surplus rows from other view indexes
> --
>
> Key: PHOENIX-5932
> URL: https://issues.apache.org/jira/browse/PHOENIX-5932
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.16.0
>Reporter: Abhishek Singh Chouhan
>Assignee: Abhishek Singh Chouhan
>Priority: Major
> Fix For: 4.16.0
>
> Attachments: PHOENIX-5932-4.x.patch, PHOENIX-5932-wip-4.x.001.patch, 
> PHOENIX-5932-wip-4.x.001.patch, PHOENIX-5932-wip-4.x.patch, 
> PHOENIX-5932-wip-master.001.patch, PHOENIX-5932-wip-master.patch
>
>
> Steps to reproduce
>  # Create a table with PK as COL1, COL2
>  # Create 2 views with different view constants on COL2. Also add other 
> columns
>  # Upsert rows into the views
>  # Create indexes on the views. Rebuild will result in each view index having 
> rows from other view also
> This is because we set the filter on scan to null during rebuild 
> [here|[https://github.com/apache/phoenix/blob/4.x/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java#L1084]]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (PHOENIX-5932) View Index rebuild results in surplus rows from other view indexes

2020-06-04 Thread Abhishek Singh Chouhan (Jira)


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

Abhishek Singh Chouhan updated PHOENIX-5932:

Attachment: (was: PHOENIX-5932-4.x.patch)

> View Index rebuild results in surplus rows from other view indexes
> --
>
> Key: PHOENIX-5932
> URL: https://issues.apache.org/jira/browse/PHOENIX-5932
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.16.0
>Reporter: Abhishek Singh Chouhan
>Assignee: Abhishek Singh Chouhan
>Priority: Major
> Fix For: 4.16.0
>
> Attachments: PHOENIX-5932-4.x.patch, PHOENIX-5932-wip-4.x.001.patch, 
> PHOENIX-5932-wip-4.x.001.patch, PHOENIX-5932-wip-4.x.patch, 
> PHOENIX-5932-wip-master.001.patch, PHOENIX-5932-wip-master.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Steps to reproduce
>  # Create a table with PK as COL1, COL2
>  # Create 2 views with different view constants on COL2. Also add other 
> columns
>  # Upsert rows into the views
>  # Create indexes on the views. Rebuild will result in each view index having 
> rows from other view also
> This is because we set the filter on scan to null during rebuild 
> [here|[https://github.com/apache/phoenix/blob/4.x/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java#L1084]]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (PHOENIX-5932) View Index rebuild results in surplus rows from other view indexes

2020-06-04 Thread Abhishek Singh Chouhan (Jira)


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

Abhishek Singh Chouhan updated PHOENIX-5932:

Attachment: PHOENIX-5932-4.x.patch

> View Index rebuild results in surplus rows from other view indexes
> --
>
> Key: PHOENIX-5932
> URL: https://issues.apache.org/jira/browse/PHOENIX-5932
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.16.0
>Reporter: Abhishek Singh Chouhan
>Assignee: Abhishek Singh Chouhan
>Priority: Major
> Fix For: 4.16.0
>
> Attachments: PHOENIX-5932-4.x.patch, PHOENIX-5932-wip-4.x.001.patch, 
> PHOENIX-5932-wip-4.x.001.patch, PHOENIX-5932-wip-4.x.patch, 
> PHOENIX-5932-wip-master.001.patch, PHOENIX-5932-wip-master.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Steps to reproduce
>  # Create a table with PK as COL1, COL2
>  # Create 2 views with different view constants on COL2. Also add other 
> columns
>  # Upsert rows into the views
>  # Create indexes on the views. Rebuild will result in each view index having 
> rows from other view also
> This is because we set the filter on scan to null during rebuild 
> [here|[https://github.com/apache/phoenix/blob/4.x/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java#L1084]]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (PHOENIX-5939) Plublish PhoenixDB to PyPI

2020-06-04 Thread Istvan Toth (Jira)
Istvan Toth created PHOENIX-5939:


 Summary: Plublish PhoenixDB to PyPI
 Key: PHOENIX-5939
 URL: https://issues.apache.org/jira/browse/PHOENIX-5939
 Project: Phoenix
  Issue Type: Task
  Components: queryserver
Affects Versions: queryserver-1.0.0
Reporter: Istvan Toth


The original PhoenixDB driver was published to PyPI.

The improved version in phoenix-queryserver is only available from there.

We should start publishing the driver again.

Some questions to answer:
 * Can we take over the old PyPI project ?
 * Do we want to ?
 * What should be the project/artifact name (if not the old one)
 * Version numbering ?
 * Do we want to publish development versions ?
 * What is the process / who should do the publishing ?
 * Any blockers before we start publishing ?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (PHOENIX-5920) Skip SYSTEM TABLE checks while creating phoenix connection if client has set the DoNotUpgrade config

2020-06-04 Thread Neha Gupta (Jira)


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

Neha Gupta updated PHOENIX-5920:

Attachment: PHOENIX-5920.v4.patch

> Skip SYSTEM TABLE checks while creating phoenix connection if client has set 
> the DoNotUpgrade config
> 
>
> Key: PHOENIX-5920
> URL: https://issues.apache.org/jira/browse/PHOENIX-5920
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 5.0.0, 4.15.0, 4.14.3
>Reporter: Neha Gupta
>Assignee: Neha Gupta
>Priority: Major
> Fix For: 5.1.0, 4.16.0
>
> Attachments: PHOENIX-5920.patch, PHOENIX-5920.v1.patch, 
> PHOENIX-5920.v2.patch, PHOENIX-5920.v3.patch, PHOENIX-5920.v4.patch
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Phoenix checks upgrade path even if client has set "DoNotUpgrade" config. 
> When HMaster failover happens and Phoenix client creating phoenix connection, 
> we get exception "org.apache.hadoop.hbase.PleaseHoldException: Master is 
> initializing" because phoenix calls HBase admin apis to check if SYSTEM 
> tables are in place and does not require an upgrade.  
> [CQSI.init()|https://github.com/apache/phoenix/blob/aad583670ea821286ab5e2460ce0ab7255d474c4/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java#L3169]
>  initiates creating systems table and 
> [CQSI.ensureTableCreated|https://github.com/apache/phoenix/blob/aad583670ea821286ab5e2460ce0ab7255d474c4/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java#L1246]
>  is checking if SYTEM table requires upgrade and calls hbaseAdminApis to 
> perform this operation which fails if HMaster is not running. Can we honor 
> the "DoNotUpgrade" config by client(By making an assumption that SYSTEM table 
> is already up-to-date and phoenix client shouldn't perform any upgrades) and 
> skip this upgrade checks ?
> EnsureTableCreated performs bunch of client-server compatibility checks like:
> 1.SYSTEM.CATALOG exists and its timestamp < MIN_SYSTEM_TABLE_TIMESTAMP
> 2.SYSTEM.CATALOG exists, but client and server-side namespace mapping is 
> enabled so we need to migrate SYSTEM tables to the SYSTEM namespace
> 3.When an end-user uses the vanilla PhoenixDriver to create a connection and 
> a requirement for upgrade is detected. In this case, the user should get a 
> connection on which they are only able to run "EXECUTE UPGRADE".



--
This message was sent by Atlassian Jira
(v8.3.4#803005)