pitrou commented on a change in pull request #11982:
URL: https://github.com/apache/arrow/pull/11982#discussion_r811326012



##########
File path: cpp/src/arrow/flight/sql/example/sqlite_type_info.cc
##########
@@ -0,0 +1,116 @@
+// 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.
+
+#include "arrow/flight/sql/example/sqlite_type_info.h"
+
+#include "arrow/flight/sql/server.h"
+#include "arrow/flight/sql/types.h"
+#include "arrow/record_batch.h"
+#include "arrow/testing/gtest_util.h"
+
+namespace arrow {
+namespace flight {
+namespace sql {
+namespace example {
+
+std::shared_ptr<RecordBatch> DoGetTypeInfoResult() {
+  auto type_name_array =
+      ArrayFromJSON(utf8(), R"(["bit", "tinyint", "bigint", "longvarbinary",
+                            "varbinary", "text", "longvarchar", "char",
+                            "integer", "smallint", "float", "double",
+                            "numeric", "varchar", "date", "time",
+                            "timestamp"])");
+  auto data_type = ArrayFromJSON(
+      int32(), R"([-7, -6, -5, -4, -3, -1, -1, 1, 4, 5, 6, 8, 8, 12, 91, 92, 
93])");

Review comment:
       Hmm, where do 91, 92 and 93 come from? They don't seem to correspond to 
any `XDBCDataType` enum value?

##########
File path: cpp/src/arrow/flight/sql/example/sqlite_type_info.cc
##########
@@ -0,0 +1,116 @@
+// 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.
+
+#include "arrow/flight/sql/example/sqlite_type_info.h"
+
+#include "arrow/flight/sql/server.h"
+#include "arrow/flight/sql/types.h"
+#include "arrow/record_batch.h"
+#include "arrow/testing/gtest_util.h"
+
+namespace arrow {
+namespace flight {
+namespace sql {
+namespace example {
+
+std::shared_ptr<RecordBatch> DoGetTypeInfoResult() {
+  auto type_name_array =
+      ArrayFromJSON(utf8(), R"(["bit", "tinyint", "bigint", "longvarbinary",
+                            "varbinary", "text", "longvarchar", "char",
+                            "integer", "smallint", "float", "double",
+                            "numeric", "varchar", "date", "time",
+                            "timestamp"])");
+  auto data_type = ArrayFromJSON(
+      int32(), R"([-7, -6, -5, -4, -3, -1, -1, 1, 4, 5, 6, 8, 8, 12, 91, 92, 
93])");
+  auto column_size = ArrayFromJSON(
+      int32(),
+      R"([1, 3, 19, 65536, 255, 65536, 65536, 255, 9, 5, 7, 15, 15, 255, 10, 
8, 32])");
+  auto literal_prefix = ArrayFromJSON(
+      utf8(),
+      R"([null, null, null, null, null, "'", "'", "'", null, null, null, null, 
null, "'", "'", "'", "'"])");
+  auto literal_suffix = ArrayFromJSON(
+      utf8(),
+      R"([null, null, null, null, null, "'", "'", "'", null, null, null, null, 
null, "'", "'", "'", "'"])");
+  auto create_params = ArrayFromJSON(
+      list(field("item", utf8(), false)),
+      R"([[], [], [], [], [], ["length"], ["length"], ["length"], [], [], [], 
[], [], ["length"], [], [], []])");
+  auto nullable =
+      ArrayFromJSON(int32(), R"([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1, 1])");
+  auto case_sensitive =
+      ArrayFromJSON(boolean(), R"([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0])");
+  auto serachable =

Review comment:
       "searchable"




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to