Re: SparkSQL: StringType for numeric comparison

2014-10-14 Thread invkrh
Thank you, Michael. In Spark SQL DataType, we have a lot of types, for example, ByteType, ShortType, StringType, etc. These types are used to form the table schema. As for me, StringType is enough, why do we need others ? Hao -- View this message in context:

Re: SparkSQL LEFT JOIN problem

2014-10-13 Thread invkrh
Hi, Thank you Liquan. I just missed some in information in my previous post. I just solved the problem. Actually, I use the first line(schema header) of the CSV file to generate StructType and StructField. However, the input file is UTF-8 Unicode (*with* BOM), so the first char of the file is

SparkSQL: StringType for numeric comparison

2014-10-13 Thread invkrh
Hi, I am using SparkSQL 1.1.0. Actually, I have a table as following: root |-- account_id: string (nullable = false) |-- Birthday: string (nullable = true) |-- preferstore: string (nullable = true) |-- registstore: string (nullable = true) |-- gender: string (nullable = true) |--

SparkSQL: select syntax

2014-10-13 Thread invkrh
Hi all, A quick question on SparkSql *SELECT* syntax. Does it support queries like: *SELECT t1.*, t2.d, t2.e FROM t1 LEFT JOIN t2 on t1.a = t2.a* It always ends with the exception: *Exception in thread main java.lang.RuntimeException: [2.12] failure: string literal expected SELECT t1.*,

SparkSQL LEFT JOIN problem

2014-10-10 Thread invkrh
Hi, I am exploring SparkSQL 1.1.0, I have a problem on LEFT JOIN. Here is the request: select * from customer left join profile on customer.account_id = profile.account_id The two tables' schema are shown as following: // Table: customer root |-- account_id: string (nullable = false) |--