蜂巢 - 分区表(hive - partitioning table)
我用查询创建了一个配置单元表 -
create table studpart4(id int, name string) partitioned by (course string, year int) row format delimited fields terminated by '\t' lines terminated by '\n' stored as textfile;
创建成功。
使用以下命令加载数据 -
load data local inpath '/scratch/hive_inputs/student_input_1.txt' overwrite into table studpart4 partition(course='cse',year=2);
我的输入数据文件看起来像 -
101 student1 cse 1 102 student2 cse 2 103 student3 eee 3 104 student4 eee 4 105 student5 cse 1 106 student6 cse 2 107 student7 eee 3 108 student8 eee 4 109 student9 cse 1 110 student10 cse 2
但是输出显示为(
select * from studpart4
的select * from studpart4
) -101 student1 cse 2 102 student2 cse 2 103 student3 eee 2 104 student4 eee 2 105 student5 cse 2 106 student6 cse 2 107 student7 eee 2 108 student8 eee 2 109 student9 cse 2 110 student10 cse 2
为什么最后一列是全部2.为什么它会被更改并错误地更新。
I have created a hive table with the query -
create table studpart4(id int, name string) partitioned by (course string, year int) row format delimited fields terminated by '\t' lines terminated by '\n' stored as textfile;
Created successfully.
Loaded data with below command -
load data local inpath '/scratch/hive_inputs/student_input_1.txt' overwrite into table studpart4 partition(course='cse',year=2);
And my input data file looks like -
101 student1 cse 1 102 student2 cse 2 103 student3 eee 3 104 student4 eee 4 105 student5 cse 1 106 student6 cse 2 107 student7 eee 3 108 student8 eee 4 109 student9 cse 1 110 student10 cse 2
But output is displayed as (of
select * from studpart4
) --101 student1 cse 2 102 student2 cse 2 103 student3 eee 2 104 student4 eee 2 105 student5 cse 2 106 student6 cse 2 107 student7 eee 2 108 student8 eee 2 109 student9 cse 2 110 student10 cse 2
Why does the last column is all 2. Why did it get changed and updating wrongly.
原文:https://stackoverflow.com/questions/39057380
最满意答案
默认情况下,Microsoft Visual Studio在安装时不会将
#include
搜索路径和/或库链接路径放入全局环境中,但将其留给IDE设置,或者用户在使用命令行编译器时明确执行。对于后一个目的,Microsoft提供了一个批处理文件,请参阅Visual Studio文档中的设置命令行构建的路径和环境变量 。
您需要在
configure.exe
之前运行那里提到的VCVARS32.BAT
脚本。It's so stupid I have to answer it myself.
The reason was that I didn't have the C++ compiler installed.
I always thought I did, but only used VS2010 for C# development up until now.
Don't down-rate b/c I wasted some people's time! When was the last time such a stupid thing happened to you during coding?
相关问答
更多-
HTML帮助2编译器可从Microsoft Visual Studio 2008 SDK 1.0下载中获得 。 (您不需要安装Visual Studio 2008 IDE就可以使用这些SDK工具。) 显然,需要的文件是hxcomp.exe 在安装SDK(在x64系统上)之后,需要的文件安装在此处,Sandcastle向导找到它。 C:\Program Files (x86)\Common Files\microsoft shared\Help 2.0 Compiler\hxcomp.exe 在x86系统上 ...
-
在您的cpp文件中,您应该: QList
SliderArray::GetSliderData() { return integerList1; } void SliderArray::SetSliderData(QList datalist) { integerList1 = datalist; } 这与Qt无关,你只是错过了返回类型。 In your cpp file you should have: QList SliderArray::GetSlid ... -
在Qt,QtCreator和QMake中配置GCC编译器(Configuring the GCC compiler switches in Qt, QtCreator, and QMake)[2022-05-13]
它归结为阅读手册 。 而不是在.pro文件中使用CXXFLAGS ,您需要使用QMAKE_CXXFLAGS如: main.cpp中: #includeint main() { return 0; } main.pro: SOURCES += main.cpp QMAKE_CXXFLAGS += -std=c++0x It boils down to reading the manual. Instead of using CXXFLAGS in the .pro file, ... -
如何为Microsoft .NET .NET 4 C#编译器指定.NET版本?(How to specify .NET version for .NET 4 C# compiler from microsoft?)[2023-05-16]
像这样的东西应该工作: Dictionaryoptions = new Dictionary (); options.Add("CompilerVersion", "v2.0"); CSharpCodeProvider provider = new CSharpCodeProvider(options); 请参阅: CSharpCodeProvider构造函数(IDictionary) 。 Something like this sho ... -
你试图从错误的角度解决问题。 特别是,您想要的解决方案将不健壮。 它仍将在不同的系统上中断,例如,安装了不同版本的MinGW工具链,因此不同的运行时DLL,如果由您的应用程序加载(使用其他版本的MinGW构建),很可能会导致崩溃和未定义的行为运行。 此外,可能有些系统甚至没有安装MinGW。 这些是使用特定版本的工具链构建的应用程序应该与包含的相应运行时DLL(这就是所谓的可再发行运行时 )一起分发的主要原因,这是Windows上的常见做法,并且没有任何问题。 但是,有更好的方法来解决您的问题。 只需将所有 ...
-
您需要将Server对象声明为Dialog类成员变量,而不是在构造函数中定义它。 以下是Dialog类的外观: dialog.h #include
#include #include "server.h" class QLabel; class QPushButton; class Dialog : public QWidget { Q_OBJECT public: Dialog(QWidget *parent = 0); priva ... -
默认情况下,Microsoft Visual Studio在安装时不会将#include搜索路径和/或库链接路径放入全局环境中,但将其留给IDE设置,或者用户在使用命令行编译器时明确执行。 对于后一个目的,Microsoft提供了一个批处理文件,请参阅Visual Studio文档中的设置命令行构建的路径和环境变量 。 您需要在configure.exe之前运行那里提到的VCVARS32.BAT脚本。 It's so stupid I have to answer it myself. The reason ...
-
从另一个IDE(Qt Creator)为MSVC编译器设置字符集(Setting Character set for MSVC compiler from another IDE (Qt Creator))[2020-01-10]
在Visual Studio中快速检查,这是我发现的: 如果选项是使用Unicode字符集 ,您将拥有以下两个编译器选项: /D "_UNICODE" /D "UNICODE" 但是,如果它使用多字节字符集 ,您将拥有: /D "_MBCS" 因此,您需要更新命令行并从/D "_UNICODE" /D "UNICODE"更改为/D "_MBCS"或#定义某个_MBCS符号的某处。 A quick check in Visual Studio and this is what I found: If th ... -
使用msvc编译器在Windows上包含Qt-headers的路径(Includepaths for Qt-headers on Windows using msvc compiler)[2023-11-16]
好的,答案是相当愚蠢的。 我正在测试的项目是我私人存储库中的一个旧项目,显然我创建它是一个非Qt项目。 .pro文件包含以下行: CONFIG -= qt 这简直排除了所有的Qt标题。 Okay, the answer is rather stupid. The project I was testing with was an old one from my private repository and appareantly I created it as a non Qt-Project. The ... -
如果你想使用Visual Studio编译器,你可以下载免费的Windows SDK。 以下链接将您带到Visual Studio 2008 SDK: 适用于Windows 7和.NET Framework 3.5 SP1的Microsoft Windows SDK 这包括您需要的所有C ++编译器和工具。 (有一个更新版本可用,但Visual Studio 2010还不是Qt的“一级支持”平台。)我们在独立的构建机器上使用它,它工作正常。 仅仅是个人意见,但我们发现在Windows上使用除MSVC之外的任 ...