[jira] [Commented] (CALCITE-4887) Filter subQuery remove not fully optimized

2021-11-17 Thread bingfeng.guo (Jira)


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

bingfeng.guo commented on CALCITE-4887:
---

https://issues.apache.org/jira/browse/CALCITE-2071  I found that an issue is 
more related to my problem

> Filter subQuery remove not fully optimized
> --
>
> Key: CALCITE-4887
> URL: https://issues.apache.org/jira/browse/CALCITE-4887
> Project: Calcite
>  Issue Type: Improvement
>Reporter: bingfeng.guo
>Assignee: bingfeng.guo
>Priority: Major
>
> for example:
> {quote}SELECT 
>   count(1) 
> FROM 
>   SSB.P_LINEORDER as P_LINEORDER 
>   LEFT JOIN SSB.PART as PART ON P_LINEORDER.LO_PARTKEY = PART.P_PARTKEY 
>   LEFT JOIN SSB.DATES as DATES ON P_LINEORDER.LO_ORDERDATE = DATES.D_DATEKEY 
>   LEFT JOIN SSB.CUSTOMER as CUSTOMER ON P_LINEORDER.LO_CUSTKEY = 
> CUSTOMER.C_CUSTKEY 
>   LEFT JOIN SSB.SUPPLIER as SUPPLIER ON P_LINEORDER.LO_SUPPKEY = 
> SUPPLIER.S_SUPPKEY 
> WHERE 
>   P_LINEORDER.LO_ORDERDATE = '1992-01-01' 
>   or (
>     P_LINEORDER.LO_ORDERDATE in (
>       select 
>         D_DATEKEY 
>       from 
>         SSB.DATES 
>       where 
>         DATES.D_DATEKEY = '1992-01-01'
>     )
>   ) 
> LIMIT 
>   500
> {quote}
>  
> plan is
>  
> {quote}LimitRel(ctx=[], fetch=[500])
>     AggregateRel(group-set=[[]], groups=[null], EXPR$0=[COUNT()])
>       ProjectRel(ctx=[])
>         FilterRel(condition=[OR(=($5, 1992-01-01), CAST(AND(IS NOT NULL($65), 
> <>($62, 0))):BOOLEAN)])
>           JoinRel(condition=[=($5, $64)], joinType=[left])
>             JoinRel(condition=[true], joinType=[inner])
>               JoinRel(condition=[=($4, $55)], joinType=[left])
>                 JoinRel(condition=[=($2, $47)], joinType=[left])
>                   JoinRel(condition=[=($5, $30)], joinType=[left])
>                     JoinRel(condition=[=($3, $21)], joinType=[left])
>                       TableScan(table=[[SSB, P_LINEORDER]], fields=[[0, 1, 2, 
> 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]])
>                       TableScan(table=[[SSB, PART]], fields=[[0, 1, 2, 3, 4, 
> 5, 6, 7, 8]])
>                     TableScan(table=[[SSB, DATES]], fields=[[0, 1, 2, 3, 4, 
> 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]])
>                   TableScan(table=[[SSB, CUSTOMER]], fields=[[0, 1, 2, 3, 4, 
> 5, 6, 7]])
>                 TableScan(table=[[SSB, SUPPLIER]], fields=[[0, 1, 2, 3, 4, 5, 
> 6]])
>               AggregateRel(group-set=[[]], groups=[null], c=[COUNT()], 
> ck=[COUNT($0)])
>                 ProjectRel(D_DATEKEY=[$0])
>                   FilterRel(condition=[=($0, 1992-01-01)])
>                     TableScan(table=[[SSB, DATES]], fields=[[0, 1, 2, 3, 4, 
> 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]])
>             AggregateRel(group-set=[[0, 1]], groups=[null])
>               ProjectRel(D_DATEKEY=[$0], i=[true])
>                 FilterRel(condition=[=($0, 1992-01-01)])
>                   TableScan(table=[[SSB, DATES]], fields=[[0, 1, 2, 3, 4, 5, 
> 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]])
> {quote}
>  
>  
> But the optimal plan should be
> {quote} 
> LimitRel(fetch=[500])
>     AggregateRel(group-set=[[]], groups=[null], EXPR$0=[COUNT()])
>       ProjectRel(ctx=[])
>         FilterRel(condition=[=($5, 1992-01-01)])
>           JoinRel(condition=[=($5, $62)], joinType=[inner])
>             JoinRel(condition=[=($4, $55)], joinType=[left])
>               JoinRel(condition=[=($2, $47)], joinType=[left])
>                 JoinRel(condition=[=($5, $30)], joinType=[left])
>                   JoinRel(condition=[=($3, $21)], joinType=[left])
>                     TableScan(table=[[SSB, P_LINEORDER]], fields=[[0, 1, 2, 
> 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]])
>                     TableScan(table=[[SSB, PART]], fields=[[0, 1, 2, 3, 4, 5, 
> 6, 7, 8]])
>                   TableScan(table=[[SSB, DATES]], fields=[[0, 1, 2, 3, 4, 5, 
> 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]])
>                 TableScan(table=[[SSB, CUSTOMER]], fields=[[0, 1, 2, 3, 4, 5, 
> 6, 7]])
>               TableScan(table=[[SSB, SUPPLIER]], fields=[[0, 1, 2, 3, 4, 5, 
> 6]])
>             AggregateRel(group-set=[[0]], groups=[null])
>               ProjectRel(D_DATEKEY=[$0])
>                 FilterRel(condition=[=($0, 1992-01-01)])
>                   TableScan(table=[[SSB, DATES]], fields=[[0, 1, 2, 3, 4, 5, 
> 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]])
>  
> {quote}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (CALCITE-4884) Provide a new constructor for RelJsonWriter to allow customized JsonBuilder

