save-buffer commented on a change in pull request #12537:
URL: https://github.com/apache/arrow/pull/12537#discussion_r829378845



##########
File path: cpp/src/arrow/compute/exec/tpch_node.cc
##########
@@ -0,0 +1,3431 @@
+// 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/compute/exec/tpch_node.h"
+#include "arrow/util/future.h"
+#include "arrow/util/make_unique.h"
+#include "arrow/util/unreachable.h"
+
+#include <algorithm>
+#include <bitset>
+#include <cstring>
+#include <memory>
+#include <mutex>
+#include <queue>
+#include <random>
+#include <unordered_set>
+#include <vector>
+
+namespace arrow {
+using internal::checked_cast;
+
+namespace compute {
+const char* NameParts[] = {
+    "almond",    "antique",    "aquamarine", "azure",     "beige",    "bisque",
+    "black",     "blanched",   "blue",       "blush",     "brown",    
"burlywood",
+    "burnished", "chartreuse", "chiffon",    "chocolate", "coral",    
"cornflower",
+    "cornsilk",  "cream",      "cyan",       "dark",      "deep",     "dim",
+    "dodger",    "drab",       "firebrick",  "floral",    "forest",   
"frosted",
+    "gainsboro", "ghost",      "goldenrod",  "green",     "grey",     
"honeydew",
+    "hot",       "indian",     "ivory",      "khaki",     "lace",     
"lavender",
+    "lawn",      "lemon",      "light",      "lime",      "linen",    
"magenta",
+    "maroon",    "medium",     "metallic",   "midnight",  "mint",     "misty",
+    "moccasin",  "navajo",     "navy",       "olive",     "orange",   "orchid",
+    "pale",      "papaya",     "peach",      "peru",      "pink",     "plum",
+    "powder",    "puff",       "purple",     "red",       "rose",     "rosy",
+    "royal",     "saddle",     "salmon",     "sandy",     "seashell", "sienna",
+    "sky",       "slate",      "smoke",      "snow",      "spring",   "steel",
+    "tan",       "thistle",    "tomato",     "turquoise", "violet",   "wheat",
+    "white",     "yellow",
+};
+static constexpr size_t kNumNameParts = sizeof(NameParts) / 
sizeof(NameParts[0]);

Review comment:
       i don't want all of this stuff to be heap allocated if it doesn't need 
to be (which it doesn't). i could do `std::array<const char *>` but that is 
also a pain because then i have to count the number of elements manually. i 
think they only added the template argument deduction for the size in C++17. 




-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to