[GitHub] [calcite] jh3507 commented on a change in pull request #1334: [CALCITE-3111] Allow custom implementations of Correlate in RelDecorr…

2019-08-14 Thread GitBox
jh3507 commented on a change in pull request #1334: [CALCITE-3111] Allow custom 
implementations of Correlate in RelDecorr…
URL: https://github.com/apache/calcite/pull/1334#discussion_r314181502
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java
 ##
 @@ -787,10 +812,29 @@ private RelNode createValueGenerator(
   assert newInput != null;
 
   if (!joinedInputs.contains(newInput)) {
-RelNode project =
-RelOptUtil.createProject(newInput,
-mapNewInputToOutputs.get(newInput));
-RelNode distinct = relBuilder.push(project)
+final List positions = mapNewInputToOutputs.get(newInput);
+final List fieldNames = newInput.getRowType().getFieldNames();
+final List exprs = new AbstractList() {
+  public int size() {
+return positions.size();
+  }
+
+  public RexNode get(int index) {
+final int pos = positions.get(index);
+return relBuilder.getRexBuilder().makeInputRef(newInput, pos);
+  }
+};
+final List names = new AbstractList() {
+  public int size() {
+return positions.size();
+  }
+
+  public String get(int index) {
+final int pos = positions.get(index);
+return fieldNames.get(pos);
+  }
+};
+RelNode distinct = relBuilder.push(newInput).projectNamed(exprs, 
names, false)
 
 Review comment:
   Done. That would make it much simpler.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] danny0405 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
danny0405 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate 
method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521519069
 
 
   @xy2953396112 Thanks, let's fix them in one PR but with different commits.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] xy2953396112 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
xy2953396112 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate 
method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521516196
 
 
   > @xy2953396112 Can we fix for all the exactly numeric types and fractional 
types ?
   > 
   > * For integers: `BYTE` to `BIGINT`)
   > * For fractional: `REAL`, `FLOAT`, `DOUBLE`
   > * For decimal: `DECIMAL`s
   
   ok,could we merge it firstly,and i will commit a new pr
   
   > @xy2953396112 Can we fix for all the exactly numeric types and fractional 
types ?
   > 
   > * For integers: `BYTE` to `BIGINT`)
   > * For fractional: `REAL`, `FLOAT`, `DOUBLE`
   > * For decimal: `DECIMAL`s
   
   ok,could we merge it firstly ? and i will commit a new PR later for numeric 
types and fractional types.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] xy2953396112 edited a comment on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
xy2953396112 edited a comment on issue #1379: [CALCITE-3251]BinaryExpression 
evaluate method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521516196
 
 
   > @xy2953396112 Can we fix for all the exactly numeric types and fractional 
types ?
   > 
   > * For integers: `BYTE` to `BIGINT`)
   > * For fractional: `REAL`, `FLOAT`, `DOUBLE`
   > * For decimal: `DECIMAL`s
   
   ok,could we merge it firstly ? and i will commit a new PR later for numeric 
types and fractional types.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] danny0405 removed a comment on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
danny0405 removed a comment on issue #1379: [CALCITE-3251]BinaryExpression 
evaluate method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521509785
 
 
   @xy2953396112 The changes looks good, thanks,


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] jinxing64 commented on issue #1370: [CALCITE-3239] Calc#accept(RexShuttle shuttle) does not update rowType

2019-08-14 Thread GitBox
jinxing64 commented on issue #1370: [CALCITE-3239] Calc#accept(RexShuttle 
shuttle) does not update rowType
URL: https://github.com/apache/calcite/pull/1370#issuecomment-521511162
 
 
   @rubenada @danny0405 
   Thanks a lot for looking into this ~
   If it makes sense to fix this issue in `Calc`, could you please leave more 
comments on this ? and I can keep refine this patch.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] danny0405 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
danny0405 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate 
method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521510854
 
 
   @xy2953396112 Can we fix for all the exactly numeric types and fractional 
types ?
   - For integers: `BYTE` to `BIGINT`)
   - For fractional: `REAL`, `FLOAT`, `DOUBLE`
   - For decimal: `DECIMAL`s


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] danny0405 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
danny0405 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate 
method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521509785
 
 
   @xy2953396112 The changes looks good, thanks,


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] danny0405 commented on issue #1374: [CALCITE-3138] Restructuring ROW type fields is not supported

2019-08-14 Thread GitBox
danny0405 commented on issue #1374: [CALCITE-3138] Restructuring ROW type 
fields is not supported
URL: https://github.com/apache/calcite/pull/1374#issuecomment-521508961
 
 
   Thanks @ihuzenko , i see there are so many code refactoring which is not 
relative with the fix in `RelStructuredTypeFlattener`, can we split the code 
refactoring apart from the main fixing, it's a little hard to figure out what 
you really want to fix and how the code works when they mixed up.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] danny0405 commented on a change in pull request #1374: [CALCITE-3138] Restructuring ROW type fields is not supported

2019-08-14 Thread GitBox
danny0405 commented on a change in pull request #1374: [CALCITE-3138] 
Restructuring ROW type fields is not supported
URL: https://github.com/apache/calcite/pull/1374#discussion_r314170399
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java
 ##
 @@ -125,6 +128,14 @@ private SqlSingleOperandTypeChecker 
getChecker(SqlCallBinding callBinding) {
 case MAP:
   return typeFactory.createTypeWithNullability(operandType.getValueType(),
   true);
+case ROW:
+  int lastOperandIdx = opBinding.getOperandCount() - 1;
 
 Review comment:
   How about the opBinding has 0 operands ?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] danny0405 commented on a change in pull request #1374: [CALCITE-3138] Restructuring ROW type fields is not supported

2019-08-14 Thread GitBox
danny0405 commented on a change in pull request #1374: [CALCITE-3138] 
Restructuring ROW type fields is not supported
URL: https://github.com/apache/calcite/pull/1374#discussion_r314170420
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java
 ##
 @@ -100,6 +101,8 @@ private SqlSingleOperandTypeChecker 
getChecker(SqlCallBinding callBinding) {
 case MAP:
   return OperandTypes.family(
   operandType.getKeyType().getSqlTypeName().getFamily());
+case ROW:
+  return OperandTypes.STRING;
 
 Review comment:
   Use `CHARACTER`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] danny0405 commented on a change in pull request #1374: [CALCITE-3138] Restructuring ROW type fields is not supported

2019-08-14 Thread GitBox
danny0405 commented on a change in pull request #1374: [CALCITE-3138] 
Restructuring ROW type fields is not supported
URL: https://github.com/apache/calcite/pull/1374#discussion_r314170313
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java
 ##
 @@ -125,6 +128,14 @@ private SqlSingleOperandTypeChecker 
getChecker(SqlCallBinding callBinding) {
 case MAP:
   return typeFactory.createTypeWithNullability(operandType.getValueType(),
   true);
+case ROW:
+  int lastOperandIdx = opBinding.getOperandCount() - 1;
+  String fieldName = opBinding.getOperandLiteralValue(lastOperandIdx, 
String.class);
+  return operandType.getFieldList().stream()
+  .filter(field -> field.getName().equalsIgnoreCase(fieldName))
+  .findFirst().map(RelDataTypeField::getType)
 
 Review comment:
   You can get the `NameMatcher` from `CatalogReader` of `SqlValidator` to 
decide the case sensitivity.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] xy2953396112 edited a comment on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
xy2953396112 edited a comment on issue #1379: [CALCITE-3251]BinaryExpression 
evaluate method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521489629
 
 
   > @xy2953396112 I re-trigger the tests and they all passed.
   
   THX,is there any problem? @danny0405  @hsyuan


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] danny0405 commented on a change in pull request #1380: [CALCITE-3252] Syntax error while parsing CONVERT_TIMEZONE, TO_DATE, TO_TIMESTAMP functions on Redshift

2019-08-14 Thread GitBox
danny0405 commented on a change in pull request #1380: [CALCITE-3252] Syntax 
error while parsing CONVERT_TIMEZONE, TO_DATE, TO_TIMESTAMP functions on 
Redshift
URL: https://github.com/apache/calcite/pull/1380#discussion_r314158677
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/sql/type/OperandTypes.java
 ##
 @@ -240,6 +240,9 @@ public Consistency getConsistency() {
   public static final SqlSingleOperandTypeChecker INTERVAL =
   family(SqlTypeFamily.DATETIME_INTERVAL);
 
+  public static final SqlSingleOperandTypeChecker STRING_STRING_DATETIME =
+  family(SqlTypeFamily.STRING, SqlTypeFamily.STRING, 
SqlTypeFamily.DATETIME);
+
 
 Review comment:
   `STRING` or `CHARACTER` ? `STRING ` contains type name `BINARY` and 
`VARBINARY`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] danny0405 commented on a change in pull request #1380: [CALCITE-3252] Syntax error while parsing CONVERT_TIMEZONE, TO_DATE, TO_TIMESTAMP functions on Redshift

2019-08-14 Thread GitBox
danny0405 commented on a change in pull request #1380: [CALCITE-3252] Syntax 
error while parsing CONVERT_TIMEZONE, TO_DATE, TO_TIMESTAMP functions on 
Redshift
URL: https://github.com/apache/calcite/pull/1380#discussion_r314158337
 
 

 ##
 File path: 
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java
 ##
 @@ -171,6 +171,44 @@ private SqlLibraryOperators() {
   ReturnTypes.VARCHAR_2000, null, OperandTypes.DATETIME,
   SqlFunctionCategory.TIMEDATE);
 
+  /** The "TO_DATE(string1, string2)" function; casts string1
+   * to a date using the format specified in string2 */
+  @LibraryOperator(libraries = {POSTGRESQL, ORACLE})
+  public static final SqlFunction TO_DATE =
+  new SqlFunction(
+  "TO_DATE",
+  SqlKind.OTHER_FUNCTION,
+  ReturnTypes.DATE_NULLABLE,
+  null,
+  OperandTypes.STRING_STRING,
+  SqlFunctionCategory.TIMEDATE);
+
+  /** The "TO_TIMESTAMP(string1, string2)" function; casts string1
+   * to a timestamp using the format specified in string2 */
+  @LibraryOperator(libraries = {POSTGRESQL, ORACLE})
+  public static final SqlFunction TO_TIMESTAMP =
+  new SqlFunction(
+  "TO_TIMESTAMP",
+  SqlKind.OTHER_FUNCTION,
+  ReturnTypes.DATE_NULLABLE,
+  null,
+  OperandTypes.STRING_STRING,
+  SqlFunctionCategory.TIMEDATE);
+
+  /** The "CONVERT_TIMEZONE(string1, string2, datetime)" function;
+   * converts the timezone of the datetime from string1 to string2.
+   * This function is only on Redshift, but we list it in Postgresql
+   * because Redshift does not have its own library. */
 
 Review comment:
   Then add a `Redshift` library ?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] yanlin-Lynn commented on issue #1372: [CALCITE-3246] NullPointerException while deserializing udf operator.

