Skip to content

Instantly share code, notes, and snippets.

View wesm's full-sized avatar
💭
➡️ ➡️ ➡️

Wes McKinney wesm

💭
➡️ ➡️ ➡️
View GitHub Profile
@wesm
wesm / repro.py
Created September 27, 2018 22:10
File "/home/wesm/miniconda/envs/arrow-dev/bin/ipython", line 11, in <module>
sys.exit(start_ipython())
File "/home/wesm/miniconda/envs/arrow-dev/lib/python3.6/site-packages/IPython/__init__.py", line 125, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/home/wesm/miniconda/envs/arrow-dev/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/home/wesm/miniconda/envs/arrow-dev/lib/python3.6/site-packages/IPython/terminal/ipapp.py", line 356, in start
self.shell.mainloop()
File "/home/wesm/miniconda/envs/arrow-dev/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 485, in mainloop
self.interact()
$ ./lint.sh
/home/wesm/code/arrow/r/src/array.cpp had clang-format style issues
--- /home/wesm/code/arrow/r/src/array.cpp
+++ /home/wesm/code/arrow/r/src/array.cpp (after clang format)
@@ -40,9 +40,7 @@
std::shared_ptr<arrow::Array> SimpleArray(SEXP x) {
Rcpp::Vector<RTYPE> vec(x);
std::vector<std::shared_ptr<arrow::Buffer>> buffers{
- nullptr,
- std::make_shared<SimpleRBuffer<RTYPE>>(vec)
@wesm
wesm / arrow-toolchain.sh
Created July 29, 2018 23:16
Wes's Apache Arrow helper bash scripts
#!/usr/bin/env bash
export ARROW_CLANG_VERSION=6.0
export ARROW_GCC=gcc
export ARROW_GXX=g++
export ARROW_LLVM_VERSION=$ARROW_CLANG_VERSION
export PYARROW_WITH_ORC=1
export PYARROW_WITH_PARQUET=1
export PYARROW_WITH_PLASMA=1
-- CMAKE_CXX_FLAGS: -D_GLIBCXX_USE_CXX11_ABI=0 -ggdb -O0 -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-deprecated -Wno-weak-vtables -Wno-padded -Wno-comma -Wno-unused-parameter -Wno-unused-template -Wno-undef -Wno-shadow -Wno-switch-enum -Wno-exit-time-destructors -Wno-global-constructors -Wno-weak-template-vtables -Wno-undefined-reinterpret-cast -Wno-implicit-fallthrough -Wno-unreachable-code-return -Wno-float-equal -Wno-missing-prototypes -Wno-old-style-cast -Wno-covered-switch-default -Wno-cast-align -Wno-vla-extension -Wno-shift-sign-overflow -Wno-used-but-marked-unused -Wno-missing-variable-declarations -Wno-gnu-zero-variadic-macro-arguments -Wconversion -Wno-sign-conversion -Wno-disabled-macro-expansion -Wno-gnu-folding-constant -Wno-reserved-id-macro -Wno-range-loop-analysis -Wno-double-promotion -Wno-undefined-func-template -Wno-zero-as-null-pointer-constant -Wno-unknown-warning-option -Werror -Wno-unknown-warning-option -std=c++11 -msse3 -maltivec -Werror -Qunused-arguments -fsanit
In [1]: import pandas as pd
In [2]: ts = pd.Timestamp('2000-01-01 00:00:00')
In [3]: ts
Out[3]: Timestamp('2000-01-01 00:00:00')
In [4]: ts.hour
Out[4]: 0
# 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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
DCHECK src/arrow/table.cc:223: ERROR: NULL_DEREFERENCE pointer `returned by column` could be null and is dereferenced at line 223, column 10
DCHECK src/arrow/ipc/writer.cc:140: ERROR: NULL_DEREFERENCE pointer `returned by column` could be null and is dereferenced at line 140, column 7
DCHECK src/arrow/util/bit-util.cc:55: ERROR: NULL_DEREFERENCE pointer `out_buf` last assigned on line 53 could be null and is dereferenced by call to `memset()` at line 55, column 3
DCHECK src/arrow/python/numpy_to_arrow.cc:499: ERROR: NULL_DEREFERENCE pointer `tmp_array` could be null and is dereferenced by call to `arrow::compute::Cast()` at line 499, column 3
CANTHAPPEN src/arrow/compare.cc:142: ERROR: NULL_DEREFERENCE pointer `returned by field` could be null and is dereferenced at line 142, column 24
NOTAPROBLEM src/plasma/client.cc:360: ERROR: EMPTY_VECTOR_ACCESS Vector `&buffer` could be empty and is accessed at line 360, column 5
CANTHAPPEN src/arrow/python/numpy_to_arrow.cc:670: ERROR: NULL_DEREFERENCE pointer `&builder
{
"schema": {
"fields": [
{
"name": "dict1",
"nullable": true,
"type": {
"name": "utf8"
},
"dictionary": {
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.098 0.098 {built-in method builtins.exec}
1 0.000 0.000 0.098 0.098 <string>:1(<module>)
1 0.000 0.000 0.056 0.056 generic.py:4214(groupby)
1 0.000 0.000 0.056 0.056 groupby.py:1617(groupby)
1 0.000 0.000 0.055 0.055 groupby.py:363(__init__)
1 0.000 0.000 0.055 0.055 groupby.py:2483(_get_grouper)
1 0.007 0.007 0.055 0.055 groupby.py:2581(is_in_axis)
1 0.000 0.000 0.048 0.048 base.py:2385(get_loc)
3 0.000 0.000 0.048 0.016 categorical.py:1037(__array__)