This is an automated email from the ASF dual-hosted git repository.
francischuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git
The following commit(s) were added to refs/heads/master by this push:
new 9e0d6f5 [CALCITE-3264] Add catch-all type for unknown types in all
adapters instead of panic (Tino Rusch).
9e0d6f5 is described below
commit 9e0d6f54ae174dcc8aa8b78ba87cd85d3f0968f4
Author: Tino Rusch <[email protected]>
AuthorDate: Mon Aug 19 12:41:52 2019 +0200
[CALCITE-3264] Add catch-all type for unknown types in all adapters instead
of panic (Tino Rusch).
---
generic/generic.go | 3 +--
hsqldb/hsqldb.go | 3 +--
phoenix/phoenix.go | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/generic/generic.go b/generic/generic.go
index 9187360..3ca0bd9 100644
--- a/generic/generic.go
+++ b/generic/generic.go
@@ -18,7 +18,6 @@
package generic
import (
- "fmt"
"math"
"reflect"
"time"
@@ -88,7 +87,7 @@ func (a Adapter) GetColumnTypeDefinition(col
*message.ColumnMetaData) *internal.
column.ScanType = reflect.TypeOf([]byte{})
default:
- panic(fmt.Sprintf("scantype for %s is not implemented",
col.Type.Name))
+ column.ScanType = reflect.TypeOf(new(interface{})).Elem()
}
// Handle rep type special cases for decimals, floats, date, time and
timestamp
diff --git a/hsqldb/hsqldb.go b/hsqldb/hsqldb.go
index ce6c811..2cb14cd 100644
--- a/hsqldb/hsqldb.go
+++ b/hsqldb/hsqldb.go
@@ -18,7 +18,6 @@
package hsqldb
import (
- "fmt"
"math"
"reflect"
"time"
@@ -88,7 +87,7 @@ func (a Adapter) GetColumnTypeDefinition(col
*message.ColumnMetaData) *internal.
column.ScanType = reflect.TypeOf([]byte{})
default:
- panic(fmt.Sprintf("scantype for %s is not implemented",
col.Type.Name))
+ column.ScanType = reflect.TypeOf(new(interface{})).Elem()
}
// Handle rep type special cases for decimals, floats, date, time and
timestamp
diff --git a/phoenix/phoenix.go b/phoenix/phoenix.go
index 41b9e9d..77ee648 100644
--- a/phoenix/phoenix.go
+++ b/phoenix/phoenix.go
@@ -18,7 +18,6 @@
package phoenix
import (
- "fmt"
"math"
"reflect"
"regexp"
@@ -92,7 +91,7 @@ func (a Adapter) GetColumnTypeDefinition(col
*message.ColumnMetaData) *internal.
column.ScanType = reflect.TypeOf([]byte{})
default:
- panic(fmt.Sprintf("scantype for %s is not implemented",
col.Type.Name))
+ column.ScanType = reflect.TypeOf(new(interface{})).Elem()
}
// Handle rep type special cases for decimals, floats, date, time and
timestamp