2019-08-14 Thread GitBox
yanlin-Lynn commented on issue #1372: [CALCITE-3246] NullPointerException while 
deserializing udf operator.
URL: https://github.com/apache/calcite/pull/1372#issuecomment-521491281
 
 
   > @yanlin-Lynn I would like to merge it if you could correct the commit 
message to` [CALCITE-3246] NullPointerException while deserializing udf 
operator (your name)`.
   
   Thanks for reviewing. @chunweilei 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] danny0405 commented on a change in pull request #1334: [CALCITE-3111] Allow custom implementations of Correlate in RelDecorr…

2019-08-14 Thread GitBox
danny0405 commented on a change in pull request #1334: [CALCITE-3111] Allow 
custom implementations of Correlate in RelDecorr…
URL: https://github.com/apache/calcite/pull/1334#discussion_r314150683
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java
 ##
 @@ -787,10 +812,29 @@ private RelNode createValueGenerator(
   assert newInput != null;
 
   if (!joinedInputs.contains(newInput)) {
-RelNode project =
-RelOptUtil.createProject(newInput,
-mapNewInputToOutputs.get(newInput));
-RelNode distinct = relBuilder.push(project)
+final List positions = mapNewInputToOutputs.get(newInput);
+final List fieldNames = newInput.getRowType().getFieldNames();
+final List exprs = new AbstractList() {
+  public int size() {
+return positions.size();
+  }
+
+  public RexNode get(int index) {
+final int pos = positions.get(index);
+return relBuilder.getRexBuilder().makeInputRef(newInput, pos);
+  }
+};
+final List names = new AbstractList() {
+  public int size() {
+return positions.size();
+  }
+
+  public String get(int index) {
+final int pos = positions.get(index);
+return fieldNames.get(pos);
+  }
+};
+RelNode distinct = relBuilder.push(newInput).projectNamed(exprs, 
names, false)
 
 Review comment:
   Can we use java lambda directly for making `exprs` and `names` here ? These 
`AbstractList` is not that readable.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] chunweilei commented on issue #1372: [CALCITE-3246] NullPointerException while deserializing udf operator.

2019-08-14 Thread GitBox
chunweilei commented on issue #1372: [CALCITE-3246] NullPointerException while 
deserializing udf operator.
URL: https://github.com/apache/calcite/pull/1372#issuecomment-521489684
 
 
   LGTM


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] xy2953396112 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
xy2953396112 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate 
method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521489629
 
 
   > @xy2953396112 I re-trigger the tests and they all passed.
   
   THX,is there any problem?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] danny0405 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
danny0405 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate 
method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521489169
 
 
   @xy2953396112  I re-trigger the tests and they all passed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] xy2953396112 edited a comment on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
xy2953396112 edited a comment on issue #1379: [CALCITE-3251]BinaryExpression 
evaluate method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521488024
 
 
   > The tests failed, please check the style.
   
   Those tests have been passed,please review again. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] xy2953396112 edited a comment on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
xy2953396112 edited a comment on issue #1379: [CALCITE-3251]BinaryExpression 
evaluate method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521462142
 
 
   > I clicked `Approve` by mistake. Sorry about that.
   
   Ok,I have fixed the indent.Could you review again? 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] xy2953396112 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
xy2953396112 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate 
method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521488024
 
 
   > The tests failed, please check the style.
   
   Those tests have been passed,please review again.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] xy2953396112 removed a comment on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
xy2953396112 removed a comment on issue #1379: [CALCITE-3251]BinaryExpression 
evaluate method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521470528
 
 
   > The tests failed, please check the style.
   
   please help me review the test failed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] chunweilei commented on a change in pull request #1372: [CALCITE-3246] NullPointerException while deserializing udf operator.

2019-08-14 Thread GitBox
chunweilei commented on a change in pull request #1372: [CALCITE-3246] 
NullPointerException while deserializing udf operator.
URL: https://github.com/apache/calcite/pull/1372#discussion_r314150520
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/rel/externalize/RelJson.java
 ##
 @@ -438,15 +438,17 @@ RexNode toRex(RelInput relInput, Object o) {
 } else if (o instanceof Map) {
   Map map = (Map) o;
   final Map opMap = (Map) map.get("op");
+  if (map.containsKey("class")) {
+opMap.put("class", map.get("class"));
+  }
   final RelDataTypeFactory typeFactory = cluster.getTypeFactory();
 
 Review comment:
   @wangzzu It matters since it might throw NPE. It should put inside` if(opMap 
!= null)` block.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] chunweilei commented on issue #1372: [CALCITE-3246] NullPointerException while deserializing udf operator.

2019-08-14 Thread GitBox
chunweilei commented on issue #1372: [CALCITE-3246] NullPointerException while 
deserializing udf operator.
URL: https://github.com/apache/calcite/pull/1372#issuecomment-521484651
 
 
   @yanlin-Lynn I would like to merge it if you could correct the commit 
message to` [CALCITE-3246] NullPointerException while deserializing udf 
operator (your name)`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[calcite] branch master updated: [CALCITE-3229] UnsupportedOperationException for UPDATE with IN query

2019-08-14 Thread chunwei
This is an automated email from the ASF dual-hosted git repository.

chunwei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 7625938  [CALCITE-3229] UnsupportedOperationException for UPDATE with 
IN query
7625938 is described below

commit 7625938f1faa37fe34540d3a7a2257ec7eae5704
Author: Chunwei Lei 
AuthorDate: Tue Aug 6 10:18:07 2019 +0800

[CALCITE-3229] UnsupportedOperationException for UPDATE with IN query
---
 .../apache/calcite/sql2rel/SqlToRelConverter.java  |  9 +++--
 .../apache/calcite/test/SqlToRelConverterTest.java | 20 +++
 .../apache/calcite/test/SqlToRelConverterTest.xml  | 40 ++
 3 files changed, 66 insertions(+), 3 deletions(-)

diff --git 
a/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java 
b/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java
index 1791827..58475f4 100644
--- a/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java
+++ b/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java
@@ -1800,9 +1800,12 @@ public class SqlToRelConverter {
 case ALL:
   switch (logic) {
   case TRUE_FALSE_UNKNOWN:
-if (validator.getValidatedNodeType(node).isNullable()) {
-  break;
-} else if (true) {
+RelDataType type = validator.getValidatedNodeTypeIfKnown(node);
+if (type == null) {
+  // The node might not be validated if we still don't know type of 
the node.
+  // Therefore return directly.
+  return;
+} else {
   break;
 }
 // fall through
diff --git 
a/core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java 
b/core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java
index a7d2ae5..57e634c 100644
--- a/core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java
+++ b/core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java
@@ -2187,6 +2187,26 @@ public class SqlToRelConverterTest extends 
SqlToRelTestBase {
 sql(sql).ok();
   }
 
+  /**
+   * Test case for
+   * https://issues.apache.org/jira/browse/CALCITE-3229";>[CALCITE-3229]
+   * UnsupportedOperationException for UPDATE with IN query.
+   */
+  @Test public void testUpdateSubQueryWithIn() {
+final String sql = "update emp\n"
++ "set empno = 1 where empno in (\n"
++ "  select empno from emp where empno=2)";
+sql(sql).ok();
+  }
+
+  /** Similar to {@link #testUpdateSubQueryWithIn()} but with not in instead 
of in. */
+  @Test public void testUpdateSubQueryWithNotIn() {
+final String sql = "update emp\n"
++ "set empno = 1 where empno not in (\n"
++ "  select empno from emp where empno=2)";
+sql(sql).ok();
+  }
+
   @Test public void testUpdateWhere() {
 final String sql = "update emp set empno = empno + 1 where deptno = 10";
 sql(sql).ok();
diff --git 
a/core/src/test/resources/org/apache/calcite/test/SqlToRelConverterTest.xml 
b/core/src/test/resources/org/apache/calcite/test/SqlToRelConverterTest.xml
index 86a4273..f78b557 100644
--- a/core/src/test/resources/org/apache/calcite/test/SqlToRelConverterTest.xml
+++ b/core/src/test/resources/org/apache/calcite/test/SqlToRelConverterTest.xml
@@ -4670,6 +4670,46 @@ LogicalTableModify(table=[[CATALOG, SALES, EMP]], 
operation=[UPDATE], updateColu
 ]]>
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 



[GitHub] [calcite] chunweilei merged pull request #1358: [CALCITE-3229] UnsupportedOperationException for UPDATE with IN query

2019-08-14 Thread GitBox
chunweilei merged pull request #1358: [CALCITE-3229] 
UnsupportedOperationException for UPDATE with IN query
URL: https://github.com/apache/calcite/pull/1358
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] xy2953396112 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
xy2953396112 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate 
method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521470528
 
 
   > The tests failed, please check the style.
   
   please help me review the test failed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] xy2953396112 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
xy2953396112 commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate 
method support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521462142
 
 
   > I clicked `Approve` by mistake. Sorry about that.
   
   Ok,I have fixed the indent.Could you review again?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] hsyuan commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
