[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-10-10 Thread Rajeshbabu Chintaguntla (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15563612#comment-15563612
 ] 

Rajeshbabu Chintaguntla commented on PHOENIX-3242:
--

bq. does our FunctionResolver resolve built-in functions as well? 
No but we can tweak the code in PhoenixSchema to first check for built in 
functions and then resolve for UDFs. So that we need not worry about 
registering the methods as UDFs. 

bq.You also need to check how well view extension columns are supported in 
Calcite-Phoenix. If the scope is too large, let's simply open another JIRA for 
view upsert.
I think we need to chance create view parsing as well better to work as 
separate JIRA [~maryannxue]. Will raise and work on it.

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
>  Labels: calcite
> Attachments: PHOENIX-3242-WIP-2.patch, PHOENIX-3242-wip.patch, 
> PHOENIX-3242_select-wip.patch, PHOENIX-3242_v1.patch, PHOENIX-3242_v2.patch, 
> PHOENIX-3242_v3.patch, PHOENIX-3242_v4.patch, PHOENIX-3242_v5.patch, 
> PHOENIX-3242_v6.patch, PHOENIX-3242_v7.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-10-10 Thread Maryann Xue (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15563568#comment-15563568
 ] 

Maryann Xue commented on PHOENIX-3242:
--

You also need to check how well view extension columns are supported in 
Calcite-Phoenix. If the scope is too large, let's simply open another JIRA for 
view upsert.

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
>  Labels: calcite
> Attachments: PHOENIX-3242-WIP-2.patch, PHOENIX-3242-wip.patch, 
> PHOENIX-3242_select-wip.patch, PHOENIX-3242_v1.patch, PHOENIX-3242_v2.patch, 
> PHOENIX-3242_v3.patch, PHOENIX-3242_v4.patch, PHOENIX-3242_v5.patch, 
> PHOENIX-3242_v6.patch, PHOENIX-3242_v7.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-10-10 Thread Maryann Xue (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15563560#comment-15563560
 ] 

Maryann Xue commented on PHOENIX-3242:
--

Thank you very much, [~rajeshbabu]! One question though, does our 
FunctionResolver resolve built-in functions as well? If yes, PHOENIX-3355 
should already be done.

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
>  Labels: calcite
> Attachments: PHOENIX-3242-WIP-2.patch, PHOENIX-3242-wip.patch, 
> PHOENIX-3242_select-wip.patch, PHOENIX-3242_v1.patch, PHOENIX-3242_v2.patch, 
> PHOENIX-3242_v3.patch, PHOENIX-3242_v4.patch, PHOENIX-3242_v5.patch, 
> PHOENIX-3242_v6.patch, PHOENIX-3242_v7.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-10-10 Thread Rajeshbabu Chintaguntla (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15563444#comment-15563444
 ] 

Rajeshbabu Chintaguntla commented on PHOENIX-3242:
--

[~maryannxue] Thanks for review. I have separated the patch into PHOENIX-3242 
and PHOENIX-3351 committed PHOENIX-3242. Handled review comments like reverted 
unnecessary changes.
[~lomoree] you can continue making built-in methods as udfs.

bq. Also, I think what Julian Hyde mentioned as the named parameter and default 
parameter interface this morning is in PhoenixScalarFunction already, which is 
an implementation class for Calcite's ScalarFunction.
I will check this [~maryannxue].

Thanks

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
>  Labels: calcite
> Attachments: PHOENIX-3242-WIP-2.patch, PHOENIX-3242-wip.patch, 
> PHOENIX-3242_select-wip.patch, PHOENIX-3242_v1.patch, PHOENIX-3242_v2.patch, 
> PHOENIX-3242_v3.patch, PHOENIX-3242_v4.patch, PHOENIX-3242_v5.patch, 
> PHOENIX-3242_v6.patch, PHOENIX-3242_v7.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-10-06 Thread Maryann Xue (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15553369#comment-15553369
 ] 

Maryann Xue commented on PHOENIX-3242:
--

Thank you very much, for your nice work, [~rajeshbabu]! I have probably created 
some misunderstandings here by making test case changes in my own patch. The 
goal is to implement missing feature and to fix bugs in Calcite-Phoenix and 
it's ok that even after we have fixed certain things, some related test case 
still do not work, for some other reasons. So basically we don't change test 
cases just to let them pass, unless we know that they are issues with test 
cases themselves, like using "date" as column names. I've noticed that there 
are some changes in UserDefinedFunctionsIT that you made in order to run the 
tests with Calcite-Phoenix driver instead of the old driver, such as changing 
URLs, adding properties, etc. But there are also some other changes that are 
supposed to cover Calcite-Phoenix bugs, like checking Exceptions. That said, 
could you please do two things before checking in?
1. Revert the unnecessary changes in UserDefinedFunctionsIT.java. The Exception 
issue has been addressed by https://issues.apache.org/jira/browse/PHOENIX-3345.
2. Split your patch into PHOENIX-3242 and PHOENIX-3351. Submit to PHOENIX-3351 
and I'll review that separately. Then please go ahead and check-in for this 
issue. It looks good to me.
 
Also, I think what [~julianhyde] mentioned as the named parameter and default 
parameter interface this morning is in PhoenixScalarFunction already, which is 
an implementation class for Calcite's ScalarFunction.

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
>  Labels: calcite
> Attachments: PHOENIX-3242-WIP-2.patch, PHOENIX-3242-wip.patch, 
> PHOENIX-3242_select-wip.patch, PHOENIX-3242_v1.patch, PHOENIX-3242_v2.patch, 
> PHOENIX-3242_v3.patch, PHOENIX-3242_v4.patch, PHOENIX-3242_v5.patch, 
> PHOENIX-3242_v6.patch, PHOENIX-3242_v7.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-09-30 Thread Maryann Xue (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15536887#comment-15536887
 ] 

Maryann Xue commented on PHOENIX-3242:
--

[~rajeshbabu], turns out that the UPSERT issue and the DROP FUNCTION issue is 
both due to PHOENIX-3341. I applied a quick fix for UPSERT but couldn't fix 
DROP FUNCTION. So please revert the changes I had made in my patch in 
UserDefinedFunctionsIT#testUDFsWithMultipleConnections.

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
>  Labels: calcite
> Attachments: PHOENIX-3242-WIP-2.patch, PHOENIX-3242-wip.patch, 
> PHOENIX-3242_select-wip.patch, PHOENIX-3242_v1.patch, PHOENIX-3242_v2.patch, 
> PHOENIX-3242_v3.patch, PHOENIX-3242_v4.patch, PHOENIX-3242_v5.patch, 
> PHOENIX-3242_v6.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-09-29 Thread Rajeshbabu Chintaguntla (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15535214#comment-15535214
 ] 

Rajeshbabu Chintaguntla commented on PHOENIX-3242:
--

[~maryannxue] Thanks for updated patch. 
bq. the single quotes surrounding the class name and the jar path should be 
trimmed when you create the function node, otherwise you'd run into trouble at 
a later stage.
Yes I also found this. Will fix it in parsing stage itself.

bq. So could you please go through this new patch again and see if there's 
anything that needs to be refined?
Definitely I will check and fix them.

Thanks,
Rajeshbabu.

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
>  Labels: calcite
> Attachments: PHOENIX-3242-WIP-2.patch, PHOENIX-3242-wip.patch, 
> PHOENIX-3242_select-wip.patch, PHOENIX-3242_v1.patch, PHOENIX-3242_v2.patch, 
> PHOENIX-3242_v3.patch, PHOENIX-3242_v4.patch, PHOENIX-3242_v5.patch, 
> PHOENIX-3242_v6.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-09-29 Thread Maryann Xue (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15534432#comment-15534432
 ] 

Maryann Xue commented on PHOENIX-3242:
--

Thank you, [~rajeshbabu], for the WIP patch! I have a quick conclusion here:
As [~julianhyde] mentioned this morning, making UDF work takes two stages: sql 
validation and runtime method call. I tried running the test case you pointed 
out and found that it could not even go through the first stage, validation. 
And the reason was that you re-used ScalarFunctionImpl from Calcite and passed 
"evaluate()" as the method while its signature was not matchable for 
"myfunction(varchar)" at all. The most straight-forward solution is to have our 
own implementation class for Function and give it whatever information we'll 
need at runtime, including tenant id, JAR path, UDF class name, etc. Then in 
CalciteUtils, when translating SqlKind.OTHER_FUNCTION, for 
{{SqlUserDefinedFunction}} SqlOperator, you'll unwrap our own implementation 
class and create a corresponding Phoenix UDFExpression.

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
>  Labels: calcite
> Attachments: PHOENIX-3242-wip.patch, PHOENIX-3242_select-wip.patch, 
> PHOENIX-3242_v1.patch, PHOENIX-3242_v2.patch, PHOENIX-3242_v3.patch, 
> PHOENIX-3242_v4.patch, PHOENIX-3242_v5.patch, PHOENIX-3242_v6.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-09-22 Thread Rajeshbabu Chintaguntla (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15512529#comment-15512529
 ] 

Rajeshbabu Chintaguntla commented on PHOENIX-3242:
--

Uploaded the patch handling review comments.
[~julianhyde]
bq. In this case "ALTER SYSTEM ADD JAR ..." seems about right.
I tried to change the COPY JAR query to ALTER SYSTEM ADD JAR but the query 
parsing is failing because calcite already have ALTER SYTEM statements to 
set/reset connection properties. So as of now changed it to UPLOAD JARS as 
[~jamestaylor] suggested.
bq. I'm not sure I like the idea of copy-pasting SqlParserTest from Calcite 
into Phoenix. It will break fairly often. Is it possible to create a sub-class 
of the test instead? 
In the latest patch extended SqlParserTest and added test for ddl statements. 

If I get +1 will rebase to latest code and commit it.
Ping [~maryannxue]

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
>  Labels: calcite
> Attachments: PHOENIX-3242-wip.patch, PHOENIX-3242_v1.patch, 
> PHOENIX-3242_v2.patch, PHOENIX-3242_v3.patch, PHOENIX-3242_v4.patch, 
> PHOENIX-3242_v5.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-09-14 Thread James Taylor (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15490723#comment-15490723
 ] 

James Taylor commented on PHOENIX-3242:
---

Good idea, [~julianhyde]. If you agree, let's do it that way, [~rajeshbabu] & 
[~maryannxue] and make these syntax changes (along with changing the syntax of 
UPDATE STATISTICS as Julian suggested before - can't seem to be able to find 
that comment just now).

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
>  Labels: calcite
> Attachments: PHOENIX-3242-wip.patch, PHOENIX-3242_v1.patch, 
> PHOENIX-3242_v2.patch, PHOENIX-3242_v3.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-09-12 Thread Julian Hyde (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15486350#comment-15486350
 ] 

Julian Hyde commented on PHOENIX-3242:
--

[~jamestaylor], Do what Oracle does: never add a new verb, always use one of 
the existing verbs. In this case "ALTER SYSTEM ADD JAR ..." seems about right.

[~rajeshbabu], I'm not sure I like the idea of copy-pasting SqlParserTest from 
Calcite into Phoenix. It will break fairly often. Is it possible to create a 
sub-class of the test instead? (Maybe that would require restructuring of 
Calcite code. But we can talk about that.)

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
>  Labels: calcite
> Attachments: PHOENIX-3242-wip.patch, PHOENIX-3242_v1.patch, 
> PHOENIX-3242_v2.patch, PHOENIX-3242_v3.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-09-12 Thread James Taylor (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15485869#comment-15485869
 ] 

James Taylor commented on PHOENIX-3242:
---

Any advice for us [~julianhyde] for syntax to use for these Phoenix specific 
commands? These commands in particular are to manage uploading the local jar 
containing the UDF implementation into HDFS so that the UDFs can be called from 
Phoenix statements. If ADD is a keyword, in theory couldn't we have an ADD JARS 
command? Not crazy about using COPY JARS as the name of the command, 
[~rajeshbabu], but don't let that impede your progress. Maybe UPLOAD JARS?

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
>  Labels: calcite
> Attachments: PHOENIX-3242-wip.patch, PHOENIX-3242_v1.patch, 
> PHOENIX-3242_v2.patch, PHOENIX-3242_v3.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-09-12 Thread Maryann Xue (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15485632#comment-15485632
 ] 

Maryann Xue commented on PHOENIX-3242:
--

The patch looks good, [~rajeshbabu]! Thank you very much! So now we can go 
ahead and move on to the UDF integration part, right? One minor thing, why has 
the "@Ignore" tag been removed from testUpdateStatistics()? It should not work 
for the same reason that "add jars" wouldn't work.

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
>  Labels: calcite
> Attachments: PHOENIX-3242-wip.patch, PHOENIX-3242_v1.patch, 
> PHOENIX-3242_v2.patch, PHOENIX-3242_v3.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-09-06 Thread Rajeshbabu Chintaguntla (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15466953#comment-15466953
 ] 

Rajeshbabu Chintaguntla commented on PHOENIX-3242:
--

The reason for the failure is when we implement create function as OTHER_DDL 
type we are going to validate the identifiers used in the query from catalog 
table that's why getting the above exception. So raised CALCITE-1370 in calcite 
to add OTHER_DDL enum value to DDL enum set.

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
> Attachments: PHOENIX-3242-wip.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-09-02 Thread Rajeshbabu Chintaguntla (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15460202#comment-15460202
 ] 

Rajeshbabu Chintaguntla commented on PHOENIX-3242:
--

[~maryannxue] 
The test is not passing. It's failing with SqlValidatorException. Checking 
what's the reason for this. It's same with testUpdateStatistics as well? Do you 
have any idea?
{noformat}
CalciteDDLIT.testCreateFunction
testCreateFunction(org.apache.phoenix.calcite.CalciteDDLIT)
java.sql.SQLException: Error while executing SQL "create function 
myreverse(VARCHAR) returns VARCHAR as 'org.apache.phoenix.end2end.MyReverse' 
using jar 'hdfs://localhost:51573/hbase/tmpjars/myjar1.jar'": From line 1, 
column 17 to line 1, column 25: Column 'MYREVERSE' not found in any table
at org.apache.calcite.avatica.Helper.createException(Helper.java:56)
at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
at 
org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:147)
at 
org.apache.calcite.avatica.AvaticaStatement.execute(AvaticaStatement.java:199)
at 
org.apache.phoenix.calcite.BaseCalciteIT$Sql.execute(BaseCalciteIT.java:179)
at 
org.apache.phoenix.calcite.CalciteDDLIT.testCreateFunction(CalciteDDLIT.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.apache.calcite.runtime.CalciteContextException: From line 1, 
column 17 to line 1, column 25: Column 'MYREVERSE' not found in any table
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at 
org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:405)
at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:799)
at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:784)
at 
org.apache.calcite.sql.validate.SqlValidatorImpl.newValidationError(SqlValidatorImpl.java:4049)
at 
org.apache.calcite.sql.validate.EmptyScope.findQualifyingTableName(EmptyScope.java:108)
at 
org.apache.calcite.sql.validate.DelegatingScope.findQualifyingTableName(DelegatingScope.java:113)
at 
org.apache.calcite.sql.validate.DelegatingScope.fullyQualify(DelegatingScope.java:156)
 

[jira] [Commented] (PHOENIX-3242) Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration

2016-09-02 Thread Maryann Xue (JIRA)

[ 
https://issues.apache.org/jira/browse/PHOENIX-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15459944#comment-15459944
 ] 

Maryann Xue commented on PHOENIX-3242:
--

Thanks for the patch, [~rajeshbabu]! Did the test case pass? I think at this 
stage you can skip the unparse logic at all, which aren't implemented by most 
of the other SqlCall nodes either.

> Support CREATE OR REPLACE FUNCTION in Phoenix-Calcite Integration
> -
>
> Key: PHOENIX-3242
> URL: https://issues.apache.org/jira/browse/PHOENIX-3242
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
> Attachments: PHOENIX-3242-wip.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)