Re: regex replace in string

2017-07-27 Thread Khurram Faraaz
Drill docs mention that REGEXP_REPLACE function uses 
http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html


Link to REGEXP_REPLACE doc - 
https://drill.apache.org/docs/string-manipulation/#regexp_replace



From: Paul Rogers <prog...@mapr.com>
Sent: Thursday, July 27, 2017 11:38:42 AM
To: user@drill.apache.org
Subject: Re: regex replace in string

DRILL-4645: "Regex_replace() function is broken”?

I still wonder, the characters you are looking for are those used to format a 
“columns” column on output. Can you show a couple of lines of your CSV file?

Or, take a look at SELECT * FROM … LIMIT 10 to see if the data is being split 
into columns, or is somehow using the “columns” column…

That aside, the docs don’t state the regex syntax used in the REGEX_REPLACE 
function. Is it Java regex? If so, then you’d have to format it according to 
the Java syntax ([1]). So:

‘\[|,|\.|]’

Note that “[“ and “.” are part of the regex syntax, so must be escaped.

- Paul

[1] https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html

> On Jul 26, 2017, at 10:49 PM, Divya Gehlot <divya.htco...@gmail.com> wrote:
>
> Hi,
> I have already set the plugin configuration to extractheader :true .
> and I followed the below link
> https://drill.apache.org/docs/lesson-2-run-queries-with-ansi-sql/
>
> SELECT REGEXP_REPLACE(CAST(`Column1` AS VARCHAR(100)), '[,".]', '') AS
> `Col1` FROM
> dfs.`installedsoftwares/ApacheDrill/apache-drill-1.10.0.tar/apache-drill-1.10.0/sample-data/sample_data.csv`
>
> Just extracting column which has special charcaters including the delimeter
> as one of the special character  gives me empty result set .
>
> Am I missing something ?
>
> Appreciate the help.
>
> Thanks,
> Divya
>



Re: regex replace in string

2017-07-27 Thread Paul Rogers
DRILL-4645: "Regex_replace() function is broken”?

I still wonder, the characters you are looking for are those used to format a 
“columns” column on output. Can you show a couple of lines of your CSV file?

Or, take a look at SELECT * FROM … LIMIT 10 to see if the data is being split 
into columns, or is somehow using the “columns” column…

That aside, the docs don’t state the regex syntax used in the REGEX_REPLACE 
function. Is it Java regex? If so, then you’d have to format it according to 
the Java syntax ([1]). So:

‘\[|,|\.|]’

Note that “[“ and “.” are part of the regex syntax, so must be escaped.

- Paul

[1] https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html

> On Jul 26, 2017, at 10:49 PM, Divya Gehlot  wrote:
> 
> Hi,
> I have already set the plugin configuration to extractheader :true .
> and I followed the below link
> https://drill.apache.org/docs/lesson-2-run-queries-with-ansi-sql/
> 
> SELECT REGEXP_REPLACE(CAST(`Column1` AS VARCHAR(100)), '[,".]', '') AS
> `Col1` FROM
> dfs.`installedsoftwares/ApacheDrill/apache-drill-1.10.0.tar/apache-drill-1.10.0/sample-data/sample_data.csv`
> 
> Just extracting column which has special charcaters including the delimeter
> as one of the special character  gives me empty result set .
> 
> Am I missing something ?
> 
> Appreciate the help.
> 
> Thanks,
> Divya
> 



Re: regex replace in string

2017-07-26 Thread Divya Gehlot
Hi,
I have already set the plugin configuration to extractheader :true .
 and I followed the below link
https://drill.apache.org/docs/lesson-2-run-queries-with-ansi-sql/

SELECT REGEXP_REPLACE(CAST(`Column1` AS VARCHAR(100)), '[,".]', '') AS
`Col1` FROM
dfs.`installedsoftwares/ApacheDrill/apache-drill-1.10.0.tar/apache-drill-1.10.0/sample-data/sample_data.csv`

Just extracting column which has special charcaters including the delimeter
as one of the special character  gives me empty result set .

Am I missing something ?

Appreciate the help.

Thanks,
Divya

On 27 July 2017 at 12:23, Paul Rogers <prog...@mapr.com> wrote:

> Hi Divya,
>
> I presume that “sample_data.csv” is your file? The default CSV
> configuration reads files without headers and puts all columns into a
> single array called “columns”. Do a SELECT * and you’ll see it. You’ll see
> an array that contains your data:
>
> [“Fred”, “Flintstone”]
>
> So, the correct query would be:
>
> SELECT REGEXP_REPLACE(CAST(columns[0] AS VARCHAR(100)), '[,".]', '') FROM
> dfs.`installedsoftwares/ApacheDrill/apache-drill-1.10.
> 0.tar/apache-drill-1.10.0/sample-data/sample_data.csv`
>
> I notice the regex is messing with brackets. Are you trying to convert the
> array form shown above to a cleaner list? Won’t work: those brackets are
> not in the data; they are the textual sugar added to show the array when
> printing.
>
> Maybe what you want is:
>
> SELECT columns[0] as `a`, columns[1] as `b` …
>
> Or, if your file actually contains headers, use a table function (or
> storage plugin config) to specify to use the headings to create individual
> columns. See the example at [1] under “Using the Formats Attributes as
> Table Function Parameters”.
>
> - Paul
>
> [1] https://drill.apache.org/docs/plugin-configuration-basics/
>
> > On Jul 26, 2017, at 8:22 PM, Divya Gehlot <divya.htco...@gmail.com>
> wrote:
> >
> > The another thing which I observed is when I  run below query
> > SELECT  REGEXP_REPLACE('"This, col7 data yes."', '[,".]', '') FROM
> > (VALUES(1))
> > EXPR$0
> > This col7 data yes
> >
> >
> > Same when I run the csv file it gives me empty result set :
> > SELECT REGEXP_REPLACE(CAST(`Column1` AS VARCHAR(100)), '[,".]', '') FROM
> > dfs.`installedsoftwares/ApacheDrill/apache-drill-1.10.
> 0.tar/apache-drill-1.10.0/sample-data/sample_data.csv`
> >
> > EXPR$0
> >
> >
> > P.S. As advised all the above queries I ran on Drill 1.11
> >
> > Appreciate the help .
> >
> > Thanks,
> > Divya
> >
> > On 27 July 2017 at 09:54, Divya Gehlot <divya.htco...@gmail.com> wrote:
> >
> >> Hi,
> >> Please find attached the sample_data.csv file
> >> Pasting the content of the csv file  below , in case attachment doesn't
> >> reach
> >>
> >>> Column1,Column2,Column3,Column4,Column5
> >>> colonedata1,coltwodata1,-35.924476,138.5987123,
> >>> colonedata2,coltwodata2,-27.4372536,153.0304583,137
> >>> colonedata3,coltwodata3,-35.2793885,149.1233503,134
> >>> colonedata4,coltwodata4,-33.8724176,151.2067579,
> >>> colonedata5,coltwodata5,,,
> >>> "This, col6 data",coltwodata6,-33.869732,151.203,351
> >>> "This, col7 data yes.",coltwodata7,1.2845045,103.8482739,80
> >>> Chifley,coltwodata5,,,
> >>
> >>
> >> Error :
> >>
> >>> Query Failed: An Error Occurred
> >>> org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
> >>> IllegalArgumentException: reallocation size must be non-negative
> Fragment
> >>> 0:0
> >>
> >>
> >>
> >> Thanks all for the help.
> >>
> >> Thanks ,
> >> Divya
> >>
> >>
> >> On 26 July 2017 at 23:31, Paul Rogers <prog...@mapr.com> wrote:
> >>
> >>> Hi Divya,
> >>>
> >>> We found a couple of issues in CSV files that would lead to the kind of
> >>> errors you encountered. These issues will be fixed in the upcoming
> Drill
> >>> 1.11 release.
> >>>
> >>> Sharing a sample CSV file will let us check the issue. Even better,
> >>> voting is open for the 1.11 release. Please go ahead and download it
> and
> >>> try your file with that release. Let us know if you still have a
> problem.
> >>>
> >>> Thanks,
> >>>
> >>> - Paul
> >>>
> >>>> On Jul 26, 2017, at 6:14 AM, Khurram Faraaz <kfar...@mapr.com> wr

Re: regex replace in string

2017-07-26 Thread Paul Rogers
Hi Divya,

I presume that “sample_data.csv” is your file? The default CSV configuration 
reads files without headers and puts all columns into a single array called 
“columns”. Do a SELECT * and you’ll see it. You’ll see an array that contains 
your data:

[“Fred”, “Flintstone”]

So, the correct query would be:

SELECT REGEXP_REPLACE(CAST(columns[0] AS VARCHAR(100)), '[,".]', '') FROM
dfs.`installedsoftwares/ApacheDrill/apache-drill-1.10.0.tar/apache-drill-1.10.0/sample-data/sample_data.csv`

I notice the regex is messing with brackets. Are you trying to convert the 
array form shown above to a cleaner list? Won’t work: those brackets are not in 
the data; they are the textual sugar added to show the array when printing.

Maybe what you want is:

SELECT columns[0] as `a`, columns[1] as `b` …

Or, if your file actually contains headers, use a table function (or storage 
plugin config) to specify to use the headings to create individual columns. See 
the example at [1] under “Using the Formats Attributes as Table Function 
Parameters”.

- Paul

[1] https://drill.apache.org/docs/plugin-configuration-basics/

> On Jul 26, 2017, at 8:22 PM, Divya Gehlot <divya.htco...@gmail.com> wrote:
> 
> The another thing which I observed is when I  run below query
> SELECT  REGEXP_REPLACE('"This, col7 data yes."', '[,".]', '') FROM
> (VALUES(1))
> EXPR$0
> This col7 data yes
> 
> 
> Same when I run the csv file it gives me empty result set :
> SELECT REGEXP_REPLACE(CAST(`Column1` AS VARCHAR(100)), '[,".]', '') FROM
> dfs.`installedsoftwares/ApacheDrill/apache-drill-1.10.0.tar/apache-drill-1.10.0/sample-data/sample_data.csv`
> 
> EXPR$0
> 
> 
> P.S. As advised all the above queries I ran on Drill 1.11
> 
> Appreciate the help .
> 
> Thanks,
> Divya
> 
> On 27 July 2017 at 09:54, Divya Gehlot <divya.htco...@gmail.com> wrote:
> 
>> Hi,
>> Please find attached the sample_data.csv file
>> Pasting the content of the csv file  below , in case attachment doesn't
>> reach
>> 
>>> Column1,Column2,Column3,Column4,Column5
>>> colonedata1,coltwodata1,-35.924476,138.5987123,
>>> colonedata2,coltwodata2,-27.4372536,153.0304583,137
>>> colonedata3,coltwodata3,-35.2793885,149.1233503,134
>>> colonedata4,coltwodata4,-33.8724176,151.2067579,
>>> colonedata5,coltwodata5,,,
>>> "This, col6 data",coltwodata6,-33.869732,151.203,351
>>> "This, col7 data yes.",coltwodata7,1.2845045,103.8482739,80
>>> Chifley,coltwodata5,,,
>> 
>> 
>> Error :
>> 
>>> Query Failed: An Error Occurred
>>> org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
>>> IllegalArgumentException: reallocation size must be non-negative Fragment
>>> 0:0
>> 
>> 
>> 
>> Thanks all for the help.
>> 
>> Thanks ,
>> Divya
>> 
>> 
>> On 26 July 2017 at 23:31, Paul Rogers <prog...@mapr.com> wrote:
>> 
>>> Hi Divya,
>>> 
>>> We found a couple of issues in CSV files that would lead to the kind of
>>> errors you encountered. These issues will be fixed in the upcoming Drill
>>> 1.11 release.
>>> 
>>> Sharing a sample CSV file will let us check the issue. Even better,
>>> voting is open for the 1.11 release. Please go ahead and download it and
>>> try your file with that release. Let us know if you still have a problem.
>>> 
>>> Thanks,
>>> 
>>> - Paul
>>> 
>>>> On Jul 26, 2017, at 6:14 AM, Khurram Faraaz <kfar...@mapr.com> wrote:
>>>> 
>>>> Can you please share your CSV file, the SQL query and the version of
>>> Drill that you are on. So someone can take a look and try to reproduce the
>>> error that you are seeing.
>>>> 
>>>> 
>>>> Thanks,
>>>> 
>>>> Khurram
>>>> 
>>>> 
>>>> From: Divya Gehlot <divya.htco...@gmail.com>
>>>> Sent: Wednesday, July 26, 2017 3:18:08 PM
>>>> To: user@drill.apache.org
>>>> Subject: regex replace in string
>>>> 
>>>> Hi,
>>>> I have a CSV file where  column values are
>>>> "This is the column,one "
>>>> "This is column , two"
>>>> column3
>>>> column4
>>>> 
>>>> When I try to regex_replace it throws error
>>>> 
>>>> org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
>>>>> IllegalArgumentException: reallocation size must be non-negative
>>> Fragment
>>>>> 0:0
>>>> 
>>>> 
>>>> How can I read the above columns as one string  like  This is the column
>>>> one
>>>> Appreciate the help
>>>> 
>>>> Thanks,
>>>> Divyab
>>> 
>>> 
>> 



Re: regex replace in string

2017-07-26 Thread Divya Gehlot
The another thing which I observed is when I  run below query
SELECT  REGEXP_REPLACE('"This, col7 data yes."', '[,".]', '') FROM
(VALUES(1))
EXPR$0
This col7 data yes


Same when I run the csv file it gives me empty result set :
SELECT REGEXP_REPLACE(CAST(`Column1` AS VARCHAR(100)), '[,".]', '') FROM
dfs.`installedsoftwares/ApacheDrill/apache-drill-1.10.0.tar/apache-drill-1.10.0/sample-data/sample_data.csv`

EXPR$0


P.S. As advised all the above queries I ran on Drill 1.11

Appreciate the help .

Thanks,
Divya

On 27 July 2017 at 09:54, Divya Gehlot <divya.htco...@gmail.com> wrote:

> Hi,
> Please find attached the sample_data.csv file
> Pasting the content of the csv file  below , in case attachment doesn't
> reach
>
>> Column1,Column2,Column3,Column4,Column5
>> colonedata1,coltwodata1,-35.924476,138.5987123,
>> colonedata2,coltwodata2,-27.4372536,153.0304583,137
>> colonedata3,coltwodata3,-35.2793885,149.1233503,134
>> colonedata4,coltwodata4,-33.8724176,151.2067579,
>> colonedata5,coltwodata5,,,
>> "This, col6 data",coltwodata6,-33.869732,151.203,351
>> "This, col7 data yes.",coltwodata7,1.2845045,103.8482739,80
>> Chifley,coltwodata5,,,
>
>
> Error :
>
>> Query Failed: An Error Occurred
>> org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
>> IllegalArgumentException: reallocation size must be non-negative Fragment
>> 0:0
>
>
>
> Thanks all for the help.
>
> Thanks ,
> Divya
>
>
> On 26 July 2017 at 23:31, Paul Rogers <prog...@mapr.com> wrote:
>
>> Hi Divya,
>>
>> We found a couple of issues in CSV files that would lead to the kind of
>> errors you encountered. These issues will be fixed in the upcoming Drill
>> 1.11 release.
>>
>> Sharing a sample CSV file will let us check the issue. Even better,
>> voting is open for the 1.11 release. Please go ahead and download it and
>> try your file with that release. Let us know if you still have a problem.
>>
>> Thanks,
>>
>> - Paul
>>
>> > On Jul 26, 2017, at 6:14 AM, Khurram Faraaz <kfar...@mapr.com> wrote:
>> >
>> > Can you please share your CSV file, the SQL query and the version of
>> Drill that you are on. So someone can take a look and try to reproduce the
>> error that you are seeing.
>> >
>> >
>> > Thanks,
>> >
>> > Khurram
>> >
>> > 
>> > From: Divya Gehlot <divya.htco...@gmail.com>
>> > Sent: Wednesday, July 26, 2017 3:18:08 PM
>> > To: user@drill.apache.org
>> > Subject: regex replace in string
>> >
>> > Hi,
>> > I have a CSV file where  column values are
>> > "This is the column,one "
>> > "This is column , two"
>> > column3
>> > column4
>> >
>> > When I try to regex_replace it throws error
>> >
>> > org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
>> >> IllegalArgumentException: reallocation size must be non-negative
>> Fragment
>> >> 0:0
>> >
>> >
>> > How can I read the above columns as one string  like  This is the column
>> > one
>> > Appreciate the help
>> >
>> > Thanks,
>> > Divyab
>>
>>
>


Re: regex replace in string

2017-07-26 Thread Divya Gehlot
Hi,
Please find attached the sample_data.csv file
Pasting the content of the csv file  below , in case attachment doesn't
reach

> Column1,Column2,Column3,Column4,Column5
> colonedata1,coltwodata1,-35.924476,138.5987123,
> colonedata2,coltwodata2,-27.4372536,153.0304583,137
> colonedata3,coltwodata3,-35.2793885,149.1233503,134
> colonedata4,coltwodata4,-33.8724176,151.2067579,
> colonedata5,coltwodata5,,,
> "This, col6 data",coltwodata6,-33.869732,151.203,351
> "This, col7 data yes.",coltwodata7,1.2845045,103.8482739,80
> Chifley,coltwodata5,,,


Error :

> Query Failed: An Error Occurred
> org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
> IllegalArgumentException: reallocation size must be non-negative Fragment
> 0:0



Thanks all for the help.

Thanks ,
Divya


On 26 July 2017 at 23:31, Paul Rogers <prog...@mapr.com> wrote:

> Hi Divya,
>
> We found a couple of issues in CSV files that would lead to the kind of
> errors you encountered. These issues will be fixed in the upcoming Drill
> 1.11 release.
>
> Sharing a sample CSV file will let us check the issue. Even better, voting
> is open for the 1.11 release. Please go ahead and download it and try your
> file with that release. Let us know if you still have a problem.
>
> Thanks,
>
> - Paul
>
> > On Jul 26, 2017, at 6:14 AM, Khurram Faraaz <kfar...@mapr.com> wrote:
> >
> > Can you please share your CSV file, the SQL query and the version of
> Drill that you are on. So someone can take a look and try to reproduce the
> error that you are seeing.
> >
> >
> > Thanks,
> >
> > Khurram
> >
> > ____
> > From: Divya Gehlot <divya.htco...@gmail.com>
> > Sent: Wednesday, July 26, 2017 3:18:08 PM
> > To: user@drill.apache.org
> > Subject: regex replace in string
> >
> > Hi,
> > I have a CSV file where  column values are
> > "This is the column,one "
> > "This is column , two"
> > column3
> > column4
> >
> > When I try to regex_replace it throws error
> >
> > org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
> >> IllegalArgumentException: reallocation size must be non-negative
> Fragment
> >> 0:0
> >
> >
> > How can I read the above columns as one string  like  This is the column
> > one
> > Appreciate the help
> >
> > Thanks,
> > Divyab
>
>
Column1,Column2,Column3,Column4,Column5
colonedata1,coltwodata1,-35.924476,138.5987123,
colonedata2,coltwodata2,-27.4372536,153.0304583,137
colonedata3,coltwodata3,-35.2793885,149.1233503,134
colonedata4,coltwodata4,-33.8724176,151.2067579,
colonedata5,coltwodata5,,,
"This, col6 data",coltwodata6,-33.869732,151.203,351
"This, col7 data yes.",coltwodata7,1.2845045,103.8482739,80
Chifley,coltwodata5,,,


Re: regex replace in string

2017-07-26 Thread Khurram Faraaz
regexp_replace function works on that data on Drill 1.11.0, commit id : 4220fb2

{noformat}

Data used was,

[root@centos-01 community]# cat rgex_replce.csv
"This is the column,one "
"This is column , two"
column3
column4

0: jdbc:drill:schema=dfs.tmp> select * from `rgex_replce.csv`;
+--+
|   columns|
+--+
| ["This is the column,one "]  |
| ["This is column , two"] |
| ["column3"]  |
| ["column4"]  |
+--+
4 rows selected (0.391 seconds)

// regexp_replace works as designed on Drill 1.11.0 commit id : 4220fb2

0: jdbc:drill:schema=dfs.tmp> select regexp_replace(cast(columns[0] as 
varchar(256)),'column','foobar') from `rgex_replce.csv`;
+--+
|  EXPR$0  |
+--+
| This is the foobar,one   |
| This is foobar , two |
| foobar3  |
| foobar4  |
+--+
4 rows selected (0.254 seconds)

0: jdbc:drill:schema=dfs.tmp> select 
regexp_replace(columns[0],'column','foobar') from `rgex_replce.csv`;
+--+
|  EXPR$0  |
+--+
| This is the foobar,one   |
| This is foobar , two |
| foobar3  |
| foobar4  |
+--+
4 rows selected (0.238 seconds)
{noformat}


Thanks,

Khurram


From: Kunal Khatua <kkha...@mapr.com>
Sent: Wednesday, July 26, 2017 11:47:22 PM
To: user@drill.apache.org
Subject: RE: regex replace in string

Here is the reference mail for the release candidate of Drill 1.11.0

-Original Message-
From: Arina Yelchiyeva [mailto:arina.yelchiy...@gmail.com]
Sent: Tuesday, July 25, 2017 3:36 AM
To: d...@drill.apache.org
Subject: [VOTE] Release Apache Drill 1.11.0 - rc0

Hi all,

I'd like to propose the first release candidate (rc0) of Apache Drill, version 
1.11.0.

The release candidate covers a total of 126 resolved JIRAs [1]. Thanks to 
everyone who contributed to this release.

The tarball artifacts are hosted at [2] and the maven artifacts are hosted at 
[3].

This release candidate is based on commit
4220fb2fffbc81883df3e5fea575fa0a584852b3 located at [4].

The vote ends at 1:00 PM UTC (5:00 AM PT), July 28, 2017.

[ ] +1
[ ] +0
[ ] -1

Here's my vote: +1 (non-binding)


[1]
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12313820=12339943
[2] http://home.apache.org/~arina/drill/releases/1.11.0/rc0/
[3] https://repository.apache.org/content/repositories/orgapachedrill-1042/
[4] https://github.com/arina-ielchiieva/drill/commits/drill-1.11.0

Kind regards
Arina

-Original Message-
From: Paul Rogers [mailto:prog...@mapr.com]
Sent: Wednesday, July 26, 2017 8:32 AM
To: user@drill.apache.org
Subject: Re: regex replace in string

Hi Divya,

We found a couple of issues in CSV files that would lead to the kind of errors 
you encountered. These issues will be fixed in the upcoming Drill 1.11 release.

Sharing a sample CSV file will let us check the issue. Even better, voting is 
open for the 1.11 release. Please go ahead and download it and try your file 
with that release. Let us know if you still have a problem.

Thanks,

- Paul

> On Jul 26, 2017, at 6:14 AM, Khurram Faraaz <kfar...@mapr.com> wrote:
>
> Can you please share your CSV file, the SQL query and the version of Drill 
> that you are on. So someone can take a look and try to reproduce the error 
> that you are seeing.
>
>
> Thanks,
>
> Khurram
>
> 
> From: Divya Gehlot <divya.htco...@gmail.com>
> Sent: Wednesday, July 26, 2017 3:18:08 PM
> To: user@drill.apache.org
> Subject: regex replace in string
>
> Hi,
> I have a CSV file where  column values are "This is the column,one "
> "This is column , two"
> column3
> column4
>
> When I try to regex_replace it throws error
>
> org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
>> IllegalArgumentException: reallocation size must be non-negative
>> Fragment
>> 0:0
>
>
> How can I read the above columns as one string  like  This is the
> column one Appreciate the help
>
> Thanks,
> Divyab



Re: regex replace in string

2017-07-26 Thread Paul Rogers
Hi Divya,

We found a couple of issues in CSV files that would lead to the kind of errors 
you encountered. These issues will be fixed in the upcoming Drill 1.11 release.

Sharing a sample CSV file will let us check the issue. Even better, voting is 
open for the 1.11 release. Please go ahead and download it and try your file 
with that release. Let us know if you still have a problem.

Thanks,

- Paul

> On Jul 26, 2017, at 6:14 AM, Khurram Faraaz <kfar...@mapr.com> wrote:
> 
> Can you please share your CSV file, the SQL query and the version of Drill 
> that you are on. So someone can take a look and try to reproduce the error 
> that you are seeing.
> 
> 
> Thanks,
> 
> Khurram
> 
> 
> From: Divya Gehlot <divya.htco...@gmail.com>
> Sent: Wednesday, July 26, 2017 3:18:08 PM
> To: user@drill.apache.org
> Subject: regex replace in string
> 
> Hi,
> I have a CSV file where  column values are
> "This is the column,one "
> "This is column , two"
> column3
> column4
> 
> When I try to regex_replace it throws error
> 
> org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
>> IllegalArgumentException: reallocation size must be non-negative Fragment
>> 0:0
> 
> 
> How can I read the above columns as one string  like  This is the column
> one
> Appreciate the help
> 
> Thanks,
> Divyab



Re: regex replace in string

2017-07-26 Thread Khurram Faraaz
Can you please share your CSV file, the SQL query and the version of Drill that 
you are on. So someone can take a look and try to reproduce the error that you 
are seeing.


Thanks,

Khurram


From: Divya Gehlot <divya.htco...@gmail.com>
Sent: Wednesday, July 26, 2017 3:18:08 PM
To: user@drill.apache.org
Subject: regex replace in string

Hi,
I have a CSV file where  column values are
"This is the column,one "
"This is column , two"
column3
column4

When I try to regex_replace it throws error

org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
> IllegalArgumentException: reallocation size must be non-negative Fragment
> 0:0


How can I read the above columns as one string  like  This is the column
one
Appreciate the help

Thanks,
Divyab


regex replace in string

2017-07-26 Thread Divya Gehlot
Hi,
I have a CSV file where  column values are
"This is the column,one "
"This is column , two"
column3
column4

When I try to regex_replace it throws error

org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
> IllegalArgumentException: reallocation size must be non-negative Fragment
> 0:0


How can I read the above columns as one string  like  This is the column
one
Appreciate the help

Thanks,
Divyab