[jira] [Commented] (CALCITE-4705) Support hints like /*+ skewjoin(a(c0, c1)) */
[ https://issues.apache.org/jira/browse/CALCITE-4705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17564604#comment-17564604 ] Haisheng Yuan commented on CALCITE-4705: I don't know any other databases that support skew join hint besides these two. > Support hints like /*+ skewjoin(a(c0, c1)) */ > - > > Key: CALCITE-4705 > URL: https://issues.apache.org/jira/browse/CALCITE-4705 > Project: Calcite > Issue Type: Improvement > Components: core >Affects Versions: 1.27.0 >Reporter: jibiyr >Assignee: jibiyr >Priority: Minor > > Dear community, > calcite parse support hint now,but it can not parse hint like follow, > _*select /*+ skewjoin(a(c0, c1)) */ * from T0 a join T1 b on a.c0 = b.c0,*_ > this is the bnf which is calcite supported now, > {code:java} > // > hint: > hintName > | hintName '(' hintOptions ')' > hintOptions: > hintKVOption [, hintKVOption ]* > | optionName [, optionName ]* > | optionValue [, optionValue ]* > hintKVOption: > optionName '=' stringLiteral > | stringLiteral '=' stringLiteral > optionValue: > stringLiteral > | numericLiteral > {code} > I think the hintOptions should support the expression pattern,like a(c0,c1). > And this pattern can be parsed by spark/presto now. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-4705) Support hints like /*+ skewjoin(a(c0, c1)) */
[ https://issues.apache.org/jira/browse/CALCITE-4705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17564541#comment-17564541 ] Jiajun Xie commented on CALCITE-4705: - In databricks: [https://docs.databricks.com/delta/join-performance/skew-join.html] The hint is named as *skew,* and the options contain string and number, calcite can't parse it. So I create new Jira ticket to disscuss. {code:java} SELECT /*+ SKEW('orders', 'o_custId', 0) */ * FROM orders, customers WHERE o_custId = c_custId {code} I only found */*+ skewjoin(a(c0, c1)) */* in MaxCompute: https://help.aliyun.com/document_detail/203410.html Any other database support it? [~hyuan] > Support hints like /*+ skewjoin(a(c0, c1)) */ > - > > Key: CALCITE-4705 > URL: https://issues.apache.org/jira/browse/CALCITE-4705 > Project: Calcite > Issue Type: Improvement > Components: core >Affects Versions: 1.27.0 >Reporter: jibiyr >Assignee: jibiyr >Priority: Minor > > Dear community, > calcite parse support hint now,but it can not parse hint like follow, > _*select /*+ skewjoin(a(c0, c1)) */ * from T0 a join T1 b on a.c0 = b.c0,*_ > this is the bnf which is calcite supported now, > {code:java} > // > hint: > hintName > | hintName '(' hintOptions ')' > hintOptions: > hintKVOption [, hintKVOption ]* > | optionName [, optionName ]* > | optionValue [, optionValue ]* > hintKVOption: > optionName '=' stringLiteral > | stringLiteral '=' stringLiteral > optionValue: > stringLiteral > | numericLiteral > {code} > I think the hintOptions should support the expression pattern,like a(c0,c1). > And this pattern can be parsed by spark/presto now. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-4705) Support hints like /*+ skewjoin(a(c0, c1)) */
[ https://issues.apache.org/jira/browse/CALCITE-4705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17561736#comment-17561736 ] Jiajun Xie commented on CALCITE-4705: - [~yanjing.wang] , it's not correct. Spark can parse any primary expression, but it can't resolved many expression. You can see the unit test:[https://github.com/apache/spark/blob/master/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/ResolveHintsSuite.scala#L199] This is because: [https://github.com/apache/spark/blob/efe43306fcab18f076f755c81c0406ebc1a5fee9/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveHints.scala#L204] [~yr] , Are you still working on this? I want to take it. > Support hints like /*+ skewjoin(a(c0, c1)) */ > - > > Key: CALCITE-4705 > URL: https://issues.apache.org/jira/browse/CALCITE-4705 > Project: Calcite > Issue Type: Improvement > Components: core >Affects Versions: 1.27.0 >Reporter: jibiyr >Assignee: jibiyr >Priority: Minor > > Dear community, > calcite parse support hint now,but it can not parse hint like follow, > _*select /*+ skewjoin(a(c0, c1)) */ * from T0 a join T1 b on a.c0 = b.c0,*_ > this is the bnf which is calcite supported now, > {code:java} > // > hint: > hintName > | hintName '(' hintOptions ')' > hintOptions: > hintKVOption [, hintKVOption ]* > | optionName [, optionName ]* > | optionValue [, optionValue ]* > hintKVOption: > optionName '=' stringLiteral > | stringLiteral '=' stringLiteral > optionValue: > stringLiteral > | numericLiteral > {code} > I think the hintOptions should support the expression pattern,like a(c0,c1). > And this pattern can be parsed by spark/presto now. > -- This message was sent by Atlassian Jira (v8.20.10#820010)