hsyuan commented on issue #1379: [CALCITE-3251]BinaryExpression evaluate method 
support Long type.
URL: https://github.com/apache/calcite/pull/1379#issuecomment-521461716
 
 
   The tests failed, please check the style.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit a83e09408aeac7706b2a482d704e5d1c758eafb2
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 47 +
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 48 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..a60e2b3
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,47 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+
+container:
+  image: golang:${{ matrix.go_version}}
+  env:
+GO111MODULE: on
+database_image: ${{ matrix.database_image }}
+
+services:
+  database:
+image: ${{ matrix.database_image }}
+ports:
+  - 8765:8765
+
+steps:
+  - name: Check out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Run tests
+run: |
+  if [[ $database_image =~ phoenix ]]; then
+export AVATICA_FLAVOR=PHOENIX
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+export AVATICA_FLAVOR=HSQLDB
+  fi
+
+  go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE;
-elif [ $AVATICA_FLAVOR == "HSQLDB" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE -u jdbc:hsqldb:mem:public;
-fi
-  - docker ps -a
-
-script:
-  - go test -v ./...
-
-git:
-  depth: 1
-
-install: true
-# End .travis.yml
diff --git a/README.md b/README.md
index b6be82e..3d8b40f 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ limitations under the License.
 # Apache Avatica/Phoenix SQL

[calcite-avatica-go] branch github-actions updated (22cc1fa -> a83e094)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard 22cc1fa  Try github actions
 discard 77a9375  Try github actions
 new a83e094  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (22cc1fa)
\
 N -- N -- N   refs/heads/github-actions (a83e094)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:



[calcite-avatica-go] branch github-actions updated: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git


The following commit(s) were added to refs/heads/github-actions by this push:
 new 22cc1fa  Try github actions
22cc1fa is described below

commit 22cc1faab4c84c88529282869e95640926baa90f
Author: Francis Chuang 
AuthorDate: Thu Aug 15 09:40:24 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 84e696e..a60e2b3 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -21,11 +21,10 @@ jobs:
 runs-on: ubuntu-latest
 
 container:
-  image: golang:${{ matrix.go_version}}-alpine
+  image: golang:${{ matrix.go_version}}
   env:
 GO111MODULE: on
 database_image: ${{ matrix.database_image }}
-  options: --entrypoint /bin/sh --tty
 
 services:
   database:
@@ -39,8 +38,6 @@ jobs:
 
   - name: Run tests
 run: |
-  apk --no-cache --no-progress add gcc git musl-dev
-
   if [[ $database_image =~ phoenix ]]; then
 export AVATICA_FLAVOR=PHOENIX
   elif [ $AVATICA_FLAVOR == hypersql ]; then



[calcite-avatica-go] branch github-actions updated (2d41420 -> 77a9375)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard 2d41420  Try github actions
 new 77a9375  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (2d41420)
\
 N -- N -- N   refs/heads/github-actions (77a9375)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 23 +++
 1 file changed, 11 insertions(+), 12 deletions(-)



[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit 77a937533ee25886a0715fe4a62a36c3e8ec24fe
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 50 +++
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 51 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..84e696e
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,50 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+
+container:
+  image: golang:${{ matrix.go_version}}-alpine
+  env:
+GO111MODULE: on
+database_image: ${{ matrix.database_image }}
+  options: --entrypoint /bin/sh --tty
+
+services:
+  database:
+image: ${{ matrix.database_image }}
+ports:
+  - 8765:8765
+
+steps:
+  - name: Check out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Run tests
+run: |
+  apk --no-cache --no-progress add gcc git musl-dev
+
+  if [[ $database_image =~ phoenix ]]; then
+export AVATICA_FLAVOR=PHOENIX
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+export AVATICA_FLAVOR=HSQLDB
+  fi
+
+  go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE;
-elif [ $AVATICA_FLAVOR == "HSQLDB" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE -u jdbc:hsqldb:mem:public;
-fi
-  - docker ps -a
-
-script:
-  - go test -v ./...
-
-git:
-  depth: 1
-
-install: true
-# End .travis.yml
diff --git a/README.md b/README.md
index b6be82e..3d8b40f 10

[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit 2d41420d22b7b9acf8d2d6e5fbfd88b3d3e971d8
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 51 +++
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 52 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..b923083
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,51 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+
+container:
+  image: golang:${{ matrix.go_version}}-alpine
+  env:
+GO111MODULE: on
+database_image: ${{ matrix.database_image }}
+
+services:
+  database:
+image: ${{ matrix.database_image }}
+ports:
+  - 8765:8765
+
+steps:
+  - name: Check out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Run tests
+with:
+  entrypoint: /bin/sh
+  args: |
+apk --no-cache --no-progress add gcc git musl-dev
+
+if [[ $database_image =~ phoenix ]]; then
+  export AVATICA_FLAVOR=PHOENIX
+elif [ $AVATICA_FLAVOR == hypersql ]; then
+  export AVATICA_FLAVOR=HSQLDB
+fi
+
+go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE;
-elif [ $AVATICA_FLAVOR == "HSQLDB" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE -u jdbc:hsqldb:mem:public;
-fi
-  - docker ps -a
-
-script:
-  - go test -v ./...
-
-git:
-  depth: 1
-
-install: true
-# End .travis.yml
diff --git a/README.md b/README.md
index

[calcite-avatica-go] branch github-actions updated (fc64a9f -> 2d41420)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard fc64a9f  Try github actions
 new 2d41420  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (fc64a9f)
\
 N -- N -- N   refs/heads/github-actions (2d41420)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 23 ---
 1 file changed, 12 insertions(+), 11 deletions(-)



[calcite-avatica-go] branch github-actions updated (cac6354 -> fc64a9f)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard cac6354  Try github actions
 new fc64a9f  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (cac6354)
\
 N -- N -- N   refs/heads/github-actions (fc64a9f)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 1 +
 1 file changed, 1 insertion(+)



[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit fc64a9fd720319dcf25bd264e48f13f56342ef9b
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 50 +++
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 51 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..3abf018
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,50 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+
+container:
+  image: golang:${{ matrix.go_version}}-alpine
+  env:
+GO111MODULE: on
+database_image: ${{ matrix.database_image }}
+  options: --entrypoint /bin/sh
+
+services:
+  database:
+image: ${{ matrix.database_image }}
+ports:
+  - 8765:8765
+
+steps:
+  - name: Check out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Run tests
+run: |
+  apk --no-cache --no-progress add gcc git musl-dev
+
+  if [[ $database_image =~ phoenix ]]; then
+export AVATICA_FLAVOR=PHOENIX
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+export AVATICA_FLAVOR=HSQLDB
+  fi
+
+  go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE;
-elif [ $AVATICA_FLAVOR == "HSQLDB" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE -u jdbc:hsqldb:mem:public;
-fi
-  - docker ps -a
-
-script:
-  - go test -v ./...
-
-git:
-  depth: 1
-
-install: true
-# End .travis.yml
diff --git a/README.md b/README.md
index b6be82e..3d8b40f 100644
-

[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit cac6354a86695f76565d7bb44f67f7d4e76e132f
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 49 ++
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 50 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..5512282
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,49 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+
+container:
+  image: golang:${{ matrix.go_version}}-alpine
+  env:
+GO111MODULE: on
+database_image: ${{ matrix.database_image }}
+
+services:
+  database:
+image: ${{ matrix.database_image }}
+ports:
+  - 8765:8765
+
+steps:
+  - name: Check out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Run tests
+run: |
+  apk --no-cache --no-progress add gcc git musl-dev
+
+  if [[ $database_image =~ phoenix ]]; then
+export AVATICA_FLAVOR=PHOENIX
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+export AVATICA_FLAVOR=HSQLDB
+  fi
+
+  go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE;
-elif [ $AVATICA_FLAVOR == "HSQLDB" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE -u jdbc:hsqldb:mem:public;
-fi
-  - docker ps -a
-
-script:
-  - go test -v ./...
-
-git:
-  depth: 1
-
-install: true
-# End .travis.yml
diff --git a/README.md b/README.md
index b6be82e..3d8b40f 100644
--- a/README.md
+++ b/README.md
@@ -20,

[calcite-avatica-go] branch github-actions updated (1097f41 -> cac6354)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard 1097f41  Try github actions
 new cac6354  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (1097f41)
\
 N -- N -- N   refs/heads/github-actions (cac6354)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 3 ---
 1 file changed, 3 deletions(-)



[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit 1097f410109160656b8279de625cd360dfc55c0c
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 52 
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 53 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..db29ea5
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,52 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+
+container:
+  image: golang:${{ matrix.go_version}}-alpine
+  env:
+GO111MODULE: on
+database_image: ${{ matrix.database_image }}
+  options: --workdir /source
+  volumes:
+- $GITHUB_WORKSPACE:/source
+
+services:
+  database:
+image: ${{ matrix.database_image }}
+ports:
+  - 8765:8765
+
+steps:
+  - name: Check out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Run tests
+run: |
+  apk --no-cache --no-progress add gcc git musl-dev
+
+  if [[ $database_image =~ phoenix ]]; then
+export AVATICA_FLAVOR=PHOENIX
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+export AVATICA_FLAVOR=HSQLDB
+  fi
+
+  go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE;
-elif [ $AVATICA_FLAVOR == "HSQLDB" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE -u jdbc:hsqldb:mem:public;
-fi
-  - docker ps -a
-
-script:
-  - go test -v ./...
-
-git:
-  depth: 1
-
-install: true
-# End .travis.yml
diff --git a/RE

[calcite-avatica-go] branch github-actions updated (432653c -> 1097f41)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard 432653c  Try github actions
 new 1097f41  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (432653c)
\
 N -- N -- N   refs/heads/github-actions (1097f41)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)



[calcite-avatica-go] branch github-actions updated (b2cf024 -> 432653c)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard b2cf024  Try github actions
 new 432653c  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (b2cf024)
\
 N -- N -- N   refs/heads/github-actions (432653c)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 2 --
 1 file changed, 2 deletions(-)



[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit 432653cea4b49cb6a95a71ddebda81ef512a5fd8
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 50 +++
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 51 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..ed9b283
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,50 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+
+container:
+  image: golang:${{ matrix.go_version}}
+  env:
+GO111MODULE: on
+database_image: ${{ matrix.database_image }}
+  options: --workdir /source
+  volumes:
+- $GITHUB_WORKSPACE:/source
+
+services:
+  database:
+image: ${{ matrix.database_image }}
+ports:
+  - 8765:8765
+
+steps:
+  - name: Check out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Run tests
+run: |
+  if [[ $database_image =~ phoenix ]]; then
+AVATICA_FLAVOR=PHOENIX;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+AVATICA_FLAVOR=HSQLDB;
+  fi
+
+  go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE;
-elif [ $AVATICA_FLAVOR == "HSQLDB" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE -u jdbc:hsqldb:mem:public;
-fi
-  - docker ps -a
-
-script:
-  - go test -v ./...
-
-git:
-  depth: 1
-
-install: true
-# End .travis.yml
diff --git a/README.md b/README.md
index b6be82e..3d8b40f 100644
--- a/README.md
+++ b/README.md
@

[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit b2cf024daf440f073e19107fe6d8db6e202322e1
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 52 
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 53 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..0e1312e
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,52 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+
+container:
+  image: golang:${{ matrix.go_version}}
+  env:
+GO111MODULE: on
+database_image: ${{ matrix.database_image }}
+  options: --workdir /source
+  volumes:
+- $GITHUB_WORKSPACE:/source
+
+services:
+  database:
+image: ${{ matrix.database_image }}
+ports:
+  - 8765:8765
+with:
+  args: -u jdbc:hsqldb:mem:public
+
+steps:
+  - name: Check out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Run tests
+run: |
+  if [[ $database_image =~ phoenix ]]; then
+AVATICA_FLAVOR=PHOENIX;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+AVATICA_FLAVOR=HSQLDB;
+  fi
+
+  go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE;
-elif [ $AVATICA_FLAVOR == "HSQLDB" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE -u jdbc:hsqldb:mem:public;
-fi
-  - docker ps -a
-
-script:
-  - go test -v ./...
-
-git:
-  depth: 1
-
-install: true
-# End .travis.yml
diff --git a/README.md b/README.md
inde

[calcite-avatica-go] branch github-actions updated (00f5a70 -> b2cf024)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard 00f5a70  Try github actions
 new b2cf024  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (00f5a70)
\
 N -- N -- N   refs/heads/github-actions (b2cf024)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)



[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit 00f5a70598a0c0d78433dd5e8998d11d04afae41
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 53 
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 54 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..e2be61f
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,53 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+
+container:
+  image: golang:${{ matrix.go_version}}
+  env:
+GO111MODULE: on
+database_image: ${{ matrix.database_image }}
+  options:
+workdir: /source
+  volumes:
+- $GITHUB_WORKSPACE:/source
+
+services:
+  database:
+image: ${{ matrix.database_image }}
+ports:
+  - 8765:8765
+with:
+  args: -u jdbc:hsqldb:mem:public
+
+steps:
+  - name: Check out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Run tests
+run: |
+  if [[ $database_image =~ phoenix ]]; then
+AVATICA_FLAVOR=PHOENIX;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+AVATICA_FLAVOR=HSQLDB;
+  fi
+
+  go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE;
-elif [ $AVATICA_FLAVOR == "HSQLDB" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE -u jdbc:hsqldb:mem:public;
-fi
-  - docker ps -a
-
-script:
-  - go test -v ./...
-
-git:
-  depth: 1
-
-install: true
-# End .travis.yml
diff --git a/README.md b/README

[calcite-avatica-go] branch github-actions updated (8845f29 -> 00f5a70)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard 8845f29  Try github actions
 new 00f5a70  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (8845f29)
\
 N -- N -- N   refs/heads/github-actions (00f5a70)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 42 +++---
 1 file changed, 19 insertions(+), 23 deletions(-)



[GitHub] [calcite] hsyuan commented on a change in pull request #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
hsyuan commented on a change in pull request #1379: 
[CALCITE-3251]BinaryExpression evaluate method support Long type.
URL: https://github.com/apache/calcite/pull/1379#discussion_r314102028
 
 

 ##
 File path: 
linq4j/src/main/java/org/apache/calcite/linq4j/tree/BinaryExpression.java
 ##
 @@ -108,7 +116,9 @@ public Object evaluate(Evaluator evaluator) {
   case DOUBLE:
 return (Double) expression0.evaluate(evaluator)
< (Double) expression1.evaluate(evaluator);
-  default:
+  case LONG:
+return (Long) expression0.evaluate(evaluator) < (Long) 
expression1.evaluate(evaluator);
+default:
 
 Review comment:
   indent


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] hsyuan commented on a change in pull request #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
hsyuan commented on a change in pull request #1379: 
[CALCITE-3251]BinaryExpression evaluate method support Long type.
URL: https://github.com/apache/calcite/pull/1379#discussion_r314101983
 
 

 ##
 File path: 
linq4j/src/main/java/org/apache/calcite/linq4j/tree/BinaryExpression.java
 ##
 @@ -97,7 +103,9 @@ public Object evaluate(Evaluator evaluator) {
   case DOUBLE:
 return (Double) expression0.evaluate(evaluator)
>= (Double) expression1.evaluate(evaluator);
-  default:
+  case LONG:
+return (Long) expression0.evaluate(evaluator) >= (Long) 
expression1.evaluate(evaluator);
+default:
 
 Review comment:
   The indent of `default`


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] hsyuan commented on a change in pull request #1379: [CALCITE-3251]BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
hsyuan commented on a change in pull request #1379: 
[CALCITE-3251]BinaryExpression evaluate method support Long type.
URL: https://github.com/apache/calcite/pull/1379#discussion_r314101148
 
 

 ##
 File path: 
linq4j/src/main/java/org/apache/calcite/linq4j/tree/BinaryExpression.java
 ##
 @@ -61,6 +61,8 @@ public Object evaluate(Evaluator evaluator) {
   case DOUBLE:
 return (Double) expression0.evaluate(evaluator)
+ (Double) expression1.evaluate(evaluator);
+  case LONG:
+return (Long) expression0.evaluate(evaluator) + (Long) 
expression1.evaluate(evaluator);
 
 Review comment:
   Can you wrap the line just like L62~63 does? This is Calcite convention.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] Restructuring ROW type fields is not supported

2019-08-14 Thread GitBox
vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] 
Restructuring ROW type fields is not supported
URL: https://github.com/apache/calcite/pull/1374#discussion_r314043728
 
 

 ##
 File path: 
core/src/main/java/org/apache/calcite/sql2rel/RelStructuredTypeFlattener.java
 ##
 @@ -651,22 +609,57 @@ private void flattenProjection(RewriteRexShuttle shuttle,
 // NOTE jvs 10-Feb-2005:  This is a lame hack to keep special
 // functions which return row types working.
 
-int j = 0;
 RexNode newExp = exp;
-List oldOperands = ((RexCall) exp).getOperands();
-if (oldOperands.get(0) instanceof RexInputRef) {
-  final RexInputRef inputRef = (RexInputRef) oldOperands.get(0);
-  final Ord newField =
-  getNewFieldForOldInput(inputRef.getIndex());
-  newExp = rexBuilder.makeCall(exp.getType(),
-  ((RexCall) exp).getOperator(),
-  ImmutableList.of(rexBuilder.makeInputRef(newField.e, newField.i),
-  oldOperands.get(1)));
-}
-for (RelDataTypeField field : newExp.getType().getFieldList()) {
-  flattenedExps.add(
-  Pair.of(rexBuilder.makeFieldAccess(newExp, field.getIndex()),
-  fieldName + "$" + (j++)));
+List operands = ((RexCall) exp).getOperands();
+
+RexNode firstOp = operands.get(0);
+RexNode secondOp = operands.get(1);
 
 Review comment:
   It may be not safe to obtain the first operand here for the case when we 
have non-ITEM operator which has single operand.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] Restructuring ROW type fields is not supported

2019-08-14 Thread GitBox
vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] 
Restructuring ROW type fields is not supported
URL: https://github.com/apache/calcite/pull/1374#discussion_r314039354
 
 

 ##
 File path: 
core/src/main/java/org/apache/calcite/sql2rel/RelStructuredTypeFlattener.java
 ##
 @@ -296,42 +273,42 @@ protected int getNewForOldInput(int oldOrdinal) {
   }
 
   /**
-   * Maps the ordinal of a field pre-flattening to the ordinal of the
-   * corresponding field post-flattening, and also returns its type.
+   * Finds type and new ordinal relative to new inputs by oldOrdinal and
+   * innerOrdinal indexes.
*
-   * @param oldOrdinal Pre-flattening ordinal
-   * @param existingOffset offset already calculated the target column inside 
the oldOrdinal column.
-   *   For unnested column, it should be 0.
-   * @return Post-flattening ordinal and type
+   * @param oldOrdinal   ordinal of the field relative to old inputs
+   * @param innerOrdinal when oldOrdinal points to struct and target field
+   * is inner field of struct, this argument should contain
+   * calculated field's ordinal within struct after 
flattening.
+   * Otherwise when oldOrdinal points to primitive field, 
this
+   * argument should be zero.
+   * @return flat type with new ordinal relative to new inputs
*/
-  private Ord getNewFieldForOldInput(int oldOrdinal, int 
existingOffset) {
+  private Ord getNewFieldForOldInput(int oldOrdinal, int 
innerOrdinal) {
 assert currentRel != null;
-int newOrdinal = 0;
-
-// determine which input rel oldOrdinal references, and adjust
-// oldOrdinal to be relative to that input rel
-RelNode oldInput = null;
-RelNode newInput = null;
-for (RelNode oldInput1 : currentRel.getInputs()) {
-  newInput = getNewForOldRel(oldInput1);
-  RelDataType oldInputType = oldInput1.getRowType();
-  int n = oldInputType.getFieldCount();
-  if (oldOrdinal < n) {
-oldInput = oldInput1;
-break;
-  }
-  newOrdinal += newInput.getRowType().getFieldCount();
-  oldOrdinal -= n;
-}
-assert oldInput != null;
-assert newInput != null;
-
-RelDataType oldInputType = oldInput.getRowType();
-final int newOffset = calculateFlattenedOffset(oldInputType, oldOrdinal) + 
existingOffset;
-newOrdinal += newOffset;
-final RelDataTypeField field =
-newInput.getRowType().getFieldList().get(newOffset);
-return Ord.of(newOrdinal, field.getType());
+// sum of predecessors post flatten sizes points to new ordinal
+// of flat field or first field of flattened struct
+final int postFlatteningOrdinal = currentRel.getInputs().stream()
+.flatMap(node -> node.getRowType().getFieldList().stream())
 
 Review comment:
   I'm not sure that it will work for all types of rel nodes. If I understand 
correctly, there was used assumption, that row type of current rel node 
consists of fields from the inputs, but for some kinds of operators, like 
semi-join, fields of one of the input aren't included into the resulting row 
type.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] Restructuring ROW type fields is not supported

2019-08-14 Thread GitBox
vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] 
Restructuring ROW type fields is not supported
URL: https://github.com/apache/calcite/pull/1374#discussion_r314042364
 
 

 ##
 File path: 
core/src/main/java/org/apache/calcite/sql2rel/RelStructuredTypeFlattener.java
 ##
 @@ -581,68 +555,52 @@ public void rewriteGeneric(RelNode rel) {
   }
 
   private void flattenProjections(RewriteRexShuttle shuttle,
-  List exps,
-  List fieldNames,
-  String prefix,
-  List> flattenedExps) {
+  List exps,
+  List fieldNames,
+  String prefix,
+  List> flattenedExps) {
 for (int i = 0; i < exps.size(); ++i) {
   RexNode exp = exps.get(i);
-  String fieldName =
-  (fieldNames == null || fieldNames.get(i) == null)
-  ? ("$" + i)
-  : fieldNames.get(i);
-  if (!prefix.equals("")) {
-fieldName = prefix + "$" + fieldName;
-  }
+  String fieldName = extractName(fieldNames, prefix, i);
   flattenProjection(shuttle, exp, fieldName, flattenedExps);
 }
   }
 
+  private String extractName(List fieldNames, String prefix, int i) {
+String fieldName = (fieldNames == null || fieldNames.get(i) == null)
+? ("$" + i)
+: fieldNames.get(i);
+if (!prefix.equals("")) {
+  fieldName = prefix + "$" + fieldName;
+}
+return fieldName;
+  }
+
   private void flattenProjection(RewriteRexShuttle shuttle,
-  RexNode exp,
-  String fieldName,
-  List> flattenedExps) {
+ RexNode exp,
 
 Review comment:
   And this one.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] Restructuring ROW type fields is not supported

2019-08-14 Thread GitBox
vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] 
Restructuring ROW type fields is not supported
URL: https://github.com/apache/calcite/pull/1374#discussion_r313958781
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java
 ##
 @@ -125,6 +128,14 @@ private SqlSingleOperandTypeChecker 
getChecker(SqlCallBinding callBinding) {
 case MAP:
   return typeFactory.createTypeWithNullability(operandType.getValueType(),
   true);
+case ROW:
+  int lastOperandIdx = opBinding.getOperandCount() - 1;
+  String fieldName = opBinding.getOperandLiteralValue(lastOperandIdx, 
String.class);
+  return operandType.getFieldList().stream()
+  .filter(field -> field.getName().equalsIgnoreCase(fieldName))
+  .findFirst().map(RelDataTypeField::getType)
 
 Review comment:
   ```suggestion
 .findFirst()
 .map(RelDataTypeField::getType)
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] Restructuring ROW type fields is not supported

2019-08-14 Thread GitBox
vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] 
Restructuring ROW type fields is not supported
URL: https://github.com/apache/calcite/pull/1374#discussion_r314042226
 
 

 ##
 File path: 
core/src/main/java/org/apache/calcite/sql2rel/RelStructuredTypeFlattener.java
 ##
 @@ -581,68 +555,52 @@ public void rewriteGeneric(RelNode rel) {
   }
 
   private void flattenProjections(RewriteRexShuttle shuttle,
-  List exps,
-  List fieldNames,
-  String prefix,
-  List> flattenedExps) {
+  List exps,
 
 Review comment:
   Please revert this change, Calcite uses such formatting.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] Restructuring ROW type fields is not supported

2019-08-14 Thread GitBox
vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] 
Restructuring ROW type fields is not supported
URL: https://github.com/apache/calcite/pull/1374#discussion_r313995182
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java
 ##
 @@ -125,6 +128,14 @@ private SqlSingleOperandTypeChecker 
getChecker(SqlCallBinding callBinding) {
 case MAP:
   return typeFactory.createTypeWithNullability(operandType.getValueType(),
   true);
+case ROW:
+  int lastOperandIdx = opBinding.getOperandCount() - 1;
 
 Review comment:
   Please use literal 1 instead of obtaining its position, since 
`getOperandCountRange()` method allows 2 operands.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] Restructuring ROW type fields is not supported

2019-08-14 Thread GitBox
vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] 
Restructuring ROW type fields is not supported
URL: https://github.com/apache/calcite/pull/1374#discussion_r314028939
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java
 ##
 @@ -125,6 +128,14 @@ private SqlSingleOperandTypeChecker 
getChecker(SqlCallBinding callBinding) {
 case MAP:
   return typeFactory.createTypeWithNullability(operandType.getValueType(),
   true);
+case ROW:
+  int lastOperandIdx = opBinding.getOperandCount() - 1;
+  String fieldName = opBinding.getOperandLiteralValue(lastOperandIdx, 
String.class);
+  return operandType.getFieldList().stream()
 
 Review comment:
   Is it possible to use `operandType.getField()` method instead of iterating 
over all the fields explicitly?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] Restructuring ROW type fields is not supported

2019-08-14 Thread GitBox
vvysotskyi commented on a change in pull request #1374: [CALCITE-3138] 
Restructuring ROW type fields is not supported
URL: https://github.com/apache/calcite/pull/1374#discussion_r314023870
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java
 ##
 @@ -100,6 +101,8 @@ private SqlSingleOperandTypeChecker 
getChecker(SqlCallBinding callBinding) {
 case MAP:
   return OperandTypes.family(
   operandType.getKeyType().getSqlTypeName().getFamily());
+case ROW:
+  return OperandTypes.STRING;
 
 Review comment:
   OperandTypeChecker for `STRING` allows also `BINARY` and `VARBINARY` types, 
are such types allowed there, or `CHARACTER` type checker should be used?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] jh3507 commented on a change in pull request #1334: [CALCITE-3111] Allow custom implementations of Correlate in RelDecorr…

2019-08-14 Thread GitBox
jh3507 commented on a change in pull request #1334: [CALCITE-3111] Allow custom 
implementations of Correlate in RelDecorr…
URL: https://github.com/apache/calcite/pull/1334#discussion_r314029516
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/tools/RelBuilder.java
 ##
 @@ -1978,6 +1978,21 @@ public RelBuilder join(JoinRelType joinType, RexNode 
condition,
 return this;
   }
 
+  /** Creates a {@link org.apache.calcite.rel.core.Correlate}
+   * with correlateId and requiredColumns. */
+  public RelBuilder correlate(JoinRelType joinType,
+  CorrelationId correlationId, ImmutableBitSet requiredColumns) {
+Frame right = stack.pop();
+final Frame left = stack.pop();
+final RelNode join = correlateFactory
+.createCorrelate(left.rel, right.rel, correlationId, requiredColumns, 
joinType);
+final ImmutableList.Builder fields = ImmutableList.builder();
+fields.addAll(left.fields);
+fields.addAll(right.fields);
+stack.push(new Frame(join, fields.build()));
+return this;
+  }
+
 
 Review comment:
   Thanks for the suggestion. I updated signature. So, in correlate case, I 
think we should create an extra project on right relation if given fields are 
not simply RexInputRefs. Added a new test case for that as well.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] lameyer opened a new pull request #1380: [CALCITE-3252] Syntax error while parsing CONVERT_TIMEZONE, TO_DATE, TO_TIMESTAMP functions on Redshift

2019-08-14 Thread GitBox
lameyer opened a new pull request #1380: [CALCITE-3252] Syntax error while 
parsing CONVERT_TIMEZONE, TO_DATE, TO_TIMESTAMP functions on Redshift
URL: https://github.com/apache/calcite/pull/1380
 
 
   This adds `CONVERT_TIMEZONE`, `TO_DATE`, and `TO_TIMESTAMP` as functions to 
the sql validator.
   
   This overlaps some in testing with 
https://github.com/apache/calcite/pull/1376, so there may be some conflicts on 
merge.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] fib-seq commented on issue #1376: [CALCITE-3235] Add CONCAT function for Redshift

2019-08-14 Thread GitBox
fib-seq commented on issue #1376: [CALCITE-3235] Add CONCAT function for 
Redshift
URL: https://github.com/apache/calcite/pull/1376#issuecomment-521363381
 
 
   @julianhyde This PR is ready for review. I don't have permissions to assign 
you. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] xy2953396112 opened a new pull request #1379: BinaryExpression evaluate method support Long type.

2019-08-14 Thread GitBox
xy2953396112 opened a new pull request #1379: BinaryExpression evaluate method 
support Long type.
URL: https://github.com/apache/calcite/pull/1379
 
 
   In BinaryExpression evaluate method,maybe we should support Long type.
   When I run a function with a return value of long, this function adds a 
constant. The following error will be thrown.
   
![image](https://user-images.githubusercontent.com/23030751/63029357-fee7c800-bee2-11e9-98b8-d425fde7b0d2.png)
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] wangzzu commented on issue #1372: [CALCITE-3246] NullPointerException while deserializing udf operator.

2019-08-14 Thread GitBox
wangzzu commented on issue #1372: [CALCITE-3246] NullPointerException while 
deserializing udf operator.
URL: https://github.com/apache/calcite/pull/1372#issuecomment-521236418
 
 
   @yanlin-Lynn You should add your Full Name (First Last) to commit message, 
like `[CALCITE-3236] Handle issues found in static code analysis (DonnyZone)`. 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] yanlin-Lynn commented on a change in pull request #1372: [CALCITE-3246] NullPointerException while deserializing udf operator.

2019-08-14 Thread GitBox
yanlin-Lynn commented on a change in pull request #1372: [CALCITE-3246] 
NullPointerException while deserializing udf operator.
URL: https://github.com/apache/calcite/pull/1372#discussion_r313856954
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/rel/externalize/RelJson.java
 ##
 @@ -438,15 +438,17 @@ RexNode toRex(RelInput relInput, Object o) {
 } else if (o instanceof Map) {
   Map map = (Map) o;
   final Map opMap = (Map) map.get("op");
+  if (map.containsKey("class")) {
+opMap.put("class", map.get("class"));
+  }
   final RelDataTypeFactory typeFactory = cluster.getTypeFactory();
 
 Review comment:
   @chunweilei  thanks for point out. better to  move it down inside `if(opMap 
!= null)` block.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] yanlin-Lynn commented on a change in pull request #1372: [CALCITE-3246] NullPointerException while deserializing udf operator.

2019-08-14 Thread GitBox
yanlin-Lynn commented on a change in pull request #1372: [CALCITE-3246] 
NullPointerException while deserializing udf operator.
URL: https://github.com/apache/calcite/pull/1372#discussion_r313856954
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/rel/externalize/RelJson.java
 ##
 @@ -438,15 +438,17 @@ RexNode toRex(RelInput relInput, Object o) {
 } else if (o instanceof Map) {
   Map map = (Map) o;
   final Map opMap = (Map) map.get("op");
+  if (map.containsKey("class")) {
+opMap.put("class", map.get("class"));
+  }
   final RelDataTypeFactory typeFactory = cluster.getTypeFactory();
 
 Review comment:
   @chunweilei  thanks for point out. better to  move it down inside `if(opMap 
!= null)`


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] wangzzu commented on a change in pull request #1372: [CALCITE-3246] NullPointerException while deserializing udf operator.

2019-08-14 Thread GitBox
wangzzu commented on a change in pull request #1372: [CALCITE-3246] 
NullPointerException while deserializing udf operator.
URL: https://github.com/apache/calcite/pull/1372#discussion_r313849083
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/rel/externalize/RelJson.java
 ##
 @@ -438,15 +438,17 @@ RexNode toRex(RelInput relInput, Object o) {
 } else if (o instanceof Map) {
   Map map = (Map) o;
   final Map opMap = (Map) map.get("op");
+  if (map.containsKey("class")) {
+opMap.put("class", map.get("class"));
+  }
   final RelDataTypeFactory typeFactory = cluster.getTypeFactory();
 
 Review comment:
   @chunweilei I think even `opMap` is null, it does not matter. And for 
RexCall, it could not be null.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit 8845f293ba8edd40f7555964e3af41f5c3f2a18f
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 57 +++
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 58 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..3943347
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,57 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+steps:
+  - name: Set up Go ${{ matrix.go_version }}
+uses: actions/setup-go@v1
+with:
+  go-version: ${{ matrix.go_version }}
+id: go
+
+  - name: Checking out Avatica-Go repository
+uses: actions/checkout@v1
+with:
+  path: ${{ go.module-path }}
+
+  - name: Start database
+env:
+  database_image: ${{ matrix.database_image }}
+run: |
+  docker pull $database_image;
+
+  if [[ $database_image =~ phoenix ]]; then
+docker run -d -p 8765:8765 $database_image;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+docker run -d -p 8765:8765 $database_image -u 
jdbc:hsqldb:mem:public;
+  fi
+
+  - name: Run tests
+env:
+  database_image: ${{ matrix.database_image }}
+  GO111MODULE: on
+run: |
+  if [[ $database_image =~ phoenix ]]; then
+AVATICA_FLAVOR=PHOENIX;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+AVATICA_FLAVOR=HSQLDB;
+  fi
+
+  go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run

[calcite-avatica-go] branch github-actions updated (f9e302b -> 8845f29)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard f9e302b  Try github actions
 new 8845f29  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (f9e302b)
\
 N -- N -- N   refs/heads/github-actions (8845f29)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit f9e302b52ea1b7c3d47326fc1e702b52c4043dea
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 56 ++
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 57 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..253869f
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,56 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+steps:
+  - name: Set up Go ${{ matrix.go_version }}
+uses: actions/setup-go@v1
+with:
+  go-version: ${{ matrix.go_version }}
+id: go
+
+  - name: Checking out Avatica-Go repository
+uses: actions/checkout@v1
+path: ${{ go.module-path }}
+
+  - name: Start database
+env:
+  database_image: ${{ matrix.database_image }}
+run: |
+  docker pull $database_image;
+
+  if [[ $database_image =~ phoenix ]]; then
+docker run -d -p 8765:8765 $database_image;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+docker run -d -p 8765:8765 $database_image -u 
jdbc:hsqldb:mem:public;
+  fi
+
+  - name: Run tests
+env:
+  database_image: ${{ matrix.database_image }}
+  GO111MODULE: on
+run: |
+  if [[ $database_image =~ phoenix ]]; then
+AVATICA_FLAVOR=PHOENIX;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+AVATICA_FLAVOR=HSQLDB;
+  fi
+
+  go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $

[calcite-avatica-go] branch github-actions updated (89a6362 -> f9e302b)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard 89a6362  $Try github actions
 new f9e302b  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (89a6362)
\
 N -- N -- N   refs/heads/github-actions (f9e302b)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)



[calcite-avatica-go] 01/01: $Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit 89a63622bb7dd6b848c32948df21e0bf8c26810e
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

$Try github actions

Try github actions
---
 .github/workflows/test.yaml | 59 
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 60 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..3163239
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,59 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+steps:
+  - name: Set up Go ${{ matrix.go_version }}
+uses: actions/setup-go@v1
+with:
+  go-version: ${{ matrix.go_version }}
+id: go
+
+  - name: Go path
+working-directory: /
+run: ls -la
+
+  - name: Checking out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Start database
+env:
+  database_image: ${{ matrix.database_image }}
+run: |
+  docker pull $database_image;
+
+  if [[ $database_image =~ phoenix ]]; then
+docker run -d -p 8765:8765 $database_image;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+docker run -d -p 8765:8765 $database_image -u 
jdbc:hsqldb:mem:public;
+  fi
+
+  - name: Run tests
+env:
+  database_image: ${{ matrix.database_image }}
+  GO111MODULE: on
+run: |
+  if [[ $database_image =~ phoenix ]]; then
+AVATICA_FLAVOR=PHOENIX;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+AVATICA_FLAVOR=HSQLDB;
+  fi
+
+  go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" 

[calcite-avatica-go] branch github-actions updated (45e817a -> 89a6362)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard 45e817a  Try github actions
 new 89a6362  $Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (45e817a)
\
 N -- N -- N   refs/heads/github-actions (89a6362)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



[calcite-avatica-go] branch github-actions updated (5c696d0 -> 45e817a)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard 5c696d0  Try github actions
 new 45e817a  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (5c696d0)
\
 N -- N -- N   refs/heads/github-actions (45e817a)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 3 +++
 1 file changed, 3 insertions(+)



[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit 45e817a817265e95992553fc7837ac9e064d952a
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 58 +++
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 59 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..d6eec0b
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,58 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+steps:
+  - name: Set up Go ${{ matrix.go_version }}
+uses: actions/setup-go@v1
+with:
+  go-version: ${{ matrix.go_version }}
+id: go
+
+  - name: Go path
+run: echo $GOPATH
+
+  - name: Checking out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Start database
+env:
+  database_image: ${{ matrix.database_image }}
+run: |
+  docker pull $database_image;
+
+  if [[ $database_image =~ phoenix ]]; then
+docker run -d -p 8765:8765 $database_image;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+docker run -d -p 8765:8765 $database_image -u 
jdbc:hsqldb:mem:public;
+  fi
+
+  - name: Run tests
+env:
+  database_image: ${{ matrix.database_image }}
+  GO111MODULE: on
+run: |
+  if [[ $database_image =~ phoenix ]]; then
+AVATICA_FLAVOR=PHOENIX;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+AVATICA_FLAVOR=HSQLDB;
+  fi
+
+  go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -

[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit 5c696d0fc14d702741d9cbc84d51eecc6fa7b3ab
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 55 ++
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 56 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..1c95b7f
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,55 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+steps:
+  - name: Set up Go ${{ matrix.go_version }}
+uses: actions/setup-go@v1
+with:
+  go-version: ${{ matrix.go_version }}
+id: go
+
+  - name: Checking out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Start database
+env:
+  database_image: ${{ matrix.database_image }}
+run: |
+  docker pull $database_image;
+
+  if [[ $database_image =~ phoenix ]]; then
+docker run -d -p 8765:8765 $database_image;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+docker run -d -p 8765:8765 $database_image -u 
jdbc:hsqldb:mem:public;
+  fi
+
+  - name: Run tests
+env:
+  database_image: ${{ matrix.database_image }}
+  GO111MODULE: on
+run: |
+  if [[ $database_image =~ phoenix ]]; then
+AVATICA_FLAVOR=PHOENIX;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+AVATICA_FLAVOR=HSQLDB;
+  fi
+
+  go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE;
-elif [ $AVATICA_FLAVOR ==

[GitHub] [calcite] psockali opened a new pull request #1378: [CALCITE-3219] introducing expandPredicate to dynamically control expression expansion

2019-08-14 Thread GitBox
psockali opened a new pull request #1378: [CALCITE-3219] introducing 
expandPredicate to dynamically control expression expansion
URL: https://github.com/apache/calcite/pull/1378
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[calcite-avatica-go] branch github-actions updated (0644ad9 -> 5c696d0)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard 0644ad9  Try github actions
 new 5c696d0  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (0644ad9)
\
 N -- N -- N   refs/heads/github-actions (5c696d0)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)



[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit 0644ad9081202793231b3f572d89c3c32be4ac6d
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 45 
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 46 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..0ef8664
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,45 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+steps:
+  - name: Set up Go ${{ matrix.go_version }}
+uses: actions/setup-go@v1
+with:
+  go-version: ${{ matrix.go_version }}
+id: go
+
+  - name: Checking out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Start database
+env:
+  database_image: ${{ matrix.database_image }}
+run: |
+  docker pull $database_image;
+
+  if [[ $database_image =~ phoenix ]]; then
+docker run -d -p 8765:8765 $database_image;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+docker run -d -p 8765:8765 $database_image -u 
jdbc:hsqldb:mem:public;
+  fi
+
+  - name: Run tests
+run: go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE;
-elif [ $AVATICA_FLAVOR == "HSQLDB" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE -u jdbc:hsqldb:mem:public;
-fi
-  - docker ps -a
-
-script:
-  - go test -v ./...
-
-git:
-  depth: 1
-
-install: true
-# End .travis.yml
diff --git a/README.md b/README.md
index b6be82e..3d8b40f 100644
--- a/README.md

[calcite-avatica-go] branch github-actions updated (d454174 -> 0644ad9)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard d454174  Try github actions
 new 0644ad9  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (d454174)
\
 N -- N -- N   refs/heads/github-actions (0644ad9)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 5 -
 1 file changed, 5 deletions(-)



[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit d454174a4e596fc9f1a67876f637320ff3ecd6d6
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 50 +++
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 51 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..bd9efd0
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,50 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+steps:
+  - name: Set up Go ${{ matrix.go_version }}
+uses: actions/setup-go@v1
+with:
+  go-version: ${{ matrix.go_version }}
+id: go
+
+  - name: Show go path
+env:
+  go_path: ${{ go.module-path }}
+run: echo $go_path
+
+  - name: Checking out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Start database
+env:
+  database_image: ${{ matrix.database_image }}
+run: |
+  docker pull $database_image;
+
+  if [[ $database_image =~ phoenix ]]; then
+docker run -d -p 8765:8765 $database_image;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+docker run -d -p 8765:8765 $database_image -u 
jdbc:hsqldb:mem:public;
+  fi
+
+  - name: Run tests
+run: go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE;
-elif [ $AVATICA_FLAVOR == "HSQLDB" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE -u jdbc:hsqldb:mem:public;
-fi
-  - docker ps -a
-
-script:
-  - go test -v ./...
-
-git:
-  depth: 1

[calcite-avatica-go] branch github-actions updated (ddf8be5 -> d454174)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


 discard ddf8be5  Try github actions
 new d454174  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (ddf8be5)
\
 N -- N -- N   refs/heads/github-actions (d454174)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[calcite-avatica-go] branch github-actions updated (3fdf9e2 -> ddf8be5)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


omit 3fdf9e2  Try github actions
 new ddf8be5  Try github actions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (3fdf9e2)
\
 N -- N -- N   refs/heads/github-actions (ddf8be5)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)



[calcite-avatica-go] 01/01: Try github actions

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git

commit ddf8be52b637b4e17cd7c850e272c21b875ab425
Author: Francis Chuang 
AuthorDate: Wed Aug 14 21:50:06 2019 +1000

Try github actions
---
 .github/workflows/test.yaml | 50 +++
 .travis.yml | 73 -
 README.md   |  2 +-
 3 files changed, 51 insertions(+), 74 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 000..c04dff3
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,50 @@
+name: Test
+
+on: push
+
+jobs:
+  test:
+strategy:
+  fail-fast: false
+  matrix:
+go_version: [1.11, 1.12]
+database_image:
+  - boostport/hbase-phoenix-all-in-one:1.3-4.13
+  - boostport/hbase-phoenix-all-in-one:1.4-4.14
+  - boostport/hbase-phoenix-all-in-one:2.0-5.0
+  - f21global/calcite-avatica:1.11.0-hypersql
+  - f21global/calcite-avatica:1.12.0-hypersql
+  - apache/calcite-avatica-hypersql:1.13.0
+  - apache/calcite-avatica-hypersql:1.14.0
+  - apache/calcite-avatica-hypersql:1.15.0
+
+runs-on: ubuntu-latest
+steps:
+  - name: Set up Go ${{ matrix.go_version }}
+uses: actions/setup-go@v1
+with:
+  go-version: ${{ matrix.go_version }}
+id: go
+
+  - name: Show go path
+with:
+  go_path: ${{ go.module-path }}
+run: echo $go_path
+
+  - name: Checking out Avatica-Go repository
+uses: actions/checkout@v1
+
+  - name: Start database
+env:
+  database_image: ${{ matrix.database_image }}
+run: |
+  docker pull $database_image;
+
+  if [[ $database_image =~ phoenix ]]; then
+docker run -d -p 8765:8765 $database_image;
+  elif [ $AVATICA_FLAVOR == hypersql ]; then
+docker run -d -p 8765:8765 $database_image -u 
jdbc:hsqldb:mem:public;
+  fi
+
+  - name: Run tests
+run: go test -v ./...
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 34fcf86..000
--- a/.travis.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Configuration file for Travis continuous integration.
-# See https://travis-ci.org/apache/calcite-avatica-go
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-language: go
-
-branches:
-  only:
-- master
-- /^branch-.*$/
-- /^[0-9]+-.*$/
-
-go:
-  - "1.12.x"
-  - "1.11.x"
-
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-- PHOENIX_HOST=http://localhost:8765
-- HSQLDB_HOST=http://localhost:8765
-  matrix:
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=on
-- AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:2.0-5.0 
GO111MODULE=off
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.12.0-hypersql 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.13.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.14.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=on
-- AVATICA_FLAVOR=HSQLDB IMAGE=apache/calcite-avatica-hypersql:1.15.0 
GO111MODULE=off
-
-before_install:
-  - if [ $GO111MODULE == "off" ]; then
-  go get -u github.com/golang/dep/cmd/dep;
-  dep ensure -v;
-fi
-  - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE;
-elif [ $AVATICA_FLAVOR == "HSQLDB" ]; then
-  docker pull $IMAGE;
-  docker run -d -p 8765:8765 $IMAGE -u jdbc:hsqldb:mem:public;
-fi
-  - docker ps -a
-
-script:
-  - go test -v ./...
-
-git:
-  depth: 1000

[GitHub] [calcite-avatica-go] F21 closed pull request #44: Use github actions for continuous integration

2019-08-14 Thread GitBox
F21 closed pull request #44: Use github actions for continuous integration
URL: https://github.com/apache/calcite-avatica-go/pull/44
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[calcite-avatica-go] branch github-actions created (now 3fdf9e2)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a change to branch github-actions
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git.


  at 3fdf9e2  Try github actions

No new revisions were added by this update.



[GitHub] [calcite-avatica-go] F21 opened a new pull request #44: Use github actions for continuous integration

2019-08-14 Thread GitBox
F21 opened a new pull request #44: Use github actions for continuous integration
URL: https://github.com/apache/calcite-avatica-go/pull/44
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] ihuzenko commented on issue #1374: [CALCITE-3138] Restructuring ROW type fields is not supported

2019-08-14 Thread GitBox
ihuzenko commented on issue #1374: [CALCITE-3138] Restructuring ROW type fields 
is not supported
URL: https://github.com/apache/calcite/pull/1374#issuecomment-521185884
 
 
   Hi @chunweilei , good catch. Updated commit and PR name. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] danny0405 commented on a change in pull request #706: [CALCITE-2302] Implicit type cast support

2019-08-14 Thread GitBox
danny0405 commented on a change in pull request #706: [CALCITE-2302] Implicit 
type cast support
URL: https://github.com/apache/calcite/pull/706#discussion_r313799396
 
 

 ##
 File path: core/src/main/java/org/apache/calcite/sql/SqlKind.java
 ##
 @@ -1279,6 +1279,46 @@
   LESS_THAN, GREATER_THAN,
   GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL);
 
+  /**
+   * Category of binary arithmetic.
+   *
+   * Consists of:
+   * {@link #PLUS}
+   * {@link #MINUS}
+   * {@link #TIMES}
+   * {@link #DIVIDE}
+   * {@link #MOD}.
+   */
+  public static final Set BINARY_ARITHMETIC =
+  EnumSet.of(PLUS, MINUS, TIMES, DIVIDE, MOD);
+
+  /**
+   * Category of binary equality.
+   *
+   * Consists of:
+   * {@link #EQUALS}
+   * {@link #NOT_EQUALS}
+   */
+  public static final Set BINARY_EQUALITY =
+  EnumSet.of(EQUALS, NOT_EQUALS);
+
+  /**
+   * Category of binary comparison.
+   *
+   * Consists of:
+   * {@link #EQUALS}
+   * {@link #NOT_EQUALS}
+   * {@link #GREATER_THAN}
+   * {@link #GREATER_THAN_OR_EQUAL}
+   * {@link #LESS_THAN}
+   * {@link #LESS_THAN_OR_EQUAL}
+   */
+  public static final Set BINARY_COMPARISON =
+  EnumSet.of(
+  EQUALS, NOT_EQUALS,
+  GREATER_THAN, GREATER_THAN_OR_EQUAL,
+  LESS_THAN, LESS_THAN_OR_EQUAL);
 
 Review comment:
   I found that only DB2 and PostgreSQL support "is not distinct from", while 
PostgreSQL does not support implicit type cast, to keep rigorous, let's give up 
the support for it in this patch.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] zabetak commented on a change in pull request #1375: [CALCITE-3140][CALCITE-3141] Failures in slow tests & CI

2019-08-14 Thread GitBox
zabetak commented on a change in pull request #1375: 
[CALCITE-3140][CALCITE-3141] Failures in slow tests & CI
URL: https://github.com/apache/calcite/pull/1375#discussion_r313796132
 
 

 ##
 File path: 
core/src/test/java/org/apache/calcite/sql/test/SqlOperatorBaseTest.java
 ##
 @@ -5829,7 +5860,17 @@ private void checkNullOperand(SqlTester tester, String 
op) {
 pair.right.close();
   }
 
-  @Test public void testLocalTimestampFunc() {
+  @Test
+  @Category(SlowTests.class)
+  public void testLocalTimestampFuncWithCurrentTime() {
 
 Review comment:
   Yes @Test should be; I fixed it, thanks! Now if there are multiple 
annotations I think it might become difficult to read.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite-avatica-go] F21 commented on issue #43: [CALCITE-3248] add Connector implementation

2019-08-14 Thread GitBox
F21 commented on issue #43: [CALCITE-3248] add Connector implementation
URL: https://github.com/apache/calcite-avatica-go/pull/43#issuecomment-521182564
 
 
   Thanks @trusch! By the way, the Calcite and avatica community is active on 
the mailing list if you'd like to participate: 
https://calcite.apache.org/community/#mailing-lists


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite-avatica-go] F21 merged pull request #43: [CALCITE-3248] add Connector implementation

2019-08-14 Thread GitBox
F21 merged pull request #43: [CALCITE-3248] add Connector implementation
URL: https://github.com/apache/calcite-avatica-go/pull/43
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[calcite-avatica-go] branch master updated: [CALCITE-3248] add Connector implementation. (Tino Rusch)

2019-08-14 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git


The following commit(s) were added to refs/heads/master by this push:
 new 30a59fc  [CALCITE-3248] add Connector implementation. (Tino Rusch)
30a59fc is described below

commit 30a59fca23f6dbd0f45b75c24cc3b438ed712969
Author: Tino Rusch 
AuthorDate: Tue Jul 23 12:00:43 2019 +0200

[CALCITE-3248] add Connector implementation. (Tino Rusch)

This is to support passing externally prepared HTTP clients for the jdbc 
connection.
It also includes the refactoring of the authentication methods to be 
separate
from the driver implementation, so that the user can setup the http client 
as
wanted and pass that in to the Connector. Also the unused username/password
fields in the dsn are removed.
---
 driver.go |  53 ++---
 dsn.go|  15 -
 dsn_test.go   |  18 +-
 go.mod|   1 +
 go.sum|   7 +++
 http_client.go| 105 +++-
 http_client_wrappers.go   | 122 ++
 site/_docs/go_client_reference.md |  14 +
 8 files changed, 187 insertions(+), 148 deletions(-)

diff --git a/driver.go b/driver.go
index d2b9288..7e63488 100644
--- a/driver.go
+++ b/driver.go
@@ -27,7 +27,7 @@ Import the database/sql package along with the avatica driver.
 
db, err := sql.Open("avatica", "http://phoenix-query-server:8765";)
 
-See https://calcite.apache.org/avatica/go_client_reference.html for more 
details
+See https://calcite.apache.org/avatica/docs/go_client_reference.html for more 
details
 */
 package avatica
 
@@ -36,6 +36,7 @@ import (
"database/sql"
"database/sql/driver"
"fmt"
+   "net/http"
 
"github.com/apache/calcite-avatica-go/v4/generic"
"github.com/apache/calcite-avatica-go/v4/hsqldb"
@@ -47,26 +48,28 @@ import (
 // Driver is exported to allow it to be used directly.
 type Driver struct{}
 
-// Open a Connection to the server.
-// See https://github.com/apache/calcite-avatica-go#dsn for more information
-// on how the DSN is formatted.
-func (a *Driver) Open(dsn string) (driver.Conn, error) {
+// Connector implements the driver.Connector interface
+type Connector struct {
+   Info   map[string]string
+   Client *http.Client
+
+   dsn string
+}
+
+// NewConnector creates a new connector
+func NewConnector(dsn string) driver.Connector {
+   return &Connector{nil, nil, dsn}
+}
 
-   config, err := ParseDSN(dsn)
+func (c *Connector) Connect(context.Context) (driver.Conn, error) {
+
+   config, err := ParseDSN(c.dsn)
 
if err != nil {
return nil, fmt.Errorf("Unable to open connection: %s", err)
}
 
-   httpClient, err := NewHTTPClient(config.endpoint, httpClientAuthConfig{
-   authenticationType:  config.authentication,
-   username:config.avaticaUser,
-   password:config.avaticaPassword,
-   principal:   config.principal,
-   keytab:  config.keytab,
-   krb5Conf:config.krb5Conf,
-   krb5CredentialCache: config.krb5CredentialCache,
-   })
+   httpClient, err := NewHTTPClient(config.endpoint, c.Client, config)
 
if err != nil {
return nil, fmt.Errorf("Unable to create HTTP client: %s", err)
@@ -82,12 +85,8 @@ func (a *Driver) Open(dsn string) (driver.Conn, error) {
"Consistency": "8",
}
 
-   if config.user != "" {
-   info["user"] = config.user
-   }
-
-   if config.password != "" {
-   info["password"] = config.password
+   for k, v := range c.Info {
+   info[k] = v
}
 
conn := &conn{
@@ -135,6 +134,18 @@ func (a *Driver) Open(dsn string) (driver.Conn, error) {
return conn, nil
 }
 
+// Driver returns the underlying driver
+func (c *Connector) Driver() driver.Driver {
+   return &Driver{}
+}
+
+// Open a Connection to the server.
+// See https://github.com/apache/calcite-avatica-go#dsn for more information
+// on how the DSN is formatted.
+func (a *Driver) Open(dsn string) (driver.Conn, error) {
+   return NewConnector(dsn).Connect(context.TODO())
+}
+
 func getAdapter(e string) Adapter {
switch e {
case "HSQL Database Engine Driver":
diff --git a/dsn.go b/dsn.go
index c836b9d..b5fc8f5 100644
--- a/dsn.go
+++ b/dsn.go
@@ -43,9 +43,6 @@ type Config struct {
schema   string
transactionIsolation uint32
 
-   user string
-   password string
-
authentication  authentication
avaticaUser string
avaticaPassword 

[GitHub] [calcite] danny0405 closed pull request #1362: [CALCITE-3236] Handle issues found in static code analysis

2019-08-14 Thread GitBox
danny0405 closed pull request #1362: [CALCITE-3236] Handle issues found in 
static code analysis
URL: https://github.com/apache/calcite/pull/1362
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[calcite] branch master updated: [CALCITE-3236] Handle issues found in static code analysis (DonnyZone)

2019-08-14 Thread danny0405
This is an automated email from the ASF dual-hosted git repository.

danny0405 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 5c01713  [CALCITE-3236] Handle issues found in static code analysis 
(DonnyZone)
5c01713 is described below

commit 5c017135b6b923abbf1b465ac1962bcec7886dfd
Author: wellfengzhu 
AuthorDate: Thu Aug 8 13:20:27 2019 +0800

[CALCITE-3236] Handle issues found in static code analysis (DonnyZone)

close apache/calcite#1362
---
 .../java/org/apache/calcite/plan/SubstitutionVisitor.java|  3 ++-
 .../apache/calcite/rel/mutable/MutableTableFunctionScan.java |  2 +-
 .../test/java/org/apache/calcite/test/MutableRelTest.java| 12 
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git 
a/core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java 
b/core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java
index 4bbf8e9..b477fbc 100644
--- a/core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java
+++ b/core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java
@@ -757,7 +757,8 @@ public class SubstitutionVisitor {
 
   private UnifyResult apply(UnifyRule rule, MutableRel query,
   MutableRel target) {
-final UnifyRuleCall call = new UnifyRuleCall(rule, query, target, null);
+final UnifyRuleCall call =
+new UnifyRuleCall(rule, query, target, ImmutableList.of());
 return rule.apply(call);
   }
 
diff --git 
a/core/src/main/java/org/apache/calcite/rel/mutable/MutableTableFunctionScan.java
 
b/core/src/main/java/org/apache/calcite/rel/mutable/MutableTableFunctionScan.java
index 514cdf2..c5dc296 100644
--- 
a/core/src/main/java/org/apache/calcite/rel/mutable/MutableTableFunctionScan.java
+++ 
b/core/src/main/java/org/apache/calcite/rel/mutable/MutableTableFunctionScan.java
@@ -69,7 +69,7 @@ public class MutableTableFunctionScan extends MutableMultiRel 
{
 ((MutableTableFunctionScan) obj).elementType)
 && Objects.equals(columnMappings,
 ((MutableTableFunctionScan) obj).columnMappings)
-&& inputs.equals(((MutableSetOp) obj).getInputs());
+&& inputs.equals(((MutableTableFunctionScan) obj).getInputs());
   }
 
   @Override public int hashCode() {
diff --git a/core/src/test/java/org/apache/calcite/test/MutableRelTest.java 
b/core/src/test/java/org/apache/calcite/test/MutableRelTest.java
index 3427a96..d112852 100644
--- a/core/src/test/java/org/apache/calcite/test/MutableRelTest.java
+++ b/core/src/test/java/org/apache/calcite/test/MutableRelTest.java
@@ -204,6 +204,18 @@ public class MutableRelTest {
 }
   }
 
+  @Test public void testMutableTableFunctionScanEquals() {
+final String sql = "SELECT * FROM TABLE(RAMP(3))";
+final MutableRel mutableRel1 = createMutableRel(sql);
+final MutableRel mutableRel2 = createMutableRel(sql);
+final String actual = 
RelOptUtil.toString(MutableRels.fromMutable(mutableRel1));
+final String expected = ""
++ "LogicalProject(I=[$0])\n"
++ "  LogicalTableFunctionScan(invocation=[RAMP(3)], 
rowType=[RecordType(INTEGER I)])\n";
+MatcherAssert.assertThat(actual, Matchers.isLinux(expected));
+Assert.assertEquals(mutableRel1, mutableRel2);
+  }
+
   /** Verifies that after conversion to and from a MutableRel, the new
* RelNode remains identical to the original RelNode. */
   private static void checkConvertMutableRel(String rel, String sql) {



[GitHub] [calcite] danny0405 merged pull request #1371: [CALCITE-3238] Support Time Zone suffix of DateTime types for SqlData…

2019-08-14 Thread GitBox
danny0405 merged pull request #1371: [CALCITE-3238] Support Time Zone suffix of 
DateTime types for SqlData…
URL: https://github.com/apache/calcite/pull/1371
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[calcite] branch master updated: [CALCITE-3238] Support Time Zone suffix of DateTime types for SqlDataTypeSpec

2019-08-14 Thread danny0405
This is an automated email from the ASF dual-hosted git repository.

danny0405 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new f25734a  [CALCITE-3238] Support Time Zone suffix of DateTime types for 
SqlDataTypeSpec
f25734a is described below

commit f25734a2d27f304a454a310e656ab83a5fa85890
Author: yuzhao.cyz 
AuthorDate: Mon Aug 12 17:32:20 2019 +0800

[CALCITE-3238] Support Time Zone suffix of DateTime types for 
SqlDataTypeSpec
---
 core/src/main/codegen/config.fmpp  |   4 +-
 core/src/main/codegen/templates/Parser.jj  | 306 +++--
 .../apache/calcite/sql/SqlBasicTypeNameSpec.java   | 265 ++
 .../org/apache/calcite/sql/SqlDataTypeSpec.java| 278 ++-
 .../java/org/apache/calcite/sql/SqlDialect.java|  21 +-
 .../apache/calcite/sql/SqlJdbcDataTypeName.java|   3 +-
 ...SqlRowTypeSpec.java => SqlRowTypeNameSpec.java} |  39 ++-
 .../org/apache/calcite/sql/SqlTypeNameSpec.java|  38 ++-
 .../calcite/sql/SqlUserDefinedTypeNameSpec.java|  79 ++
 .../calcite/sql/dialect/MysqlSqlDialect.java   |  14 +-
 .../calcite/sql/dialect/OracleSqlDialect.java  |   7 +-
 .../calcite/sql/dialect/PostgresqlSqlDialect.java  |   7 +-
 .../calcite/sql/fun/SqlJsonValueFunction.java  |   7 +-
 .../calcite/sql/type/SqlTypeFactoryImpl.java   |   4 +
 .../org/apache/calcite/sql/type/SqlTypeUtil.java   |  68 +++--
 .../apache/calcite/sql/parser/SqlParserTest.java   |  29 +-
 .../calcite/sql/test/SqlOperatorBaseTest.java  |  15 +-
 .../org/apache/calcite/test/SqlValidatorTest.java  |  20 ++
 .../calcite/adapter/geode/rel/GeodeTable.java  |  14 +-
 site/_docs/history.md  |   7 +
 site/_docs/reference.md|  40 ++-
 21 files changed, 875 insertions(+), 390 deletions(-)

diff --git a/core/src/main/codegen/config.fmpp 
b/core/src/main/codegen/config.fmpp
index 1a7c5f1..a44b8b7 100644
--- a/core/src/main/codegen/config.fmpp
+++ b/core/src/main/codegen/config.fmpp
@@ -373,9 +373,7 @@ data: {
 ]
 
 # List of methods for parsing custom data types.
-# Return type of method implementation should be "SqlIdentifier".
-# Return "SqlTypeNameSpec" if you want to customize sql unparsing
-# and data type deriving.
+# Return type of method implementation should be "SqlTypeNameSpec".
 # Example: SqlParseTimeStampZ().
 dataTypeParserMethods: [
 ]
diff --git a/core/src/main/codegen/templates/Parser.jj 
b/core/src/main/codegen/templates/Parser.jj
index 63fdf0e..26dc43a 100644
--- a/core/src/main/codegen/templates/Parser.jj
+++ b/core/src/main/codegen/templates/Parser.jj
@@ -41,6 +41,7 @@ import org.apache.calcite.runtime.CalciteContextException;
 import org.apache.calcite.sql.JoinConditionType;
 import org.apache.calcite.sql.JoinType;
 import org.apache.calcite.sql.SqlAlter;
+import org.apache.calcite.sql.SqlBasicTypeNameSpec;
 import org.apache.calcite.sql.SqlBinaryOperator;
 import org.apache.calcite.sql.SqlCall;
 import org.apache.calcite.sql.SqlCharStringLiteral;
@@ -82,7 +83,7 @@ import org.apache.calcite.sql.SqlOperator;
 import org.apache.calcite.sql.SqlOrderBy;
 import org.apache.calcite.sql.SqlPostfixOperator;
 import org.apache.calcite.sql.SqlPrefixOperator;
-import org.apache.calcite.sql.SqlRowTypeSpec;
+import org.apache.calcite.sql.SqlRowTypeNameSpec;
 import org.apache.calcite.sql.SqlSampleSpec;
 import org.apache.calcite.sql.SqlSelect;
 import org.apache.calcite.sql.SqlSelectKeyword;
@@ -93,6 +94,7 @@ import org.apache.calcite.sql.SqlTimestampLiteral;
 import org.apache.calcite.sql.SqlTypeNameSpec;
 import org.apache.calcite.sql.SqlUnnestOperator;
 import org.apache.calcite.sql.SqlUpdate;
+import org.apache.calcite.sql.SqlUserDefinedTypeNameSpec;
 import org.apache.calcite.sql.SqlUtil;
 import org.apache.calcite.sql.SqlWindow;
 import org.apache.calcite.sql.SqlWith;
@@ -4542,14 +4544,11 @@ int IntLiteral() :
 }
 }
 
-// Type name with optional scale and precision
+// Type name with optional scale and precision.
 SqlDataTypeSpec DataType() :
 {
-final SqlIdentifier typeName;
+final SqlTypeNameSpec typeName;
 SqlIdentifier collectionTypeName = null;
-int scale = -1;
-int precision = -1;
-String charSetName = null;
 final Span s;
 }
 {
@@ -4557,19 +4556,6 @@ SqlDataTypeSpec DataType() :
 s = span();
 }
 [
-
-precision = UnsignedIntLiteral()
-[
-
-scale = UnsignedIntLiteral()
-]
-
-]
-[
- 
-charSetName = Identifier()
-]
-[
 collectionTypeName = CollectionsTypeName()
 ]
 {
@@ -4577,27 +4563,20 @@ SqlDataTypeSpec DataType() :
 return new SqlDataTypeSpec(
 collectionTypeName,
 typeName,
-precision,
-

[GitHub] [calcite] jinxing64 opened a new pull request #1377: [CALCITE-3249] Substitution#getRexShuttle does not consider RexLiteral

2019-08-14 Thread GitBox
jinxing64 opened a new pull request #1377: [CALCITE-3249] 
Substitution#getRexShuttle does not consider RexLiteral
URL: https://github.com/apache/calcite/pull/1377
 
 
   Current `Substitution#getRexShuttle` does not take `RexLiteral` into 
consideration.
   Thus below query & mv fails matching:
   ```
   MV:
   select deptno, sum(salary), sum(commission), sum(k)
   from
 (select deptno, salary, commission, 100 as k
 from emps)
   group by deptno
   
   Query:
   select deptno, sum(salary), sum(k)
   from
 (select deptno, salary, 100 as k
 from emps)
   group by deptno
   ```
   The root cause is that `ProjectToProjectUnifyRule` compensates a `Project` 
which contains `RexLiteral`, but `AggregateOnProjectToAggregateUnifyRule` works 
only when the `Project` in query is a mapping
   
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java#L1357


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


  1   2   >