Replace pandas.DataFrame with PyArrow.Table for nullable int typing (#8733)

* Use PyArrow Table for query result serialization

* Cleanup dev comments

* Additional cleanup

* WIP: tests

* Remove explicit dtype logic from db_engine_specs

* Remove obsolete  column property

* SupersetTable column types

* Port SupersetDataFrame methods to SupersetTable

* Add test for nullable boolean columns

* Support datetime values with timezone offsets

* Black formatting

* Pylint

* More linting/formatting

* Resolve issue with timezones not appearing in results

* Types

* Enable running of tests in tests/db_engine_specs

* Resolve application context errors

* Refactor and add tests for pyodbc.Row conversion

* Appease isort, regardless of isort:skip

* Re-enable RESULTS_BACKEND_USE_MSGPACK default based on benchmarks

* Dataframe typing and nits

* Renames to reduce ambiguity
This commit is contained in:
Rob DiCiuccio
2020-01-03 16:55:39 +00:00
committed by Maxime Beauchemin
parent 4f8bf2b04d
commit 6537d5ed8c
16 changed files with 438 additions and 513 deletions

View File

@@ -55,13 +55,11 @@ describe('ExploreResultsButton', () => {
const mockColumns = {
ds: {
is_date: true,
is_dim: false,
name: 'ds',
type: 'STRING',
},
gender: {
is_date: false,
is_dim: true,
name: 'gender',
type: 'STRING',
},

View File

@@ -219,13 +219,11 @@ export const queries = [
columns: [
{
is_date: true,
is_dim: false,
name: 'ds',
type: 'STRING',
},
{
is_date: false,
is_dim: true,
name: 'gender',
type: 'STRING',
},
@@ -233,13 +231,11 @@ export const queries = [
selected_columns: [
{
is_date: true,
is_dim: false,
name: 'ds',
type: 'STRING',
},
{
is_date: false,
is_dim: true,
name: 'gender',
type: 'STRING',
},
@@ -291,37 +287,31 @@ export const queryWithBadColumns = {
selected_columns: [
{
is_date: true,
is_dim: false,
name: 'COUNT(*)',
type: 'STRING',
},
{
is_date: false,
is_dim: true,
name: 'this_col_is_ok',
type: 'STRING',
},
{
is_date: false,
is_dim: true,
name: 'a',
type: 'STRING',
},
{
is_date: false,
is_dim: true,
name: '1',
type: 'STRING',
},
{
is_date: false,
is_dim: true,
name: '123',
type: 'STRING',
},
{
is_date: false,
is_dim: true,
name: 'CASE WHEN 1=1 THEN 1 ELSE 0 END',
type: 'STRING',
},