2021-11-17 Thread Stamatis Zampetakis (Jira)


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

Stamatis Zampetakis commented on CALCITE-4884:
--

Thanks [~Chunwei Lei]. Can you elaborate a bit more what kind of escape 
characters you want to handle and why we want to allow every user to specify 
their own logic.

> Provide a new constructor for RelJsonWriter to allow customized JsonBuilder
> ---
>
> Key: CALCITE-4884
> URL: https://issues.apache.org/jira/browse/CALCITE-4884
> Project: Calcite
>  Issue Type: Improvement
>Reporter: Chunwei Lei
>Assignee: Chunwei Lei
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.29.0
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Currently JsonBuilder in RelJsonWriter cannot be customized due to it being 
> created in the constructor.  We can provide a new constructor for 
> RelJsonWriter to allow customized JsonBuilder.
> {code:java}
> // code placeholder
> public RelJsonWriter() {
>   jsonBuilder = new JsonBuilder();
>   relList = jsonBuilder.list();
>   relJson = new RelJson(jsonBuilder);
> }
> // the new constrctor suggested.
> public RelJsonWriter(JsonBuilder jsonBuilder) {
>   this.jsonBuilder = jsonBuilder;
>   relList = jsonBuilder.list();
>   relJson = new RelJson(jsonBuilder);
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Created] (CALCITE-4890) Enable mavenLocal for sqlline

2021-11-17 Thread Sergey Nuyanzin (Jira)
Sergey Nuyanzin created CALCITE-4890:


 Summary: Enable mavenLocal for sqlline 
 Key: CALCITE-4890
 URL: https://issues.apache.org/jira/browse/CALCITE-4890
 Project: Calcite
  Issue Type: Bug
Reporter: Sergey Nuyanzin


currently with enabled {{enableMavenLocal=true}} it fails 
with
{noformat}
Build calcite FAILURE reason:
Execution failed for task ':buildSqllineClasspath':

org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException:
 Could not resolve all files for configuration ':sqllineClasspath'.
