paul-rogers commented on PR #13106:
URL: https://github.com/apache/druid/pull/13106#issuecomment-1263124969
@kfaraz, thanks for the suggestion to use YAML. We did, in fact, use YAML
for the config files in the new ITs. YAML was not used here because we're
mostly dealing with large blocks of text (except for query context variables
and test options.) While YAML can handle such text blocks, it's not pretty or
simple. (I say this having used YAML to create Helm charts for K8s: a task I
wouldn't wish on anyone!)
The goal of the odd format is for test cases to be mostly text, with simple
delimiters between sections, hence the odd "===" syntax which is meant to look
like a divider.
Here's a quick comparison. Proposed format:
```text
==================
My Test Case
=== SQL
SELECT *
FROM foo
=== schema
A VARCHAR
B BIGINT
```
YAML:
```yaml
testCases:
- testCase: My Test Case
sql: |-
SELECT *
FROM FOO
schema:
- name: A
type: VARCHAR
- name: B
type: BIGINT
```
Imagine encoding a native query, as JSON, within a YAML file. Would get to
be about as hairy as using JSON in SQL in MSQ to specify an external file.
All that said, you suggest a possible code change: ensure that the parsed
"nodes" are agnostic about the file format. That way, we could try a YAML
solution which would be converted to the same parse nodes as the current
ad-hoc. format.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]