Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python-phoenixdb/gen-protobuf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.

set -x
AVATICA_VER=rel/avatica-1.10.0
AVATICA_VER=rel/avatica-1.18.0

set -e

Expand Down
18 changes: 18 additions & 0 deletions python-phoenixdb/phoenixdb/avatica/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,12 @@ def get_schemas(self, connection_id, catalog=None, schemaPattern=None):
request.connection_id = connection_id
if catalog is not None:
request.catalog = catalog
if catalog == '':
request.has_catalog = True
if schemaPattern is not None:
request.schema_pattern = schemaPattern
if schemaPattern == '':
request.has_schema_pattern = True
response_data = self._apply(request, 'ResultSetResponse')
response = responses_pb2.ResultSetResponse()
response.ParseFromString(response_data)
Expand All @@ -266,10 +270,16 @@ def get_tables(self, connection_id, catalog=None, schemaPattern=None, tableNameP
request.connection_id = connection_id
if catalog is not None:
request.catalog = catalog
if catalog == '':
request.has_catalog = True
if schemaPattern is not None:
request.schema_pattern = schemaPattern
if schemaPattern == '':
request.has_schema_pattern = True
if tableNamePattern is not None:
request.table_name_pattern = tableNamePattern
if tableNamePattern == '':
request.has_table_name_pattern = True
if typeList is not None:
request.type_list.extend(typeList)
request.has_type_list = typeList is not None
Expand All @@ -283,12 +293,20 @@ def get_columns(self, connection_id, catalog=None, schemaPattern=None, tableName
request.connection_id = connection_id
if catalog is not None:
request.catalog = catalog
if catalog == '':
request.has_catalog = True
if schemaPattern is not None:
request.schema_pattern = schemaPattern
if schemaPattern == '':
request.has_schema_pattern = True
if tableNamePattern is not None:
request.table_name_pattern = tableNamePattern
if tableNamePattern == '':
request.has_table_name_pattern = True
if columnNamePattern is not None:
request.column_name_pattern = columnNamePattern
if columnNamePattern == '':
request.has_column_name_pattern = True
response_data = self._apply(request, 'ResultSetResponse')
response = responses_pb2.ResultSetResponse()
response.ParseFromString(response_data)
Expand Down
Loading