at 
org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.rethrowFailure(DefaultConfiguration.java:1423)
at 
org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access$3600(DefaultConfiguration.java:152)
at 
org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$DefaultResolutionHost.rethrowFailure(DefaultConfiguration.java:2035)
at 
org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.visitContents(DefaultConfiguration.java:1395)
at 
org.gradle.api.internal.file.AbstractFileCollection.getFiles(AbstractFileCollection.java:130)
at 
org.gradle.api.internal.file.AbstractFileCollection.iterator(AbstractFileCollection.java:176)
at 
org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.iterator(DefaultConfiguration.java:493)
at 
kotlin.collections.CollectionsKt___CollectionsKt.joinTo(_Collections.kt:3341)
at 
kotlin.collections.CollectionsKt___CollectionsKt.joinToString(_Collections.kt:3361)
at 
kotlin.collections.CollectionsKt___CollectionsKt.joinToString$default(_Collections.kt:3360)
at 
Build_gradle$buildSqllineClasspath$2$1$1.call(build.gradle.kts:231)
at 
Build_gradle$buildSqllineClasspath$2$1$1.call(build.gradle.kts:30)
at 
org.gradle.api.internal.provider.DefaultProvider.calculateOwnValue(DefaultProvider.java:66)
at 
org.gradle.api.internal.provider.AbstractMinimalProvider.calculatePresence(AbstractMinimalProvider.java:79)
at 
org.gradle.api.internal.provider.AbstractMinimalProvider.isPresent(AbstractMinimalProvider.java:74)
at 
org.gradle.api.java.archives.internal.DefaultManifest.resolveValueToString(DefaultManifest.java:171)
at 
org.gradle.api.java.archives.internal.DefaultManifest.fillAttributes(DefaultManifest.java:160)
at 
org.gradle.api.java.archives.internal.DefaultManifest.addMainAttributesToJavaManifest(DefaultManifest.java:145)
at 
org.gradle.api.java.archives.internal.DefaultManifest.generateJavaManifest(DefaultManifest.java:139)
at 
org.gradle.api.java.archives.internal.DefaultManifest.writeTo(DefaultManifest.java:219)
at 
org.gradle.api.java.archives.internal.DefaultManifest.writeTo(DefaultManifest.java:213)
at 
org.gradle.jvm.tasks.Jar.lambda$manifestFileTree$b030d21f$1(Jar.java:74)
at 
org.gradle.api.internal.file.collections.GeneratedSingletonFileTree$FileVisitDetailsImpl.copyTo(GeneratedSingletonFileTree.java:196)
at 
org.gradle.api.internal.file.collections.GeneratedSingletonFileTree$FileVisitDetailsImpl.generateContent(GeneratedSingletonFileTree.java:174)
at 
org.gradle.api.internal.file.collections.GeneratedSingletonFileTree$FileVisitDetailsImpl.updateFileOnlyWhenGeneratedContentChanges(GeneratedSingletonFileTree.java:161)
at 
org.gradle.api.internal.file.collections.GeneratedSingletonFileTree$FileVisitDetailsImpl.getFile(GeneratedSingletonFileTree.java:149)
at 
org.gradle.api.internal.file.collections.GeneratedSingletonFileTree.getFile(GeneratedSingletonFileTree.java:91)
at 
org.gradle.api.internal.file.collections.GeneratedSingletonFileTree.visitStructure(GeneratedSingletonFileTree.java:109)
at 
org.gradle.api.internal.file.collections.FileTreeAdapter.visitContents(FileTreeAdapter.java:101)
at 
org.gradle.api.internal.file.AbstractFileCollection.visitStructure(AbstractFileCollection.java:330)
at 
org.gradle.api.internal.file.CompositeFileCollection.lambda$visitContents$0(CompositeFileCollection.java:119)
at 
org.gradle.api.internal.file.collections.UnpackingVisitor.add(UnpackingVisitor.java:64)
at 
org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection$UnresolvedItemsCollector.visitContents(DefaultConfigurableFileCollection.java:372)
at 
org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection.visitChildren(DefaultConfigurableFileCollection.java:284)
at 
org.gradle.api.internal.file.CompositeFileCollection.visitContents(CompositeFile

[jira] [Commented] (CALCITE-4890) Enable mavenLocal for sqlline

2021-11-17 Thread Vladimir Sitnikov (Jira)


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

Vladimir Sitnikov commented on CALCITE-4890:


I would inline to
a) allow passing custom arguments to Gradle build, so the ones who need 
mavenLocal would pass -PenableMavenLocal or something like that
b) allow custom local.properties feature (e.g. Gradle properties relevant for 
the local clone)

