File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
core/src/main/java/org/opensearch/sql/calcite/utils
integ-test/src/test/java/org/opensearch/sql/calcite/remote Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -361,8 +361,10 @@ public RelNode visit(TableScan scan) {
361361 && errorMsg .contains ("Error while preparing plan" )
362362 && errorMsg .contains ("WIDTH_BUCKET" )) {
363363 throw new UnsupportedOperationException (
364- "The 'bins' parameter on timestamp fields is not supported when pushdown is"
365- + " disabled." );
364+ "The 'bins' parameter on timestamp fields requires: (1) pushdown to be enabled"
365+ + " (controlled by plugins.calcite.pushdown.enabled, enabled by default), and"
366+ + " (2) the timestamp field to be used as an aggregation bucket (e.g., 'stats"
367+ + " count() by @timestamp')." );
366368 }
367369 throw Util .throwAsRuntime (e );
368370 }
Original file line number Diff line number Diff line change @@ -1146,11 +1146,12 @@ public void testBinsOnTimeFieldWithPushdownDisabled_ShouldFail() throws IOExcept
11461146 // @timestamp)
11471147 String errorMessage = exception .getMessage ();
11481148 assertTrue (
1149- "Expected clear error message about bins parameter not supported on timestamp fields when "
1150- + "pushdown is disabled, but got: "
1149+ "Expected clear error message about bins parameter requirements on timestamp fields, but "
1150+ + " got: "
11511151 + errorMessage ,
1152- errorMessage .contains (
1153- "bins' parameter on timestamp fields is not supported when pushdown is disabled" ));
1152+ errorMessage .contains ("bins' parameter on timestamp fields requires" )
1153+ && errorMessage .contains ("pushdown to be enabled" )
1154+ && errorMessage .contains ("aggregation bucket" ));
11541155 }
11551156
11561157 @ Test
You can’t perform that action at this time.
0 commit comments