-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Test] Add backticks to column identifiers to fix queries for column names with .
#343
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -376,7 +376,7 @@ limitations under the License. | |
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>jar</goal> | ||
<goal>test-jar</goal> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hack to get build to work |
||
</goals> | ||
</execution> | ||
</executions> | ||
|
@@ -588,7 +588,7 @@ limitations under the License. | |
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<id>release</id> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,12 +58,13 @@ public ChangelogMode getChangelogMode() { | |
@Override | ||
public ScanRuntimeProvider getScanRuntimeProvider(ScanContext scanContext) { | ||
StarRocksDynamicSourceFunction sourceFunction = new StarRocksDynamicSourceFunction( | ||
options, flinkSchema, | ||
this.pushDownHolder.getFilter(), | ||
this.pushDownHolder.getLimit(), | ||
this.pushDownHolder.getSelectColumns(), | ||
this.pushDownHolder.getColumns(), | ||
options, flinkSchema, | ||
this.pushDownHolder.getFilter(), | ||
this.pushDownHolder.getLimit(), | ||
this.pushDownHolder.getSelectColumns(), | ||
this.pushDownHolder.getColumns(), | ||
this.pushDownHolder.getQueryType()); | ||
|
||
return SourceFunctionProvider.of(sourceFunction, true); | ||
} | ||
|
||
|
@@ -73,7 +74,7 @@ public LookupRuntimeProvider getLookupRuntimeProvider(LookupContext context) { | |
ColumnRichInfo[] filerRichInfo = new ColumnRichInfo[projectedFields.length]; | ||
for (int i = 0; i < projectedFields.length; i ++) { | ||
ColumnRichInfo columnRichInfo = new ColumnRichInfo( | ||
this.flinkSchema.getFieldName(projectedFields[i]).get(), | ||
this.flinkSchema.getFieldName(projectedFields[i]).get(), | ||
projectedFields[i], | ||
this.flinkSchema.getFieldDataType(projectedFields[i]).get() | ||
); | ||
|
@@ -114,9 +115,9 @@ public void applyProjection(int[][] projectedFields) { | |
this.pushDownHolder.setQueryType(StarRocksSourceQueryType.QuerySomeColumns); | ||
|
||
ArrayList<String> columnList = new ArrayList<>(); | ||
ArrayList<SelectColumn> selectColumns = new ArrayList<SelectColumn>(); | ||
ArrayList<SelectColumn> selectColumns = new ArrayList<SelectColumn>(); | ||
for (int index : curProjectedFields) { | ||
String columnName = flinkSchema.getFieldName(index).get(); | ||
String columnName = "`" + flinkSchema.getFieldName(index).get() + "`"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. backtick added here |
||
columnList.add(columnName); | ||
selectColumns.add(new SelectColumn(columnName, index)); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,7 @@ public String visit(CallExpression call) { | |
} | ||
|
||
if (SUPPORT_FUNC.containsKey(funcDef)) { | ||
|
||
List<String> operands = new ArrayList<>(); | ||
for (Expression child : call.getChildren()) { | ||
String operand = child.accept(this); | ||
|
@@ -74,8 +74,8 @@ public String visit(CallExpression call) { | |
@Override | ||
public String visit(ValueLiteralExpression valueLiteral) { | ||
LogicalTypeRoot typeRoot = valueLiteral.getOutputDataType().getLogicalType().getTypeRoot(); | ||
if (typeRoot.equals(LogicalTypeRoot.TIMESTAMP_WITHOUT_TIME_ZONE) || | ||
typeRoot.equals(LogicalTypeRoot.TIMESTAMP_WITH_LOCAL_TIME_ZONE) || | ||
if (typeRoot.equals(LogicalTypeRoot.TIMESTAMP_WITHOUT_TIME_ZONE) || | ||
typeRoot.equals(LogicalTypeRoot.TIMESTAMP_WITH_LOCAL_TIME_ZONE) || | ||
typeRoot.equals(LogicalTypeRoot.TIMESTAMP_WITH_TIME_ZONE) || | ||
typeRoot.equals(LogicalTypeRoot.DATE)) { | ||
return "'" + valueLiteral.toString() + "'"; | ||
|
@@ -85,7 +85,7 @@ public String visit(ValueLiteralExpression valueLiteral) { | |
|
||
@Override | ||
public String visit(FieldReferenceExpression fieldReference) { | ||
return fieldReference.getName(); | ||
return "`" + fieldReference.getName() + "`"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. backtick added here |
||
} | ||
|
||
@Override | ||
|
@@ -98,4 +98,4 @@ public String visit(Expression other) { | |
return null; | ||
} | ||
|
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disable rat to get build to work