Both would allow overriding dependency versions and keep git sources unmodified.

> Enable mavenLocal for sqlline 
> --
>
> Key: CALCITE-4890
> URL: https://issues.apache.org/jira/browse/CALCITE-4890
> Project: Calcite
>  Issue Type: Bug
>Reporter: Sergey Nuyanzin
>Priority: Major
>
> currently with enabled {{enableMavenLocal=true}} it fails 
> with
> {noformat}
> Build calcite FAILURE reason:
> Execution failed for task ':buildSqllineClasspath':
> 
> org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException:
>  Could not resolve all files for configuration ':sqllineClasspath'.
> at 
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.rethrowFailure(DefaultConfiguration.java:1423)
> at 
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access$3600(DefaultConfiguration.java:152)
> at 
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$DefaultResolutionHost.rethrowFailure(DefaultConfiguration.java:2035)
> at 
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.visitContents(DefaultConfiguration.java:1395)
> at 
> org.gradle.api.internal.file.AbstractFileCollection.getFiles(AbstractFileCollection.java:130)
> at 
> org.gradle.api.internal.file.AbstractFileCollection.iterator(AbstractFileCollection.java:176)
> at 
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.iterator(DefaultConfiguration.java:493)
> at 
> kotlin.collections.CollectionsKt___CollectionsKt.joinTo(_Collections.kt:3341)
> at 
> kotlin.collections.CollectionsKt___CollectionsKt.joinToString(_Collections.kt:3361)
> at 
> kotlin.collections.CollectionsKt___CollectionsKt.joinToString$default(_Collections.kt:3360)
> at 
> Build_gradle$buildSqllineClasspath$2$1$1.call(build.gradle.kts:231)
> at 
> Build_gradle$buildSqllineClasspath$2$1$1.call(build.gradle.kts:30)
> at 
> org.gradle.api.internal.provider.DefaultProvider.calculateOwnValue(DefaultProvider.java:66)
> at 
> org.gradle.api.internal.provider.AbstractMinimalProvider.calculatePresence(AbstractMinimalProvider.java:79)
> at 
> org.gradle.api.internal.provider.AbstractMinimalProvider.isPresent(AbstractMinimalProvider.java:74)
> at 
> org.gradle.api.java.archives.internal.DefaultManifest.resolveValueToString(DefaultManifest.java:171)
> at 
> org.gradle.api.java.archives.internal.DefaultManifest.fillAttributes(DefaultManifest.java:160)
> at 
> org.gradle.api.java.archives.internal.DefaultManifest.addMainAttributesToJavaManifest(DefaultManifest.java:145)
> at 
> org.gradle.api.java.archives.internal.DefaultManifest.generateJavaManifest(DefaultManifest.java:139)
> at 
> org.gradle.api.java.archives.internal.DefaultManifest.writeTo(DefaultManifest.java:219)
> at 
> org.gradle.api.java.archives.internal.DefaultManifest.writeTo(DefaultManifest.java:213)
> at 
> org.gradle.jvm.tasks.Jar.lambda$manifestFileTree$b030d21f$1(Jar.java:74)
> at 
> org.gradle.api.internal.file.collections.GeneratedSingletonFileTree$FileVisitDetailsImpl.copyTo(GeneratedSingletonFileTree.java:196)
> at 
> org.gradle.api.internal.file.collections.GeneratedSingletonFileTree$FileVisitDetailsImpl.generateContent(GeneratedSingletonFileTree.java:174)
> at 
> org.gradle.api.internal.file.collections.GeneratedSingletonFileTree$FileVisitDetailsImpl.updateFileOnlyWhenGeneratedContentChanges(GeneratedSingletonFileTree.java:161)
> at 
> org.gradle.api.internal.file.collections.GeneratedSingletonFileTree$FileVisitDetailsImpl.getFile(GeneratedSingletonFileTree.java:149)
> at 
> org.gradle.api.internal.file.collections.GeneratedSingletonFileTree.getFile(GeneratedSingletonFileTree.java:91)
> at 
> org.gradle.api.internal.file.collections.GeneratedSingletonFileTree.visitStructure(GeneratedSingletonFileTree.java:109)
> at 
> org.gradle.api.internal.file.collections.FileTreeAdapter.visitContents(FileTreeAdapter.java:101)
> at 
> org.gradle.api.internal.file.AbstractFile

[jira] [Commented] (CALCITE-4890) Enable mavenLocal for sqlline

2021-11-17 Thread Sergey Nuyanzin (Jira)


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

Sergey Nuyanzin commented on CALCITE-4890:
--

then I think for at least sqlline need to rework sqlline and sqlline.bat to 
differentiate input args for gradle and for sqlline itself
I can have a look in this direction and come back later

> Enable mavenLocal for sqlline 
> --
>
> Key: CALCITE-4890
> URL: https://issues.apache.org/jira/browse/CALCITE-4890
> Project: Calcite
>  Issue Type: Bug
>Reporter: Sergey Nuyanzin
>Priority: Major
>
> currently with enabled {{enableMavenLocal=true}} it fails 
> with
> {noformat}
> Build calcite FAILURE reason:
> Execution failed for task ':buildSqllineClasspath':
> 
> org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException:
>  Could not resolve all files for configuration ':sqllineClasspath'.
> at 
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.rethrowFailure(DefaultConfiguration.java:1423)
> at 
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access$3600(DefaultConfiguration.java:152)
> at 
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$DefaultResolutionHost.rethrowFailure(DefaultConfiguration.java:2035)
> at 
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.visitContents(DefaultConfiguration.java:1395)
> at 
> org.gradle.api.internal.file.AbstractFileCollection.getFiles(AbstractFileCollection.java:130)
> at 
> org.gradle.api.internal.file.AbstractFileCollection.iterator(AbstractFileCollection.java:176)
> at 
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.iterator(DefaultConfiguration.java:493)
> at 
> kotlin.collections.CollectionsKt___CollectionsKt.joinTo(_Collections.kt:3341)
> at 
> kotlin.collections.CollectionsKt___CollectionsKt.joinToString(_Collections.kt:3361)
> at 
> kotlin.collections.CollectionsKt___CollectionsKt.joinToString$default(_Collections.kt:3360)
> at 
> Build_gradle$buildSqllineClasspath$2$1$1.call(build.gradle.kts:231)
> at 
> Build_gradle$buildSqllineClasspath$2$1$1.call(build.gradle.kts:30)
> at 
> org.gradle.api.internal.provider.DefaultProvider.calculateOwnValue(DefaultProvider.java:66)
> at 
> org.gradle.api.internal.provider.AbstractMinimalProvider.calculatePresence(AbstractMinimalProvider.java:79)
> at 
> org.gradle.api.internal.provider.AbstractMinimalProvider.isPresent(AbstractMinimalProvider.java:74)
> at 
> org.gradle.api.java.archives.internal.DefaultManifest.resolveValueToString(DefaultManifest.java:171)
> at 
> org.gradle.api.java.archives.internal.DefaultManifest.fillAttributes(DefaultManifest.java:160)
> at 
> org.gradle.api.java.archives.internal.DefaultManifest.addMainAttributesToJavaManifest(DefaultManifest.java:145)
> at 
> org.gradle.api.java.archives.internal.DefaultManifest.generateJavaManifest(DefaultManifest.java:139)
> at 
> org.gradle.api.java.archives.internal.DefaultManifest.writeTo(DefaultManifest.java:219)
> at 
> org.gradle.api.java.archives.internal.DefaultManifest.writeTo(DefaultManifest.java:213)
> at 
> org.gradle.jvm.tasks.Jar.lambda$manifestFileTree$b030d21f$1(Jar.java:74)
> at 
> org.gradle.api.internal.file.collections.GeneratedSingletonFileTree$FileVisitDetailsImpl.copyTo(GeneratedSingletonFileTree.java:196)
> at 
> org.gradle.api.internal.file.collections.GeneratedSingletonFileTree$FileVisitDetailsImpl.generateContent(GeneratedSingletonFileTree.java:174)
> at 
> org.gradle.api.internal.file.collections.GeneratedSingletonFileTree$FileVisitDetailsImpl.updateFileOnlyWhenGeneratedContentChanges(GeneratedSingletonFileTree.java:161)
> at 
> org.gradle.api.internal.file.collections.GeneratedSingletonFileTree$FileVisitDetailsImpl.getFile(GeneratedSingletonFileTree.java:149)
> at 
> org.gradle.api.internal.file.collections.GeneratedSingletonFileTree.getFile(GeneratedSingletonFileTree.java:91)
> at 
> org.gradle.api.internal.file.collections.GeneratedSingletonFileTree.visitStructure(GeneratedSingletonFileTree.java:109)
> at 
> org.gradle.api.internal.file.collections.FileTreeAdapter.visitContents(FileTreeAdapter.java:101)
> at 
> org.gradle.api.internal.file.AbstractFileCollection.visitStructure(AbstractFileCollection.java:330)
> at 
> org.gradle.api.internal.file.CompositeFileCollection.lambda$vi

[jira] [Created] (CALCITE-4891) Avatica can't handle uuid fields saying 'Cannot handle class java.util.UUID as bytes'

2021-11-17 Thread Jamie Taylor (Jira)
Jamie Taylor created CALCITE-4891:
-

 Summary: Avatica can't handle uuid fields saying 'Cannot handle 
class java.util.UUID as bytes'
 Key: CALCITE-4891
 URL: https://issues.apache.org/jira/browse/CALCITE-4891
 Project: Calcite
  Issue Type: Bug
  Components: avatica
Affects Versions: avatica-1.19.0
Reporter: Jamie Taylor


When I try and fetch a value of type UUID through an avatica proxy I get an 
error saying 'Cannot handle class java.util.UUID as bytes'

If I change the serilisation from json to protobuf I still get the exact same 
error.

Other types that aren't supported such as blob give messages saying they aren't 
supported, which makes this look like a bug.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (CALCITE-4891) Avatica can't handle uuid fields saying 'Cannot handle class java.util.UUID as bytes'

2021-11-17 Thread Josh Elser (Jira)


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

Josh Elser commented on CALCITE-4891:
-

Yeah, I am inclined to agree with you, Jamie. We coerce the UUID to bytes (or a 
utf-8 string) when sending that over the wire, so this error sounds like we 
messed up the wrapping/unwrapping across the wire. Do you have any aspirations 
to try to fix this? Seeing if we can write a simple unit test would be a good 
start –  I would look at adding a test method to 
[RemoteMetaTest|https://github.com/apache/calcite-avatica/blob/master/server/src/test/java/org/apache/calcite/avatica/remote/RemoteMetaTest.java]

> Avatica can't handle uuid fields saying 'Cannot handle class java.util.UUID 
> as bytes'
> -
>
> Key: CALCITE-4891
> URL: https://issues.apache.org/jira/browse/CALCITE-4891
> Project: Calcite
>  Issue Type: Bug
>  Components: avatica
>Affects Versions: avatica-1.19.0
>Reporter: Jamie Taylor
>Priority: Major
>
> When I try and fetch a value of type UUID through an avatica proxy I get an 
> error saying 'Cannot handle class java.util.UUID as bytes'
> If I change the serilisation from json to protobuf I still get the exact same 
> error.
> Other types that aren't supported such as blob give messages saying they 
> aren't supported, which makes this look like a bug.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (CALCITE-4891) Avatica can't handle uuid fields saying 'Cannot handle class java.util.UUID as bytes'

2021-11-17 Thread Julian Hyde (Jira)


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

Julian Hyde commented on CALCITE-4891:
--

Do we have any tests for UUID fields? If not, this is basically a feature 
request, "Support UUID fields". I haven't checked the spec, but it seems 
reasonable to retrieve UUID fields (i.e. fields whose declared SQL type is 
UUID) as java.lang.String, java.util.UUID and byte[]. Any others?

> Avatica can't handle uuid fields saying 'Cannot handle class java.util.UUID 
> as bytes'
> -
>
> Key: CALCITE-4891
> URL: https://issues.apache.org/jira/browse/CALCITE-4891
> Project: Calcite
>  Issue Type: Bug
>  Components: avatica
>Affects Versions: avatica-1.19.0
>Reporter: Jamie Taylor
>Priority: Major
>
> When I try and fetch a value of type UUID through an avatica proxy I get an 
> error saying 'Cannot handle class java.util.UUID as bytes'
> If I change the serilisation from json to protobuf I still get the exact same 
> error.
> Other types that aren't supported such as blob give messages saying they 
> aren't supported, which makes this look like a bug.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Assigned] (CALCITE-4121) Avatica misplaces properties from URL while connecting

2021-11-17 Thread Josh Elser (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-4121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Josh Elser reassigned CALCITE-4121:
---

Assignee: Laksh Singla

> Avatica misplaces properties from URL while connecting
> --
>
> Key: CALCITE-4121
> URL: https://issues.apache.org/jira/browse/CALCITE-4121
> Project: Calcite
>  Issue Type: Bug
>  Components: avatica
>Affects Versions: avatica-1.17.0
>Reporter: Gian Merlino
>Assignee: Laksh Singla
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Avatica's driver goes through some effort to extract properties from the JDBC 
> URL, but then loses them because it doesn't pass them to the 
> {{OpenConnectionRequest}}: 
> https://github.com/apache/calcite-avatica/blob/4b7eee5bf430b916c7c07897b6f60d2b6b6dabb7/core/src/main/java/org/apache/calcite/avatica/remote/Driver.java#L163-L181.
> I think the fix should be passing {{conn.info}} instead of {{info}}, because 
> URL properties are added to {{conn.info}} in {{super.connect(url, info)}}.
> The fix looks simple enough — any suggestions on the best way to add tests 
> for it?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Created] (CALCITE-4892) Conversion from String in cursor accessors

2021-11-17 Thread Gregory Hart (Jira)
Gregory Hart created CALCITE-4892:
-

 Summary: Conversion from String in cursor accessors
 Key: CALCITE-4892
 URL: https://issues.apache.org/jira/browse/CALCITE-4892
 Project: Calcite
  Issue Type: Improvement
  Components: core
Reporter: Gregory Hart


Numeric accessors (such as LongAccessor) of the AbstractCursor class could 
automatically convert strings to the appropriate numeric type.

Also, I looked to see if I could instead easily provide my own accessor 
implementations in Calcite, but the cursor implementation is hardcoded in 
CalciteResultSet and is not easy to override.

An example where this would be useful is when using the JDBC adapter with 
PostgreSQL and Hibernate. Hibernate is expecting this conversion to happen in 
the driver and fails when Calcite throws an exception: cannot convert to long.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (CALCITE-4892) Conversion from String in cursor accessors

2021-11-17 Thread Gregory Hart (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-4892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gregory Hart updated CALCITE-4892:
--
Component/s: avatica
 (was: core)

> Conversion from String in cursor accessors
> --
>
> Key: CALCITE-4892
> URL: https://issues.apache.org/jira/browse/CALCITE-4892
> Project: Calcite
>  Issue Type: Improvement
>  Components: avatica
>Reporter: Gregory Hart
>Priority: Major
>
> Numeric accessors (such as LongAccessor) of the AbstractCursor class could 
> automatically convert strings to the appropriate numeric type.
> Also, I looked to see if I could instead easily provide my own accessor 
> implementations in Calcite, but the cursor implementation is hardcoded in 
> CalciteResultSet and is not easy to override.
> An example where this would be useful is when using the JDBC adapter with 
> PostgreSQL and Hibernate. Hibernate is expecting this conversion to happen in 
> the driver and fails when Calcite throws an exception: cannot convert to long.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)